aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HOWTO/INSTALL-CROSS.md1
-rw-r--r--HOWTO/INSTALL-WIN32.md3
-rw-r--r--HOWTO/INSTALL.md1
-rw-r--r--HOWTO/MARKDOWN.md15
-rw-r--r--bootstrap/bin/start.bootbin5343 -> 5391 bytes
-rw-r--r--bootstrap/bin/start_clean.bootbin5343 -> 5391 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_block.beambin9688 -> 9612 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_dead.beambin12972 -> 13092 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_disasm.beambin26204 -> 26188 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_except.beambin3540 -> 3564 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_jump.beambin9372 -> 9524 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_receive.beambin6380 -> 6392 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_utils.beambin13668 -> 13700 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_validator.beambin30188 -> 30824 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/rec_env.beambin4916 -> 4652 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_core_fold.beambin52348 -> 52400 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_codegen.beambin55848 -> 56552 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_core.beambin54404 -> 54484 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_life.beambin19044 -> 19044 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/gen_sctp.beambin3604 -> 3392 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/gen_tcp.beambin2404 -> 2216 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/gen_udp.beambin1616 -> 1400 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet.beambin23312 -> 24024 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet6_sctp.beambin1536 -> 1532 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet6_tcp.beambin3032 -> 3092 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet6_udp.beambin1728 -> 1796 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_sctp.beambin2304 -> 2300 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_tcp.beambin2744 -> 2776 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_tcp_dist.beambin7184 -> 7212 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_udp.beambin1916 -> 1940 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/kernel.app4
-rw-r--r--bootstrap/lib/kernel/ebin/local_tcp.beambin0 -> 2352 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/local_udp.beambin0 -> 1436 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/net_adm.beambin3008 -> 3036 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/proc_lib.beambin10676 -> 10620 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/stdlib.app2
-rw-r--r--bootstrap/lib/stdlib/ebin/supervisor.beambin23436 -> 23348 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/zip.beambin26632 -> 26632 bytes
-rw-r--r--erts/configure.in8
-rw-r--r--erts/doc/src/erl.xml22
-rw-r--r--erts/doc/src/erl_nif.xml53
-rw-r--r--erts/doc/src/erl_tracer.xml96
-rw-r--r--erts/doc/src/erlang.xml13
-rw-r--r--erts/doc/src/init.xml15
-rw-r--r--erts/emulator/beam/atom.names8
-rw-r--r--erts/emulator/beam/beam_emu.c293
-rw-r--r--erts/emulator/beam/bif.c64
-rw-r--r--erts/emulator/beam/bif.tab2
-rw-r--r--erts/emulator/beam/erl_ao_firstfit_alloc.c2
-rw-r--r--erts/emulator/beam/erl_bif_info.c5
-rw-r--r--erts/emulator/beam/erl_bif_port.c2
-rw-r--r--erts/emulator/beam/erl_db_hash.c34
-rw-r--r--erts/emulator/beam/erl_db_hash.h2
-rw-r--r--erts/emulator/beam/erl_gc.c39
-rw-r--r--erts/emulator/beam/erl_init.c6
-rw-r--r--erts/emulator/beam/erl_message.c45
-rw-r--r--erts/emulator/beam/erl_message.h29
-rw-r--r--erts/emulator/beam/erl_nif.c154
-rw-r--r--erts/emulator/beam/erl_nif.h11
-rw-r--r--erts/emulator/beam/erl_nif_api_funcs.h4
-rw-r--r--erts/emulator/beam/erl_process.c124
-rw-r--r--erts/emulator/beam/erl_process.h28
-rw-r--r--erts/emulator/beam/erl_process_dump.c5
-rw-r--r--erts/emulator/beam/erl_trace.c65
-rw-r--r--erts/emulator/beam/erlang_lttng.h48
-rw-r--r--erts/emulator/beam/export.c5
-rw-r--r--erts/emulator/beam/global.h4
-rw-r--r--erts/emulator/beam/io.c59
-rw-r--r--erts/emulator/beam/lttng-wrapper.h12
-rw-r--r--erts/emulator/beam/sys.h5
-rw-r--r--erts/emulator/beam/utils.c26
-rw-r--r--erts/emulator/drivers/common/inet_drv.c430
-rw-r--r--erts/emulator/hipe/hipe_bif0.c36
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.c2
-rw-r--r--erts/emulator/hipe/hipe_x86.c4
-rw-r--r--erts/emulator/nifs/common/erl_tracer_nif.c34
-rw-r--r--erts/emulator/sys/win32/erl_poll.c7
-rw-r--r--erts/emulator/test/bif_SUITE.erl15
-rw-r--r--erts/emulator/test/bs_construct_SUITE.erl48
-rw-r--r--erts/emulator/test/dirty_nif_SUITE.erl129
-rw-r--r--erts/emulator/test/dirty_nif_SUITE_data/dirty_nif_SUITE.c35
-rw-r--r--erts/emulator/test/distribution_SUITE.erl69
-rw-r--r--erts/emulator/test/lttng_SUITE.erl218
-rw-r--r--erts/emulator/test/message_queue_data_SUITE.erl42
-rw-r--r--erts/emulator/test/process_SUITE.erl6
-rw-r--r--erts/emulator/test/tracer_SUITE.erl103
-rw-r--r--erts/emulator/test/tracer_SUITE_data/tracer_test.c4
-rw-r--r--erts/emulator/test/tracer_test.erl4
-rw-r--r--erts/etc/common/erlexec.c21
-rw-r--r--erts/etc/common/heart.c18
-rw-r--r--erts/etc/unix/etp-commands.in25
-rw-r--r--erts/preloaded/ebin/erl_tracer.beambin2112 -> 2200 bytes
-rw-r--r--erts/preloaded/ebin/erlang.beambin104620 -> 104648 bytes
-rw-r--r--erts/preloaded/ebin/init.beambin49924 -> 50052 bytes
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin72544 -> 76348 bytes
-rw-r--r--erts/preloaded/src/erl_tracer.erl14
-rw-r--r--erts/preloaded/src/erlang.erl9
-rw-r--r--erts/preloaded/src/erts.app.src2
-rw-r--r--erts/preloaded/src/init.erl33
-rw-r--r--erts/preloaded/src/prim_inet.erl340
-rw-r--r--lib/common_test/src/test_server.erl132
-rw-r--r--lib/common_test/src/test_server_ctrl.erl63
-rw-r--r--lib/common_test/src/test_server_gl.erl5
-rw-r--r--lib/common_test/src/test_server_io.erl17
-rw-r--r--lib/common_test/src/test_server_node.erl12
-rw-r--r--lib/common_test/src/test_server_sup.erl5
-rw-r--r--lib/common_test/src/vts.erl19
-rw-r--r--lib/common_test/test/Makefile3
-rw-r--r--lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_log_SUITE.erl328
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl266
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl17
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/netconfc_test_lib.erl166
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key13
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key.pub11
-rw-r--r--lib/common_test/test/ct_repeat_testrun_SUITE.erl60
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl15
-rw-r--r--lib/common_test/test/telnet_server.erl16
-rw-r--r--lib/common_test/test_server/ts_install.erl9
-rw-r--r--lib/compiler/doc/src/compile.xml16
-rw-r--r--lib/compiler/src/beam_block.erl17
-rw-r--r--lib/compiler/src/beam_dead.erl18
-rw-r--r--lib/compiler/src/beam_disasm.erl5
-rw-r--r--lib/compiler/src/beam_disasm.hrl6
-rw-r--r--lib/compiler/src/beam_except.erl8
-rw-r--r--lib/compiler/src/beam_jump.erl50
-rw-r--r--lib/compiler/src/beam_receive.erl3
-rw-r--r--lib/compiler/src/beam_utils.erl20
-rw-r--r--lib/compiler/src/beam_validator.erl112
-rw-r--r--lib/compiler/src/compile.erl9
-rw-r--r--lib/compiler/src/rec_env.erl174
-rw-r--r--lib/compiler/src/sys_core_fold.erl14
-rw-r--r--lib/compiler/src/v3_codegen.erl106
-rw-r--r--lib/compiler/src/v3_core.erl11
-rw-r--r--lib/compiler/src/v3_kernel.erl2
-rw-r--r--lib/compiler/test/Makefile4
-rw-r--r--lib/compiler/test/beam_block_SUITE.erl21
-rw-r--r--lib/compiler/test/beam_except_SUITE.erl26
-rw-r--r--lib/compiler/test/beam_jump_SUITE.erl59
-rw-r--r--lib/compiler/test/beam_utils_SUITE.erl45
-rw-r--r--lib/compiler/test/beam_validator_SUITE.erl120
-rw-r--r--lib/compiler/test/bif_SUITE.erl65
-rw-r--r--lib/compiler/test/compile_SUITE.erl22
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl49
-rw-r--r--lib/compiler/test/guard_SUITE.erl8
-rw-r--r--lib/compiler/test/map_SUITE.erl44
-rw-r--r--lib/compiler/test/misc_SUITE.erl7
-rw-r--r--lib/compiler/test/receive_SUITE.erl6
-rw-r--r--lib/crypto/c_src/crypto.c113
-rw-r--r--lib/debugger/src/dbg_debugged.erl5
-rw-r--r--lib/debugger/src/dbg_icmd.erl8
-rw-r--r--lib/debugger/src/dbg_iserver.erl17
-rw-r--r--lib/debugger/src/dbg_wx_break_win.erl34
-rw-r--r--lib/debugger/src/dbg_wx_code.erl10
-rw-r--r--lib/debugger/src/dbg_wx_filedialog_win.erl16
-rw-r--r--lib/debugger/src/dbg_wx_mon.erl4
-rw-r--r--lib/debugger/src/dbg_wx_mon_win.erl24
-rw-r--r--lib/debugger/src/dbg_wx_src_view.erl2
-rw-r--r--lib/debugger/src/dbg_wx_trace.erl2
-rw-r--r--lib/debugger/src/dbg_wx_trace_win.erl57
-rw-r--r--lib/debugger/src/dbg_wx_win.erl13
-rw-r--r--lib/debugger/src/dbg_wx_winman.erl4
-rw-r--r--lib/debugger/src/i.erl2
-rw-r--r--lib/debugger/src/int.erl24
-rw-r--r--lib/dialyzer/src/dialyzer_contracts.erl11
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl58
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy5
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl5
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/loopy.erl17
-rw-r--r--lib/dialyzer/test/user_SUITE_data/results/wpc_hlines3
-rw-r--r--lib/dialyzer/test/user_SUITE_data/src/wpc_hlines.erl22
-rw-r--r--lib/edoc/priv/edoc.dtd6
-rw-r--r--lib/edoc/src/edoc_layout.erl24
-rw-r--r--lib/edoc/src/edoc_parser.yrl17
-rw-r--r--lib/edoc/src/edoc_run.erl11
-rw-r--r--lib/edoc/src/edoc_scanner.erl2
-rw-r--r--lib/edoc/src/edoc_specs.erl6
-rw-r--r--lib/edoc/src/edoc_types.erl4
-rw-r--r--lib/edoc/src/edoc_types.hrl2
-rw-r--r--lib/eldap/test/eldap_basic_SUITE.erl132
-rw-r--r--lib/erl_docgen/priv/css/otp_doc.css5
-rw-r--r--lib/erl_docgen/priv/dtd/common.dtd7
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl107
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl12
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl26
-rw-r--r--lib/erl_docgen/src/docgen_otp_specs.erl38
-rw-r--r--lib/erl_interface/src/misc/ei_portio.h9
-rw-r--r--lib/et/src/et_collector.erl29
-rw-r--r--lib/et/src/et_wx_contents_viewer.erl109
-rw-r--r--lib/et/src/et_wx_viewer.erl136
-rw-r--r--lib/hipe/amd64/Makefile2
-rw-r--r--lib/hipe/arm/Makefile2
-rw-r--r--lib/hipe/cerl/Makefile2
-rw-r--r--lib/hipe/cerl/erl_types.erl59
-rw-r--r--lib/hipe/flow/Makefile2
-rw-r--r--lib/hipe/flow/cfg.hrl6
-rw-r--r--lib/hipe/flow/hipe_dominators.erl2
-rw-r--r--lib/hipe/icode/Makefile4
-rw-r--r--lib/hipe/icode/hipe_icode.erl14
-rw-r--r--lib/hipe/icode/hipe_icode.hrl2
-rw-r--r--lib/hipe/icode/hipe_icode_call_elim.erl78
-rw-r--r--lib/hipe/icode/hipe_icode_cfg.erl3
-rw-r--r--lib/hipe/icode/hipe_icode_range.erl156
-rw-r--r--lib/hipe/icode/hipe_icode_type.erl34
-rw-r--r--lib/hipe/llvm/Makefile19
-rw-r--r--lib/hipe/llvm/elf_format.erl654
-rw-r--r--lib/hipe/llvm/elf_format.hrl40
-rw-r--r--lib/hipe/llvm/hipe_llvm.erl98
-rw-r--r--lib/hipe/llvm/hipe_llvm_main.erl189
-rw-r--r--lib/hipe/llvm/hipe_rtl_to_llvm.erl45
-rw-r--r--lib/hipe/main/Makefile2
-rw-r--r--lib/hipe/main/hipe.app.src1
-rw-r--r--lib/hipe/main/hipe.erl80
-rw-r--r--lib/hipe/main/hipe.hrl.src40
-rw-r--r--lib/hipe/main/hipe_main.erl16
-rw-r--r--lib/hipe/misc/Makefile2
-rw-r--r--lib/hipe/misc/hipe_consttab.erl13
-rw-r--r--lib/hipe/misc/hipe_consttab.hrl2
-rw-r--r--lib/hipe/opt/Makefile2
-rw-r--r--lib/hipe/ppc/Makefile2
-rw-r--r--lib/hipe/regalloc/Makefile2
-rw-r--r--lib/hipe/rtl/Makefile2
-rw-r--r--lib/hipe/rtl/hipe_rtl.erl7
-rw-r--r--lib/hipe/rtl/hipe_rtl_arith.inc55
-rw-r--r--lib/hipe/rtl/hipe_rtl_binary_construct.erl478
-rw-r--r--lib/hipe/rtl/hipe_rtl_lcm.erl81
-rw-r--r--lib/hipe/rtl/hipe_rtl_ssapre.erl474
-rw-r--r--lib/hipe/sparc/Makefile2
-rw-r--r--lib/hipe/test/Makefile5
-rw-r--r--lib/hipe/test/hipe_testsuite_driver.erl24
-rw-r--r--lib/hipe/test/opt_verify_SUITE.erl62
-rw-r--r--lib/hipe/test/opt_verify_SUITE_data/call_elim_test.erl12
-rw-r--r--lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_no_opt_poss.erl32
-rw-r--r--lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_opt_poss.erl32
-rw-r--r--lib/hipe/tools/Makefile2
-rw-r--r--lib/hipe/util/Makefile2
-rw-r--r--lib/hipe/x86/Makefile2
-rw-r--r--lib/inets/src/ftp/ftp.erl26
-rw-r--r--lib/inets/src/ftp/ftp_response.erl1
-rw-r--r--lib/inets/test/Makefile3
-rw-r--r--lib/inets/test/ftp_SUITE.erl584
-rw-r--r--lib/inets/test/ftp_format_SUITE.erl111
-rw-r--r--lib/inets/test/ftp_suite_lib.erl1695
-rw-r--r--lib/inets/test/http_format_SUITE.erl8
-rw-r--r--lib/inets/test/httpc_SUITE.erl58
-rw-r--r--lib/inets/test/httpc_cookie_SUITE.erl369
-rw-r--r--lib/inets/test/httpc_proxy_SUITE.erl16
-rw-r--r--lib/inets/test/httpd_SUITE.erl331
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl33
-rw-r--r--lib/inets/test/httpd_block.erl2
-rw-r--r--lib/inets/test/httpd_load.erl5
-rw-r--r--lib/inets/test/httpd_mod.erl185
-rw-r--r--lib/inets/test/inets_SUITE.erl119
-rw-r--r--lib/inets/test/inets_app_test.erl245
-rw-r--r--lib/inets/test/inets_appup_test.erl71
-rw-r--r--lib/inets/test/inets_socketwrap_SUITE.erl6
-rw-r--r--lib/inets/test/inets_sup_SUITE.erl69
-rw-r--r--lib/inets/test/inets_test_lib.hrl88
-rw-r--r--lib/inets/test/old_httpd_SUITE.erl487
-rw-r--r--lib/kernel/doc/src/gen_tcp.xml23
-rw-r--r--lib/kernel/doc/src/gen_udp.xml21
-rw-r--r--lib/kernel/doc/src/heart.xml11
-rw-r--r--lib/kernel/doc/src/inet.xml60
-rw-r--r--lib/kernel/src/Makefile4
-rw-r--r--lib/kernel/src/gen_sctp.erl33
-rw-r--r--lib/kernel/src/gen_tcp.erl50
-rw-r--r--lib/kernel/src/gen_udp.erl46
-rw-r--r--lib/kernel/src/inet.erl196
-rw-r--r--lib/kernel/src/inet6_sctp.erl26
-rw-r--r--lib/kernel/src/inet6_tcp.erl88
-rw-r--r--lib/kernel/src/inet6_udp.erl42
-rw-r--r--lib/kernel/src/inet_int.hrl5
-rw-r--r--lib/kernel/src/inet_sctp.erl19
-rw-r--r--lib/kernel/src/inet_tcp.erl86
-rw-r--r--lib/kernel/src/inet_tcp_dist.erl6
-rw-r--r--lib/kernel/src/inet_udp.erl52
-rw-r--r--lib/kernel/src/kernel.app.src4
-rw-r--r--lib/kernel/src/local_tcp.erl178
-rw-r--r--lib/kernel/src/local_udp.erl106
-rw-r--r--lib/kernel/src/net_adm.erl3
-rw-r--r--lib/kernel/test/heart_SUITE.erl40
-rw-r--r--lib/kernel/test/inet_SUITE.erl117
-rw-r--r--lib/kernel/test/inet_res_SUITE.erl15
-rw-r--r--lib/kernel/test/init_SUITE.erl18
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl7
-rw-r--r--lib/megaco/src/app/megaco.appup.src29
-rw-r--r--lib/mnesia/src/mnesia_index.erl4
-rw-r--r--lib/mnesia/test/mnesia_dirty_access_test.erl56
-rw-r--r--lib/observer/doc/src/observer_ug.xml111
-rw-r--r--lib/observer/doc/src/ttb.xml56
-rw-r--r--lib/observer/src/Makefile1
-rw-r--r--lib/observer/src/crashdump_viewer.erl3
-rw-r--r--lib/observer/src/observer.app.src1
-rw-r--r--lib/observer/src/observer_app_wx.erl8
-rw-r--r--lib/observer/src/observer_port_wx.erl479
-rw-r--r--lib/observer/src/observer_pro_wx.erl61
-rw-r--r--lib/observer/src/observer_procinfo.erl2
-rw-r--r--lib/observer/src/observer_trace_wx.erl672
-rw-r--r--lib/observer/src/observer_traceoptions_wx.erl106
-rw-r--r--lib/observer/src/observer_tv_wx.erl34
-rw-r--r--lib/observer/src/observer_wx.erl40
-rw-r--r--lib/observer/src/ttb.erl51
-rw-r--r--lib/observer/test/observer_SUITE.erl26
-rw-r--r--lib/public_key/doc/src/Makefile11
-rw-r--r--lib/public_key/doc/src/public_key.xml33
-rw-r--r--lib/public_key/doc/src/public_key_app.xml85
-rw-r--r--lib/public_key/doc/src/ref_man.xml1
-rw-r--r--lib/public_key/src/pubkey_cert.erl4
-rw-r--r--lib/public_key/test/public_key_SUITE.erl23
-rw-r--r--lib/runtime_tools/c_src/dyntrace.c43
-rw-r--r--lib/runtime_tools/c_src/dyntrace_lttng.h50
-rw-r--r--lib/runtime_tools/doc/src/LTTng.xml148
-rw-r--r--lib/runtime_tools/doc/src/dbg.xml4
-rw-r--r--lib/runtime_tools/src/dbg.erl5
-rw-r--r--lib/runtime_tools/src/dyntrace.erl38
-rw-r--r--lib/runtime_tools/src/observer_backend.erl12
-rw-r--r--lib/runtime_tools/test/dbg_SUITE.erl10
-rw-r--r--lib/runtime_tools/test/dbg_SUITE_data/dbg_SUITE.c4
-rw-r--r--lib/runtime_tools/test/dyntrace_lttng_SUITE.erl146
-rw-r--r--lib/sasl/src/sasl.app.src4
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl2
-rw-r--r--lib/ssh/doc/src/ssh.xml20
-rw-r--r--lib/ssh/doc/src/ssh_sftp.xml15
-rw-r--r--lib/ssh/src/ssh.erl237
-rw-r--r--lib/ssh/src/ssh_acceptor.erl3
-rw-r--r--lib/ssh/src/ssh_acceptor_sup.erl2
-rw-r--r--lib/ssh/src/ssh_channel_sup.erl2
-rw-r--r--lib/ssh/src/ssh_cli.erl15
-rw-r--r--lib/ssh/src/ssh_client_key_api.erl24
-rw-r--r--lib/ssh/src/ssh_connection_sup.erl2
-rw-r--r--lib/ssh/src/ssh_file.erl23
-rw-r--r--lib/ssh/src/ssh_message.erl10
-rw-r--r--lib/ssh/src/ssh_server_key_api.erl15
-rw-r--r--lib/ssh/src/ssh_sftp.erl23
-rw-r--r--lib/ssh/src/ssh_sftpd.erl16
-rw-r--r--lib/ssh/src/ssh_shell.erl15
-rw-r--r--lib/ssh/src/ssh_subsystem_sup.erl2
-rw-r--r--lib/ssh/src/ssh_sup.erl2
-rw-r--r--lib/ssh/src/ssh_system_sup.erl7
-rw-r--r--lib/ssh/src/sshc_sup.erl2
-rw-r--r--lib/ssh/src/sshd_sup.erl2
-rw-r--r--lib/ssh/test/ssh_algorithms_SUITE.erl126
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl181
-rw-r--r--lib/ssh/test/ssh_benchmark_SUITE.erl45
-rw-r--r--lib/ssh/test/ssh_connection_SUITE.erl306
-rw-r--r--lib/ssh/test/ssh_echo_server.erl35
-rw-r--r--lib/ssh/test/ssh_options_SUITE.erl82
-rw-r--r--lib/ssh/test/ssh_property_test_SUITE.erl2
-rw-r--r--lib/ssh/test/ssh_protocol_SUITE.erl17
-rw-r--r--lib/ssh/test/ssh_renegotiate_SUITE.erl15
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE.erl393
-rw-r--r--lib/ssh/test/ssh_sftpd_SUITE.erl102
-rw-r--r--lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl64
-rw-r--r--lib/ssh/test/ssh_sup_SUITE.erl41
-rw-r--r--lib/ssh/test/ssh_test_lib.erl61
-rw-r--r--lib/ssh/test/ssh_test_lib.hrl10
-rw-r--r--lib/ssh/test/ssh_to_openssh_SUITE.erl29
-rw-r--r--lib/ssh/test/ssh_upgrade_SUITE.erl23
-rw-r--r--lib/ssl/doc/src/ssl.xml41
-rw-r--r--lib/ssl/doc/src/ssl_app.xml27
-rw-r--r--lib/ssl/doc/src/ssl_distribution.xml11
-rw-r--r--lib/ssl/src/dtls_connection.erl3
-rw-r--r--lib/ssl/src/inet_tls_dist.erl3
-rw-r--r--lib/ssl/src/ssl.app.src2
-rw-r--r--lib/ssl/src/ssl.erl81
-rw-r--r--lib/ssl/src/ssl_alert.erl14
-rw-r--r--lib/ssl/src/ssl_alert.hrl4
-rw-r--r--lib/ssl/src/ssl_cipher.erl8
-rw-r--r--lib/ssl/src/ssl_connection.erl32
-rw-r--r--lib/ssl/src/ssl_crl.erl16
-rw-r--r--lib/ssl/src/ssl_handshake.erl101
-rw-r--r--lib/ssl/src/ssl_handshake.hrl3
-rw-r--r--lib/ssl/src/ssl_internal.hrl6
-rw-r--r--lib/ssl/src/ssl_manager.erl11
-rw-r--r--lib/ssl/src/ssl_record.erl43
-rw-r--r--lib/ssl/src/ssl_record.hrl4
-rw-r--r--lib/ssl/src/ssl_socket.erl7
-rw-r--r--lib/ssl/src/ssl_tls_dist_proxy.erl33
-rw-r--r--lib/ssl/src/tls_connection.erl101
-rw-r--r--lib/ssl/src/tls_handshake.erl50
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE.erl10
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl176
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl273
-rw-r--r--lib/ssl/test/ssl_handshake_SUITE.erl3
-rw-r--r--lib/ssl/test/ssl_npn_hello_SUITE.erl8
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl2
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl2
-rw-r--r--lib/ssl/test/ssl_test_lib.erl13
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl18
-rw-r--r--lib/stdlib/src/beam_lib.erl2
-rw-r--r--lib/stdlib/src/erl_compile.erl1
-rw-r--r--lib/stdlib/src/escript.erl1
-rw-r--r--lib/stdlib/src/proc_lib.erl14
-rw-r--r--lib/stdlib/src/stdlib.app.src2
-rw-r--r--lib/stdlib/src/supervisor.erl33
-rw-r--r--lib/stdlib/test/binary_module_SUITE.erl29
-rw-r--r--lib/stdlib/test/ets_SUITE.erl56
-rw-r--r--lib/stdlib/test/gen_server_SUITE.erl4
-rw-r--r--lib/stdlib/test/id_transform_SUITE.erl9
-rw-r--r--lib/stdlib/test/io_SUITE.erl44
-rw-r--r--lib/stdlib/test/io_proto_SUITE.erl3
-rw-r--r--lib/stdlib/test/rand_SUITE.erl28
-rw-r--r--lib/stdlib/test/select_SUITE.erl30
-rw-r--r--lib/stdlib/test/supervisor_SUITE.erl12
-rw-r--r--lib/stdlib/test/unicode_SUITE.erl24
-rw-r--r--lib/wx/api_gen/gl_gen_erl.erl2
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl10
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl40
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl10
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp81
-rw-r--r--lib/wx/c_src/wxe_impl.cpp17
-rw-r--r--lib/wx/c_src/wxe_memory.h5
-rw-r--r--lib/wx/examples/demo/ex_graphicsContext.erl2
-rw-r--r--lib/wx/include/wx.hrl450
-rw-r--r--lib/wx/src/gen/gl.erl1548
-rw-r--r--lib/wx/src/gen/glu.erl28
-rw-r--r--lib/wx/src/gen/wxAcceleratorEntry.erl16
-rw-r--r--lib/wx/src/gen/wxAcceleratorTable.erl4
-rw-r--r--lib/wx/src/gen/wxArtProvider.erl8
-rw-r--r--lib/wx/src/gen/wxAuiDockArt.erl8
-rw-r--r--lib/wx/src/gen/wxAuiManager.erl34
-rw-r--r--lib/wx/src/gen/wxAuiManagerEvent.erl18
-rw-r--r--lib/wx/src/gen/wxAuiNotebook.erl32
-rw-r--r--lib/wx/src/gen/wxAuiNotebookEvent.erl6
-rw-r--r--lib/wx/src/gen/wxAuiPaneInfo.erl42
-rw-r--r--lib/wx/src/gen/wxAuiSimpleTabArt.erl4
-rw-r--r--lib/wx/src/gen/wxAuiTabArt.erl14
-rw-r--r--lib/wx/src/gen/wxBitmap.erl32
-rw-r--r--lib/wx/src/gen/wxBitmapButton.erl26
-rw-r--r--lib/wx/src/gen/wxBitmapDataObject.erl6
-rw-r--r--lib/wx/src/gen/wxBoxSizer.erl2
-rw-r--r--lib/wx/src/gen/wxBrush.erl12
-rw-r--r--lib/wx/src/gen/wxBufferedDC.erl32
-rw-r--r--lib/wx/src/gen/wxBufferedPaintDC.erl8
-rw-r--r--lib/wx/src/gen/wxButton.erl26
-rw-r--r--lib/wx/src/gen/wxCalendarCtrl.erl48
-rw-r--r--lib/wx/src/gen/wxCalendarDateAttr.erl32
-rw-r--r--lib/wx/src/gen/wxCaret.erl20
-rw-r--r--lib/wx/src/gen/wxCheckBox.erl22
-rw-r--r--lib/wx/src/gen/wxCheckListBox.erl18
-rw-r--r--lib/wx/src/gen/wxChoice.erl24
-rw-r--r--lib/wx/src/gen/wxChoicebook.erl34
-rw-r--r--lib/wx/src/gen/wxClientDC.erl2
-rw-r--r--lib/wx/src/gen/wxClipboard.erl12
-rw-r--r--lib/wx/src/gen/wxCloseEvent.erl10
-rw-r--r--lib/wx/src/gen/wxColourData.erl8
-rw-r--r--lib/wx/src/gen/wxColourDialog.erl6
-rw-r--r--lib/wx/src/gen/wxColourPickerCtrl.erl26
-rw-r--r--lib/wx/src/gen/wxComboBox.erl42
-rw-r--r--lib/wx/src/gen/wxCommandEvent.erl4
-rw-r--r--lib/wx/src/gen/wxContextMenuEvent.erl2
-rw-r--r--lib/wx/src/gen/wxControl.erl2
-rw-r--r--lib/wx/src/gen/wxControlWithItems.erl16
-rw-r--r--lib/wx/src/gen/wxCursor.erl6
-rw-r--r--lib/wx/src/gen/wxDC.erl138
-rw-r--r--lib/wx/src/gen/wxDCOverlay.erl6
-rw-r--r--lib/wx/src/gen/wxDatePickerCtrl.erl16
-rw-r--r--lib/wx/src/gen/wxDialog.erl22
-rw-r--r--lib/wx/src/gen/wxDirDialog.erl16
-rw-r--r--lib/wx/src/gen/wxDirPickerCtrl.erl28
-rw-r--r--lib/wx/src/gen/wxEvent.erl8
-rw-r--r--lib/wx/src/gen/wxEvtHandler.erl10
-rw-r--r--lib/wx/src/gen/wxFileDataObject.erl4
-rw-r--r--lib/wx/src/gen/wxFileDialog.erl28
-rw-r--r--lib/wx/src/gen/wxFilePickerCtrl.erl32
-rw-r--r--lib/wx/src/gen/wxFindReplaceData.erl8
-rw-r--r--lib/wx/src/gen/wxFindReplaceDialog.erl6
-rw-r--r--lib/wx/src/gen/wxFlexGridSizer.erl26
-rw-r--r--lib/wx/src/gen/wxFont.erl20
-rw-r--r--lib/wx/src/gen/wxFontData.erl16
-rw-r--r--lib/wx/src/gen/wxFontDialog.erl2
-rw-r--r--lib/wx/src/gen/wxFontPickerCtrl.erl26
-rw-r--r--lib/wx/src/gen/wxFrame.erl42
-rw-r--r--lib/wx/src/gen/wxGLCanvas.erl48
-rw-r--r--lib/wx/src/gen/wxGauge.erl24
-rw-r--r--lib/wx/src/gen/wxGenericDirCtrl.erl44
-rw-r--r--lib/wx/src/gen/wxGraphicsContext.erl84
-rw-r--r--lib/wx/src/gen/wxGraphicsMatrix.erl26
-rw-r--r--lib/wx/src/gen/wxGraphicsObject.erl2
-rw-r--r--lib/wx/src/gen/wxGraphicsPath.erl40
-rw-r--r--lib/wx/src/gen/wxGraphicsRenderer.erl14
-rw-r--r--lib/wx/src/gen/wxGrid.erl308
-rw-r--r--lib/wx/src/gen/wxGridBagSizer.erl70
-rw-r--r--lib/wx/src/gen/wxGridCellAttr.erl20
-rw-r--r--lib/wx/src/gen/wxGridCellBoolEditor.erl10
-rw-r--r--lib/wx/src/gen/wxGridCellBoolRenderer.erl2
-rw-r--r--lib/wx/src/gen/wxGridCellChoiceEditor.erl6
-rw-r--r--lib/wx/src/gen/wxGridCellEditor.erl22
-rw-r--r--lib/wx/src/gen/wxGridCellFloatEditor.erl8
-rw-r--r--lib/wx/src/gen/wxGridCellFloatRenderer.erl12
-rw-r--r--lib/wx/src/gen/wxGridCellNumberEditor.erl8
-rw-r--r--lib/wx/src/gen/wxGridCellNumberRenderer.erl2
-rw-r--r--lib/wx/src/gen/wxGridCellRenderer.erl2
-rw-r--r--lib/wx/src/gen/wxGridCellStringRenderer.erl2
-rw-r--r--lib/wx/src/gen/wxGridCellTextEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridSizer.erl14
-rw-r--r--lib/wx/src/gen/wxHelpEvent.erl4
-rw-r--r--lib/wx/src/gen/wxHtmlEasyPrinting.erl30
-rw-r--r--lib/wx/src/gen/wxHtmlWindow.erl30
-rw-r--r--lib/wx/src/gen/wxIcon.erl10
-rw-r--r--lib/wx/src/gen/wxIconBundle.erl8
-rw-r--r--lib/wx/src/gen/wxIdleEvent.erl8
-rw-r--r--lib/wx/src/gen/wxImage.erl132
-rw-r--r--lib/wx/src/gen/wxImageList.erl14
-rw-r--r--lib/wx/src/gen/wxJoystickEvent.erl6
-rw-r--r--lib/wx/src/gen/wxLayoutAlgorithm.erl8
-rw-r--r--lib/wx/src/gen/wxListBox.erl28
-rw-r--r--lib/wx/src/gen/wxListCtrl.erl50
-rw-r--r--lib/wx/src/gen/wxListItem.erl28
-rw-r--r--lib/wx/src/gen/wxListItemAttr.erl8
-rw-r--r--lib/wx/src/gen/wxListView.erl12
-rw-r--r--lib/wx/src/gen/wxListbook.erl34
-rw-r--r--lib/wx/src/gen/wxLocale.erl16
-rw-r--r--lib/wx/src/gen/wxLogNull.erl2
-rw-r--r--lib/wx/src/gen/wxMDIChildFrame.erl24
-rw-r--r--lib/wx/src/gen/wxMDIClientWindow.erl6
-rw-r--r--lib/wx/src/gen/wxMDIParentFrame.erl28
-rw-r--r--lib/wx/src/gen/wxMask.erl2
-rw-r--r--lib/wx/src/gen/wxMemoryDC.erl6
-rw-r--r--lib/wx/src/gen/wxMenu.erl68
-rw-r--r--lib/wx/src/gen/wxMenuBar.erl18
-rw-r--r--lib/wx/src/gen/wxMenuItem.erl36
-rw-r--r--lib/wx/src/gen/wxMessageDialog.erl8
-rw-r--r--lib/wx/src/gen/wxMiniFrame.erl14
-rw-r--r--lib/wx/src/gen/wxMirrorDC.erl2
-rw-r--r--lib/wx/src/gen/wxMouseEvent.erl6
-rw-r--r--lib/wx/src/gen/wxMultiChoiceDialog.erl8
-rw-r--r--lib/wx/src/gen/wxNavigationKeyEvent.erl8
-rw-r--r--lib/wx/src/gen/wxNotebook.erl36
-rw-r--r--lib/wx/src/gen/wxNotebookEvent.erl4
-rw-r--r--lib/wx/src/gen/wxNotifyEvent.erl4
-rw-r--r--lib/wx/src/gen/wxOverlay.erl6
-rw-r--r--lib/wx/src/gen/wxPageSetupDialog.erl4
-rw-r--r--lib/wx/src/gen/wxPageSetupDialogData.erl34
-rw-r--r--lib/wx/src/gen/wxPaintDC.erl2
-rw-r--r--lib/wx/src/gen/wxPalette.erl2
-rw-r--r--lib/wx/src/gen/wxPaletteChangedEvent.erl2
-rw-r--r--lib/wx/src/gen/wxPanel.erl16
-rw-r--r--lib/wx/src/gen/wxPasswordEntryDialog.erl10
-rw-r--r--lib/wx/src/gen/wxPen.erl18
-rw-r--r--lib/wx/src/gen/wxPickerBase.erl18
-rw-r--r--lib/wx/src/gen/wxPopupTransientWindow.erl12
-rw-r--r--lib/wx/src/gen/wxPopupWindow.erl8
-rw-r--r--lib/wx/src/gen/wxPostScriptDC.erl4
-rw-r--r--lib/wx/src/gen/wxPreviewControlBar.erl12
-rw-r--r--lib/wx/src/gen/wxPreviewFrame.erl18
-rw-r--r--lib/wx/src/gen/wxPrintData.erl20
-rw-r--r--lib/wx/src/gen/wxPrintDialog.erl4
-rw-r--r--lib/wx/src/gen/wxPrintDialogData.erl28
-rw-r--r--lib/wx/src/gen/wxPrintPreview.erl14
-rw-r--r--lib/wx/src/gen/wxPrinter.erl8
-rw-r--r--lib/wx/src/gen/wxPrintout.erl20
-rw-r--r--lib/wx/src/gen/wxProgressDialog.erl14
-rw-r--r--lib/wx/src/gen/wxQueryNewPaletteEvent.erl2
-rw-r--r--lib/wx/src/gen/wxRadioBox.erl32
-rw-r--r--lib/wx/src/gen/wxRadioButton.erl20
-rw-r--r--lib/wx/src/gen/wxRegion.erl6
-rw-r--r--lib/wx/src/gen/wxSashLayoutWindow.erl24
-rw-r--r--lib/wx/src/gen/wxSashWindow.erl20
-rw-r--r--lib/wx/src/gen/wxScreenDC.erl2
-rw-r--r--lib/wx/src/gen/wxScrollBar.erl26
-rw-r--r--lib/wx/src/gen/wxScrolledWindow.erl32
-rw-r--r--lib/wx/src/gen/wxSetCursorEvent.erl2
-rw-r--r--lib/wx/src/gen/wxShowEvent.erl2
-rw-r--r--lib/wx/src/gen/wxSingleChoiceDialog.erl8
-rw-r--r--lib/wx/src/gen/wxSizer.erl120
-rw-r--r--lib/wx/src/gen/wxSizerFlags.erl6
-rw-r--r--lib/wx/src/gen/wxSizerItem.erl38
-rw-r--r--lib/wx/src/gen/wxSlider.erl28
-rw-r--r--lib/wx/src/gen/wxSpinButton.erl22
-rw-r--r--lib/wx/src/gen/wxSpinCtrl.erl44
-rw-r--r--lib/wx/src/gen/wxSpinEvent.erl2
-rw-r--r--lib/wx/src/gen/wxSplashScreen.erl8
-rw-r--r--lib/wx/src/gen/wxSplitterEvent.erl2
-rw-r--r--lib/wx/src/gen/wxSplitterWindow.erl42
-rw-r--r--lib/wx/src/gen/wxStaticBitmap.erl16
-rw-r--r--lib/wx/src/gen/wxStaticBox.erl14
-rw-r--r--lib/wx/src/gen/wxStaticBoxSizer.erl4
-rw-r--r--lib/wx/src/gen/wxStaticLine.erl18
-rw-r--r--lib/wx/src/gen/wxStaticText.erl18
-rw-r--r--lib/wx/src/gen/wxStatusBar.erl42
-rw-r--r--lib/wx/src/gen/wxStdDialogButtonSizer.erl12
-rw-r--r--lib/wx/src/gen/wxStyledTextCtrl.erl598
-rw-r--r--lib/wx/src/gen/wxSystemOptions.erl6
-rw-r--r--lib/wx/src/gen/wxSystemSettings.erl2
-rw-r--r--lib/wx/src/gen/wxTaskBarIcon.erl4
-rw-r--r--lib/wx/src/gen/wxTextAttr.erl32
-rw-r--r--lib/wx/src/gen/wxTextCtrl.erl68
-rw-r--r--lib/wx/src/gen/wxTextDataObject.erl6
-rw-r--r--lib/wx/src/gen/wxTextEntryDialog.erl12
-rw-r--r--lib/wx/src/gen/wxToggleButton.erl20
-rw-r--r--lib/wx/src/gen/wxToolBar.erl118
-rw-r--r--lib/wx/src/gen/wxToolTip.erl8
-rw-r--r--lib/wx/src/gen/wxToolbook.erl34
-rw-r--r--lib/wx/src/gen/wxTopLevelWindow.erl38
-rw-r--r--lib/wx/src/gen/wxTreeCtrl.erl132
-rw-r--r--lib/wx/src/gen/wxTreeEvent.erl2
-rw-r--r--lib/wx/src/gen/wxTreebook.erl40
-rw-r--r--lib/wx/src/gen/wxUpdateUIEvent.erl14
-rw-r--r--lib/wx/src/gen/wxWindow.erl290
-rw-r--r--lib/wx/src/gen/wxWindowDC.erl2
-rw-r--r--lib/wx/src/gen/wxXmlResource.erl20
-rw-r--r--lib/wx/src/gen/wx_misc.erl18
-rw-r--r--lib/wx/src/wx.erl20
-rw-r--r--lib/wx/src/wx_object.erl40
-rw-r--r--lib/wx/src/wxe_master.erl4
-rw-r--r--lib/wx/src/wxe_util.erl8
-rw-r--r--lib/wx/test/wx_basic_SUITE.erl4
-rw-r--r--make/emd2exml.in37
-rw-r--r--make/otp_release_targets.mk2
-rwxr-xr-xotp_build3
-rw-r--r--system/doc/design_principles/sup_princ.xml5
-rw-r--r--system/doc/efficiency_guide/advanced.xml18
-rw-r--r--system/doc/system_principles/create_target.xmlsrc12
-rw-r--r--system/doc/system_principles/versions.xml4
-rw-r--r--system/doc/top/Makefile1
616 files changed, 15376 insertions, 12570 deletions
diff --git a/HOWTO/INSTALL-CROSS.md b/HOWTO/INSTALL-CROSS.md
index 0c984a825d..29614966b8 100644
--- a/HOWTO/INSTALL-CROSS.md
+++ b/HOWTO/INSTALL-CROSS.md
@@ -286,6 +286,7 @@ document for information on how to build the documentation.
Testing the cross compiled system
---------------------------------
+
Some of the tests that come with erlang use native code to test. This means
that when cross compiling erlang you also have to cross compile test suites
in order to run tests on the target host. To do this you first have to release
diff --git a/HOWTO/INSTALL-WIN32.md b/HOWTO/INSTALL-WIN32.md
index 067c939d7a..d7be255e9f 100644
--- a/HOWTO/INSTALL-WIN32.md
+++ b/HOWTO/INSTALL-WIN32.md
@@ -60,7 +60,8 @@ followed by some FAQ, and then we’ll go into more details of the setup.
Short Version
---------------------------
+-------------
+
In the following sections, we've described as much as we could about the
installation of the tools needed. Once the tools are installed, building
is quite easy. We have also tried to make these instructions understandable
diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md
index 2ae1ed3c8d..8632f46264 100644
--- a/HOWTO/INSTALL.md
+++ b/HOWTO/INSTALL.md
@@ -824,6 +824,7 @@ Known platform issues
Daily Build and Test
--------------------
+
At Ericsson we have a "Daily Build and Test" that runs on:
* Solaris 8, 9
diff --git a/HOWTO/MARKDOWN.md b/HOWTO/MARKDOWN.md
index 2df0460dab..e6773a0a8e 100644
--- a/HOWTO/MARKDOWN.md
+++ b/HOWTO/MARKDOWN.md
@@ -70,6 +70,9 @@ in the future.
* Lists aren't supported inside block quotes.
+* Nested block quotes can be generated, but current DTD does not
+ support it.
+
* Link and image definition names *are* case sensitive.
#### Additional Features ####
@@ -126,7 +129,7 @@ places. Appropriate attributes to the `X` tag will also be generated.
<icaption>...</icaption> </image>` sequence where the "title" will be
placed between `<icaption>` and `</icaption>`.
-* Block quotes generate `<blockquote>` tags.
+* Block quotes generate `<quote>` tags.
* If the first line of a top level block quote begins with a `> *NOTE*:`
character sequence, a `<note>` tag will be generated instead of a
@@ -152,7 +155,7 @@ places. Appropriate attributes to the `X` tag will also be generated.
* Emphasis (single `*` or `_`) will generate `<em>` tags.
-* Strong emphasis (double `*` or `_`) will generate `<b>` tags.
+* Strong emphasis (double `*` or `_`) will generate `<strong>` tags.
* The level 1 heading will cause the following to be generated:
@@ -180,11 +183,11 @@ places. Appropriate attributes to the `X` tag will also be generated.
contain information from a \%CopyrightBegin\%, \%CopyrightEnd\% block
if such exist (see below).
-* A level `X` heading where `1 < X <= 3` will cause the the following
+* A level `X` heading where `1 < X <= 6` will cause the the following
to be generated:
- <marker id="..."/>
<section>
+ <marker id="..."/>
<title>...</title>
...
</section>
@@ -206,11 +209,11 @@ places. Appropriate attributes to the `X` tag will also be generated.
other documents. That is, *be careful* when changing headings in an
existing document.
-* A level `X` heading where `3 < X` will cause the the following
+* A level `X` heading where `6 < X` will cause the the following
to be generated:
<marker id="..."/>
- <p><b>...</b></p>
+ <p><strong>...</strong></p>
...
Current DTD:s used don't support deeper levels of sections, and we
diff --git a/bootstrap/bin/start.boot b/bootstrap/bin/start.boot
index cc0edd5427..ef962190a4 100644
--- a/bootstrap/bin/start.boot
+++ b/bootstrap/bin/start.boot
Binary files differ
diff --git a/bootstrap/bin/start_clean.boot b/bootstrap/bin/start_clean.boot
index cc0edd5427..ef962190a4 100644
--- a/bootstrap/bin/start_clean.boot
+++ b/bootstrap/bin/start_clean.boot
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_block.beam b/bootstrap/lib/compiler/ebin/beam_block.beam
index cccf21d9ab..ea91a62b56 100644
--- a/bootstrap/lib/compiler/ebin/beam_block.beam
+++ b/bootstrap/lib/compiler/ebin/beam_block.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_dead.beam b/bootstrap/lib/compiler/ebin/beam_dead.beam
index 4fda5157fa..d2dc2f7688 100644
--- a/bootstrap/lib/compiler/ebin/beam_dead.beam
+++ b/bootstrap/lib/compiler/ebin/beam_dead.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_disasm.beam b/bootstrap/lib/compiler/ebin/beam_disasm.beam
index 477ab0a957..3b74bc6e3e 100644
--- a/bootstrap/lib/compiler/ebin/beam_disasm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_disasm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_except.beam b/bootstrap/lib/compiler/ebin/beam_except.beam
index e5d2c51c4d..03fc2edd02 100644
--- a/bootstrap/lib/compiler/ebin/beam_except.beam
+++ b/bootstrap/lib/compiler/ebin/beam_except.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_jump.beam b/bootstrap/lib/compiler/ebin/beam_jump.beam
index 7382cafb48..2d1961570f 100644
--- a/bootstrap/lib/compiler/ebin/beam_jump.beam
+++ b/bootstrap/lib/compiler/ebin/beam_jump.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_receive.beam b/bootstrap/lib/compiler/ebin/beam_receive.beam
index fef3fcc816..f864c15ae1 100644
--- a/bootstrap/lib/compiler/ebin/beam_receive.beam
+++ b/bootstrap/lib/compiler/ebin/beam_receive.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_utils.beam b/bootstrap/lib/compiler/ebin/beam_utils.beam
index 664140540c..25cd7ce430 100644
--- a/bootstrap/lib/compiler/ebin/beam_utils.beam
+++ b/bootstrap/lib/compiler/ebin/beam_utils.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_validator.beam b/bootstrap/lib/compiler/ebin/beam_validator.beam
index a3fced0154..fcb2202d2a 100644
--- a/bootstrap/lib/compiler/ebin/beam_validator.beam
+++ b/bootstrap/lib/compiler/ebin/beam_validator.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/rec_env.beam b/bootstrap/lib/compiler/ebin/rec_env.beam
index a7c78175c3..068108dab2 100644
--- a/bootstrap/lib/compiler/ebin/rec_env.beam
+++ b/bootstrap/lib/compiler/ebin/rec_env.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_core_fold.beam b/bootstrap/lib/compiler/ebin/sys_core_fold.beam
index 7d01ed81d5..68cc4e3ff3 100644
--- a/bootstrap/lib/compiler/ebin/sys_core_fold.beam
+++ b/bootstrap/lib/compiler/ebin/sys_core_fold.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_codegen.beam b/bootstrap/lib/compiler/ebin/v3_codegen.beam
index 0923d4e678..6afb674a9f 100644
--- a/bootstrap/lib/compiler/ebin/v3_codegen.beam
+++ b/bootstrap/lib/compiler/ebin/v3_codegen.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_core.beam b/bootstrap/lib/compiler/ebin/v3_core.beam
index 110d376a0a..e8e120e145 100644
--- a/bootstrap/lib/compiler/ebin/v3_core.beam
+++ b/bootstrap/lib/compiler/ebin/v3_core.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_life.beam b/bootstrap/lib/compiler/ebin/v3_life.beam
index d8822f929f..b220e475ee 100644
--- a/bootstrap/lib/compiler/ebin/v3_life.beam
+++ b/bootstrap/lib/compiler/ebin/v3_life.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/gen_sctp.beam b/bootstrap/lib/kernel/ebin/gen_sctp.beam
index fe2ff17ff1..fca569c779 100644
--- a/bootstrap/lib/kernel/ebin/gen_sctp.beam
+++ b/bootstrap/lib/kernel/ebin/gen_sctp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/gen_tcp.beam b/bootstrap/lib/kernel/ebin/gen_tcp.beam
index e40f1f2e45..cf4757a568 100644
--- a/bootstrap/lib/kernel/ebin/gen_tcp.beam
+++ b/bootstrap/lib/kernel/ebin/gen_tcp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/gen_udp.beam b/bootstrap/lib/kernel/ebin/gen_udp.beam
index ec4eda12f7..fec430304e 100644
--- a/bootstrap/lib/kernel/ebin/gen_udp.beam
+++ b/bootstrap/lib/kernel/ebin/gen_udp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet.beam b/bootstrap/lib/kernel/ebin/inet.beam
index 8cfdf389ad..8eaf2fbe74 100644
--- a/bootstrap/lib/kernel/ebin/inet.beam
+++ b/bootstrap/lib/kernel/ebin/inet.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet6_sctp.beam b/bootstrap/lib/kernel/ebin/inet6_sctp.beam
index 5c827589bd..c3aac09fbe 100644
--- a/bootstrap/lib/kernel/ebin/inet6_sctp.beam
+++ b/bootstrap/lib/kernel/ebin/inet6_sctp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet6_tcp.beam b/bootstrap/lib/kernel/ebin/inet6_tcp.beam
index f1ab2912bb..80e8e389a2 100644
--- a/bootstrap/lib/kernel/ebin/inet6_tcp.beam
+++ b/bootstrap/lib/kernel/ebin/inet6_tcp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet6_udp.beam b/bootstrap/lib/kernel/ebin/inet6_udp.beam
index 2eb8c09701..39b9f0343b 100644
--- a/bootstrap/lib/kernel/ebin/inet6_udp.beam
+++ b/bootstrap/lib/kernel/ebin/inet6_udp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_sctp.beam b/bootstrap/lib/kernel/ebin/inet_sctp.beam
index 835c7b2928..e2f574b514 100644
--- a/bootstrap/lib/kernel/ebin/inet_sctp.beam
+++ b/bootstrap/lib/kernel/ebin/inet_sctp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_tcp.beam b/bootstrap/lib/kernel/ebin/inet_tcp.beam
index 698a94770b..d0c9f09f6f 100644
--- a/bootstrap/lib/kernel/ebin/inet_tcp.beam
+++ b/bootstrap/lib/kernel/ebin/inet_tcp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_tcp_dist.beam b/bootstrap/lib/kernel/ebin/inet_tcp_dist.beam
index 59cb7ce40e..d06bdf709a 100644
--- a/bootstrap/lib/kernel/ebin/inet_tcp_dist.beam
+++ b/bootstrap/lib/kernel/ebin/inet_tcp_dist.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_udp.beam b/bootstrap/lib/kernel/ebin/inet_udp.beam
index 6876ba3892..11eb4f840f 100644
--- a/bootstrap/lib/kernel/ebin/inet_udp.beam
+++ b/bootstrap/lib/kernel/ebin/inet_udp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/kernel.app b/bootstrap/lib/kernel/ebin/kernel.app
index 8e00bc4a45..a4600713e5 100644
--- a/bootstrap/lib/kernel/ebin/kernel.app
+++ b/bootstrap/lib/kernel/ebin/kernel.app
@@ -55,6 +55,8 @@
inet_tcp_dist,
kernel,
kernel_config,
+ local_tcp,
+ local_udp,
net,
net_adm,
net_kernel,
@@ -116,6 +118,6 @@
{applications, []},
{env, [{error_logger, tty}]},
{mod, {kernel, []}},
- {runtime_dependencies, ["erts-8.0", "stdlib-2.6", "sasl-2.6"]}
+ {runtime_dependencies, ["erts-8.0", "stdlib-3.0", "sasl-3.0"]}
]
}.
diff --git a/bootstrap/lib/kernel/ebin/local_tcp.beam b/bootstrap/lib/kernel/ebin/local_tcp.beam
new file mode 100644
index 0000000000..153aad2936
--- /dev/null
+++ b/bootstrap/lib/kernel/ebin/local_tcp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/local_udp.beam b/bootstrap/lib/kernel/ebin/local_udp.beam
new file mode 100644
index 0000000000..29c9b01faa
--- /dev/null
+++ b/bootstrap/lib/kernel/ebin/local_udp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/net_adm.beam b/bootstrap/lib/kernel/ebin/net_adm.beam
index 00772b61ff..60f51602b3 100644
--- a/bootstrap/lib/kernel/ebin/net_adm.beam
+++ b/bootstrap/lib/kernel/ebin/net_adm.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/proc_lib.beam b/bootstrap/lib/stdlib/ebin/proc_lib.beam
index d3249b120e..59627fb4df 100644
--- a/bootstrap/lib/stdlib/ebin/proc_lib.beam
+++ b/bootstrap/lib/stdlib/ebin/proc_lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/stdlib.app b/bootstrap/lib/stdlib/ebin/stdlib.app
index 4c8f196620..ceb55c66fc 100644
--- a/bootstrap/lib/stdlib/ebin/stdlib.app
+++ b/bootstrap/lib/stdlib/ebin/stdlib.app
@@ -106,7 +106,7 @@
dets]},
{applications, [kernel]},
{env, []},
- {runtime_dependencies, ["sasl-2.6","kernel-4.1","erts-7.3","crypto-3.3",
+ {runtime_dependencies, ["sasl-3.0","kernel-5.0","erts-8.0","crypto-3.3",
"compiler-5.0"]}
]}.
diff --git a/bootstrap/lib/stdlib/ebin/supervisor.beam b/bootstrap/lib/stdlib/ebin/supervisor.beam
index d30b4a037b..ba6a64d594 100644
--- a/bootstrap/lib/stdlib/ebin/supervisor.beam
+++ b/bootstrap/lib/stdlib/ebin/supervisor.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/zip.beam b/bootstrap/lib/stdlib/ebin/zip.beam
index 1a19b1f28a..6ef3732965 100644
--- a/bootstrap/lib/stdlib/ebin/zip.beam
+++ b/bootstrap/lib/stdlib/ebin/zip.beam
Binary files differ
diff --git a/erts/configure.in b/erts/configure.in
index a34dfc6dbd..81ecad4f51 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2116,7 +2116,7 @@ fi
dnl Need by run_erl.
AC_CHECK_FUNCS([openpty])
-AC_CHECK_HEADERS(net/if_dl.h ifaddrs.h netpacket/packet.h)
+AC_CHECK_HEADERS(net/if_dl.h ifaddrs.h netpacket/packet.h sys/un.h)
AC_CHECK_FUNCS([getifaddrs])
dnl Checks for variables in6addr_any and in6addr_loopback,
@@ -3858,15 +3858,15 @@ if test "$enable_lttng_test" = "yes" ; then
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <lttng/tracepoint.h>
- #define TRACEPOINT_PROVIDER com_ericsson_otp
+ #define TRACEPOINT_PROVIDER org_erlang_otp
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
dummy,
TP_ARGS(int, my_int),
TP_FIELDS(ctf_integer(int, my_int, my_int)))
#define TRACEPOINT_CREATE_PROBES
#define TRACEPOINT_DEFINE],
- [if(tracepoint_enabled(com_ericsson_otp,dummy)) do {} while(0)])],
+ [if(tracepoint_enabled(org_erlang_otp,dummy)) do {} while(0)])],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([no (available in lttng-ust v2.7)])])
if test "x$ac_cv_header_lttng_tracepoint_h" = "xyes" \
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 1bbde7f1e0..5d5bfb141f 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -338,7 +338,8 @@
<seealso marker="kernel:net_kernel">net_kernel(3)</seealso>.
It is also ensured that <c><![CDATA[epmd]]></c> runs on the current host
before Erlang is started. See
- <seealso marker="epmd">epmd(1)</seealso>.</p>
+ <seealso marker="epmd">epmd(1)</seealso> and the
+ <seealso marker="#start_epmd"><c>-start_epmd</c></seealso> option.</p>
<p>The name of the node will be <c><![CDATA[Name@Host]]></c>, where
<c><![CDATA[Host]]></c> is the fully qualified host name of the current
host. For short names, use the <c><![CDATA[-sname]]></c> flag instead.</p>
@@ -463,6 +464,21 @@
flag and those running with the <c><![CDATA[-name]]></c> flag, as node
names must be unique in distributed Erlang systems.</p>
</item>
+ <tag><marker id="start_epmd"/><c>-start_epmd true | false</c></tag>
+ <item>
+
+ <p>Specifies whether Erlang should start
+ <seealso marker="epmd">epmd</seealso> on startup. By default
+ this is <c>true</c>, but if you prefer to start epmd
+ manually, set this to <c>false</c>.</p>
+
+ <p>This only applies if Erlang is started as a distributed node,
+ i.e. if <c>-name</c> or <c>-sname</c> is specified. Otherwise,
+ epmd is not started even if <c>-start_epmd true</c> is given.</p>
+
+ <p>Note that a distributed node will fail to start if epmd is
+ not running.</p>
+ </item>
<tag><marker id="smp"/><c><![CDATA[-smp [enable|auto|disable]]]></c></tag>
<item>
<p><c>-smp enable</c> and <c>-smp</c> starts the Erlang runtime
@@ -660,11 +676,11 @@
<p>Sets the initial process dictionary size of processes to the size
<c><![CDATA[Size]]></c>.</p>
</item>
- <tag><marker id="+hmqd"><c>+hmqd off_heap|on_heap|mixed</c></marker></tag>
+ <tag><marker id="+hmqd"><c>+hmqd off_heap|on_heap</c></marker></tag>
<item><p>
Sets the default value for the process flag
<c>message_queue_data</c>. If <c>+hmqd</c> is not
- passed, <c>mixed</c> will be the default. For more information,
+ passed, <c>on_heap</c> will be the default. For more information,
see the documentation of
<seealso marker="erlang#process_flag_message_queue_data"><c>process_flag(message_queue_data,
MQD)</c></seealso>.
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 33a4fee182..b2e2254a65 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -295,14 +295,14 @@ ok
</p></item>
<tag><marker id="time_measurement"/>Time Measurement</tag>
- <item><p>Support for time measurement in NIF libraries:
+ <item><p>Support for time measurement in NIF libraries:</p>
<list>
<item><seealso marker="#ErlNifTime"><c>ErlNifTime</c></seealso></item>
<item><seealso marker="#ErlNifTimeUnit"><c>ErlNifTimeUnit</c></seealso></item>
<item><seealso marker="#enif_monotonic_time"><c>enif_monotonic_time()</c></seealso></item>
<item><seealso marker="#enif_time_offset"><c>enif_time_offset()</c></seealso></item>
<item><seealso marker="#enif_convert_time_unit"><c>enif_convert_time_unit()</c></seealso></item>
- </list></p>
+ </list>
</item>
<tag><marker id="lengthy_work"/>Long-running NIFs</tag>
@@ -322,13 +322,13 @@ ok
<p>The
<seealso marker="#enif_consume_timeslice">enif_consume_timeslice()</seealso>
- function can be used to inform the runtime system about the lenght of the
+ function can be used to inform the runtime system about the length of the
NIF call. It should typically always be used unless the NIF executes very
quickly.</p>
- <p>If the NIF call is too lenghty one needs to handle this in one of the
+ <p>If the NIF call is too lengthy one needs to handle this in one of the
following ways in order to avoid degraded responsiveness, scheduler load
- balancing problems, and other strange behaviours:</p>
+ balancing problems, and other strange behaviors:</p>
<taglist>
<tag>Yielding NIF</tag>
@@ -410,14 +410,14 @@ ok
<seealso marker="erlang#system_flag_multi_scheduling"><c>erlang:system_flag(multi_scheduling,
block)</c></seealso>, might also take a very long time to
complete. This since all ongoing dirty operations on all
- dirty schedulers need to complete before the the block
+ dirty schedulers need to complete before the block
operation can complete.
</p>
<p>
A lot of operations communicating with a process executing a
dirty NIF can, however, complete while it is executing the
- dirty NIF. For example, retreiving information about it via
+ dirty NIF. For example, retrieving information about it via
<c>process_info()</c>, setting its group leader,
register/unregister its name, etc.
</p>
@@ -425,10 +425,10 @@ ok
<p>
Termination of a process executing a dirty NIF can only be
completed up to a certain point while it is executing the
- dirty NIF. All Erlang resources such as registered names,
- ETS tables, etc will be released. All links and monitors
+ dirty NIF. All Erlang resources such as its registered name,
+ its ETS tables, etc will be released. All links and monitors
will be triggered. The actual execution of the NIF will
- however <em>not</em> be stopped. The NIF can safely contiue
+ however <em>not</em> be stopped. The NIF can safely continue
execution, allocate heap memory, etc, but it is of course better
to stop executing as soon as possible. The NIF can check
whether current process is alive or not using
@@ -450,8 +450,8 @@ ok
collect a process in order to determine if it has
references to the module, a process executing a dirty
NIF might delay purging for a very long time. Delaying
- a purge operatin implies delaying <em>all</em> code
- loding operations which might cause severe problems for
+ a purge operation implies delaying <em>all</em> code
+ loading operations which might cause severe problems for
the system as a whole.
</p>
</item>
@@ -1101,15 +1101,6 @@ typedef enum {
Erlang operators <c>=:=</c> and
<c>=/=</c>.</p></desc>
</func>
- <func><name><ret>int</ret><nametext>enif_is_on_dirty_scheduler(ErlNifEnv* env)</nametext></name>
- <fsummary>Check to see if executing on a dirty scheduler thread</fsummary>
- <desc>
- <p>Check to see if the current NIF is executing on a dirty scheduler thread. If
- executing on a dirty scheduler thread true returned; otherwise false.</p>
- <p>This function can only be used from a NIF-calling thread, and with an
- environment corresponding to currently executing processes.</p>
- </desc>
- </func>
<func><name><ret>int</ret><nametext>enif_is_pid(ErlNifEnv* env, ERL_NIF_TERM term)</nametext></name>
<fsummary>Determine if a term is a pid</fsummary>
<desc><p>Return true if <c>term</c> is a pid.</p></desc>
@@ -1820,7 +1811,25 @@ enif_map_iterator_destroy(env, &amp;iter);
<desc><p>Same as <seealso marker="erl_driver#erl_drv_thread_self">erl_drv_thread_self</seealso>.
</p></desc>
</func>
-
+ <func><name><ret>int</ret><nametext>enif_thread_type(void)</nametext></name>
+ <fsummary>Determine type of current thread</fsummary>
+ <desc>
+ <p>Determine the type of currently executing thread. A positive value
+ indicates a scheduler thread while a negative value or zero indicates
+ another type of thread. Currently the following specific types exist
+ (which may be extended in the future):</p>
+ <taglist>
+ <tag><c>ERL_NIF_THR_UNDEFINED</c></tag>
+ <value><p>Undefined thread that is not a scheduler thread.</p></value>
+ <tag><c>ERL_NIF_THR_NORMAL_SCHEDULER</c></tag>
+ <value><p>A normal scheduler thread.</p></value>
+ <tag><c>ERL_NIF_THR_DIRTY_CPU_SCHEDULER</c></tag>
+ <value><p>A dirty CPU scheduler thread.</p></value>
+ <tag><c>ERL_NIF_THR_DIRTY_IO_SCHEDULER</c></tag>
+ <value><p>A dirty I/O scheduler thread.</p></value>
+ </taglist>
+ </desc>
+ </func>
<func>
<name><ret>ErlNifTime</ret><nametext>enif_time_offset(ErlNifTimeUnit time_unit)</nametext></name>
<fsummary>Get current Time Offset</fsummary>
diff --git a/erts/doc/src/erl_tracer.xml b/erts/doc/src/erl_tracer.xml
index d4c8bbad31..7841fdfd63 100644
--- a/erts/doc/src/erl_tracer.xml
+++ b/erts/doc/src/erl_tracer.xml
@@ -67,7 +67,7 @@
<desc>
<p>The different trace tags that the tracer will be called with.
Each trace tag is described in greater detail in
- <seealso marker="#Module:trace/6">Module:trace/6</seealso>
+ <seealso marker="#Module:trace/5">Module:trace/5</seealso>
</p>
</desc>
</datatype>
@@ -84,14 +84,18 @@
<p>The options for the tracee.</p>
<taglist>
<tag><c>timestamp</c></tag>
- <item>If not set to <c>undefined</c>, the tracer has been requested to
- include a timestamp.</item>
+ <item>If set the tracer has been requested to include a timestamp.</item>
+ <tag><c>extra</c></tag>
+ <item>If set the tracepoint has included additonal data about
+ the trace event. What the additional data is depends on which
+ <c>TraceTag</c> has been triggered. The <c>extra</c> trace data
+ corresponds to the fifth elemnt in the trace tuples described in
+ <seealso marker="erlang#trace_3_trace_messages">erlang:trace/3</seealso>.</item>
<tag><c>match_spec_result</c></tag>
- <item>If not set to <c>true</c>, the tracer has been requested to
- include the output of a match specification that was run.</item>
+ <item>If set the tracer has been requested to include the output
+ of a match specification that was run.</item>
<tag><c>scheduler_id</c></tag>
- <item>Set to a number if the scheduler id is to be included by the tracer.
- Otherwise it is set to <c>undefined</c>.</item>
+ <item>Set the scheduler id is to be included by the tracer.</item>
</taglist>
</desc>
</datatype>
@@ -115,23 +119,23 @@
<taglist>
<tag><seealso marker="#Module:enabled/3"><c>Module:enabled/3</c></seealso></tag>
<item>Mandatory</item>
- <tag><seealso marker="#Module:trace/6"><c>Module:trace/6</c></seealso></tag>
+ <tag><seealso marker="#Module:trace/5"><c>Module:trace/5</c></seealso></tag>
<item>Mandatory</item>
<tag><seealso marker="#Module:enabled_procs/3"><c>Module:enabled_procs/3</c></seealso></tag>
<item>Optional</item>
- <tag><seealso marker="#Module:trace_procs/6"><c>Module:trace_procs/6</c></seealso></tag>
+ <tag><seealso marker="#Module:trace_procs/5"><c>Module:trace_procs/5</c></seealso></tag>
<item>Optional</item>
<tag><seealso marker="#Module:enabled_ports/3"><c>Module:enabled_ports/3</c></seealso></tag>
<item>Optional</item>
- <tag><seealso marker="#Module:trace_ports/6"><c>Module:trace_ports/6</c></seealso></tag>
+ <tag><seealso marker="#Module:trace_ports/5"><c>Module:trace_ports/5</c></seealso></tag>
<item>Optional</item>
<tag><seealso marker="#Module:enabled_running_ports/3"><c>Module:enabled_running_ports/3</c></seealso></tag>
<item>Optional</item>
- <tag><seealso marker="#Module:trace_running_ports/6"><c>Module:trace_running_ports/6</c></seealso></tag>
+ <tag><seealso marker="#Module:trace_running_ports/5"><c>Module:trace_running_ports/5</c></seealso></tag>
<item>Optional</item>
<tag><seealso marker="#Module:enabled_running_procs/3"><c>Module:enabled_running_procs/3</c></seealso></tag>
<item>Optional</item>
- <tag><seealso marker="#Module:trace_running_procs/6"><c>Module:trace_running_procs/6</c></seealso></tag>
+ <tag><seealso marker="#Module:trace_running_procs/5"><c>Module:trace_running_procs/5</c></seealso></tag>
<item>Optional</item>
</taglist>
@@ -166,14 +170,13 @@
</desc>
</func>
<func>
- <name>Module:trace(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag">trace_tag()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -182,17 +185,17 @@
the <seealso marker="#Module:enabled/3">Module:enabled/3</seealso>
callback returned <c>trace</c>. In it any side effects needed by
the tracer should be done. The tracepoint payload is located in
- the <c>FirstTraceTerm</c> and <c>SecondTraceTerm</c>. The content
- of the TraceTerms depends on which <c>TraceTag</c> has been triggered.
- The <c>FirstTraceTerm</c> and <c>SecondTraceTerm</c> correspond to the
- fourth and fifth slot in the trace tuples described in
+ the <c>TraceTerm</c>. The content of the TraceTerm depends on which
+ <c>TraceTag</c> has been triggered.
+ The <c>TraceTerm</c> corresponds to the
+ fourth element in the trace tuples described in
<seealso marker="erlang#trace_3_trace_messages">erlang:trace/3</seealso>.
- If the tuple only has four elements, <c>SecondTraceTerm</c> will be
- <c>undefined</c>.</p>
+ If the trace tuple has five elements, the fifth element will be sent as
+ the <c>extra</c> value in the <c>Opts</c> maps.</p>
</desc>
</func>
<func>
- <name name="trace">Module:trace(seq_trace, TracerState, Label, SeqTraceInfo, undefined, Opts) -> Result</name>
+ <name name="trace">Module:trace(seq_trace, TracerState, Label, SeqTraceInfo, Opts) -> Result</name>
<fsummary>Check if a sequence trace event should be generated.</fsummary>
<type>
<v>TracerState = term()</v>
@@ -228,14 +231,13 @@
</func>
<func>
- <name>Module:trace_procs(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_procs(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_procs">trace_tag()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -243,7 +245,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_procs/3">Module:enabled_procs/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_procs/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_procs/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -265,14 +267,13 @@
</func>
<func>
- <name>Module:trace_ports(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_ports(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_ports">trace_tag()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -280,7 +281,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_ports/3">Module:enabled_ports/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_ports/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_ports/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -302,14 +303,13 @@
</func>
<func>
- <name>Module:trace_running_procs(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_running_procs(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_running_procs">trace_tag_running_procs()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -317,7 +317,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_running_procs/3">Module:enabled_running_procs/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_running_procs/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_running_procs/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -339,14 +339,13 @@
</func>
<func>
- <name>Module:trace_running_ports(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_running_ports(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_running_ports">trace_tag_running_ports()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -354,7 +353,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_running_ports/3">Module:enabled_running_ports/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_running_ports/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_running_ports/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -376,14 +375,13 @@
</func>
<func>
- <name>Module:trace_call(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_call(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_call">trace_tag_call()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -391,7 +389,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_call/3">Module:enabled_call/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_call/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_call/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -413,14 +411,13 @@
</func>
<func>
- <name>Module:trace_send(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_send(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_send">trace_tag_send()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -428,7 +425,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_send/3">Module:enabled_send/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_send/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_send/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -450,14 +447,13 @@
</func>
<func>
- <name>Module:trace_receive(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_receive(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_receive">trace_tag_receive()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -465,7 +461,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_receive/3">Module:enabled_receive/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_receive/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_receive/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -487,14 +483,13 @@
</func>
<func>
- <name>Module:trace_garbage_collection(TraceTag, TracerState, Tracee, FirstTraceTerm, SecondTraceTerm, Opts) -> Result</name>
+ <name>Module:trace_garbage_collection(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result</name>
<fsummary>Check if a trace event should be generated.</fsummary>
<type>
<v>TraceTag = <seealso marker="#type-trace_tag_gc">trace_tag_gc()</seealso></v>
<v>TracerState = term()</v>
<v>Tracee = <seealso marker="#type-tracee">tracee()</seealso></v>
<v>FirstTraceTerm = term()</v>
- <v>SecondTraceTerm = term() | undefined</v>
<v>Opts = <seealso marker="#type-trace_opts">trace_opts()</seealso></v>
<v>Result = ok</v>
</type>
@@ -502,7 +497,7 @@
<p>This callback will be called when a tracepoint is triggered and
the <seealso marker="#Module:enabled_garbage_collection/3">Module:enabled_garbage_collection/3</seealso>
callback returned <c>trace</c>.</p>
- <p>If <c>trace_garbage_collection/6</c> is not defined <c>trace/6</c> will be called instead.</p>
+ <p>If <c>trace_garbage_collection/5</c> is not defined <c>trace/5</c> will be called instead.</p>
</desc>
</func>
@@ -543,7 +538,7 @@ ok
<pre>
-module(erl_msg_tracer).
--export([enabled/3, trace/6, load/0]).
+-export([enabled/3, trace/5, load/0]).
load() ->
erlang:load_nif("erl_msg_tracer", []).
@@ -551,7 +546,7 @@ load() ->
enabled(_, _, _) ->
error.
-trace(_, _, _,_, _, _) ->
+trace(_, _, _,_, _) ->
error.
</pre>
<p>erl_msg_tracer.c</p>
@@ -569,7 +564,7 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ErlNifFunc nif_funcs[] = {
{"enabled", 3, enabled},
- {"trace", 6, trace}
+ {"trace", 5, trace}
};
ERL_NIF_INIT(erl_msg_tracer, nif_funcs, load, NULL, upgrade, unload)
@@ -632,9 +627,8 @@ static ERL_NIF_TERM enabled(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
* argv[0]: TraceTag, should only be 'send'
* argv[1]: TracerState, process to send {argv[2], argv[4]} to
* argv[2]: Tracee
- * argv[3]: Message, ignored
- * argv[4]: Recipient
- * argv[5]: Options, ignored
+ * argv[3]: Recipient
+ * argv[4]: Options, ignored
*/
static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 9287b32fec..e0c3fed0c2 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -1802,6 +1802,8 @@ os_prompt% </pre>
<tag>string()</tag>
<item>An Erlang crash dump is produced with <c><anno>Status</anno></c>
as slogan. Then the runtime system exits with status code <c>1</c>.
+ Note that only code points in the range 0-255 may be used
+ and the string will be truncated if longer than 200 characters.
</item>
<tag><c>abort</c></tag>
<item>
@@ -4449,11 +4451,6 @@ os_prompt% </pre>
off heap. This is how messages always have been stored
up until ERTS version 8.0.
</p></item>
- <tag><c>mixed</c></tag>
- <item><p>
- Messages may be placed either on the heap or outside
- of the heap.
- </p></item>
</taglist>
<p>
The default <c>message_queue_data</c> process flag is determined
@@ -4877,7 +4874,7 @@ os_prompt% </pre>
<item>
<p>Returns the current state of the <c>message_queue_data</c>
process flag. <c><anno>MQD</anno></c> is either <c>off_heap</c>,
- <c>on_heap</c>, or <c>mixed</c>. For more information, see the
+ or <c>on_heap</c>. For more information, see the
documentation of
<seealso marker="#process_flag_message_queue_data"><c>process_flag(message_queue_data,
MQD)</c></seealso>.</p>
@@ -5808,7 +5805,7 @@ true</pre>
<item>
<p>Sets the state of the <c>message_queue_data</c> process
flag. <c><anno>MQD</anno></c> should be either <c>off_heap</c>,
- <c>on_heap</c>, or <c>mixed</c>. The default
+ or <c>on_heap</c>. The default
<c>message_queue_data</c> process flag is determined by the
<seealso marker="erl#+hmqd"><c>+hmqd</c></seealso> <c>erl</c>
command line argument. For more information, see the
@@ -7164,7 +7161,7 @@ ok
<tag><marker id="system_info_message_queue_data"><c>message_queue_data</c></marker></tag>
<item>
<p>Returns the default value of the <c>message_queue_data</c>
- process flag which is either <c>off_heap</c>, <c>on_heap</c>, or <c>mixed</c>.
+ process flag which is either <c>off_heap</c>, or <c>on_heap</c>.
This default is set by the <c>erl</c> command line argument
<seealso marker="erl#+hmqd"><c>+hmqd</c></seealso>. For more information on the
<c>message_queue_data</c> process flag, see documentation of
diff --git a/erts/doc/src/init.xml b/erts/doc/src/init.xml
index 84a5aea335..a88a815ef6 100644
--- a/erts/doc/src/init.xml
+++ b/erts/doc/src/init.xml
@@ -178,14 +178,8 @@
<name name="stop" arity="0"/>
<fsummary>Take down an Erlang node smoothly</fsummary>
<desc>
- <p>All applications are taken down smoothly, all code is
- unloaded, and all ports are closed before the system
- terminates. If the <c>-heart</c> command line flag was given,
- the <c>heart</c> program is terminated before the Erlang node
- terminates. Refer to <c>heart(3)</c> for more information.</p>
- <p>To limit the shutdown time, the time <c>init</c> is allowed
- to spend taking down applications, the <c>-shutdown_time</c>
- command line flag should be used.</p>
+ <p>The same as
+ <seealso marker="#stop/1"><c>stop(0)</c></seealso>.</p>
</desc>
</func>
<func>
@@ -241,6 +235,11 @@
marker="kernel:code">code(3)</seealso>.</p>
</item>
+ <tag><c>-epmd_module Module</c></tag>
+ <item>
+ <p>Specifies the module to use for registration and lookup of
+ node names. Defaults to <c>erl_epmd</c>.</p>
+ </item>
<tag><c>-eval Expr</c></tag>
<item>
<p>Scans, parses and evaluates an arbitrary expression
diff --git a/erts/emulator/beam/atom.names b/erts/emulator/beam/atom.names
index 8f65e71531..badd69856e 100644
--- a/erts/emulator/beam/atom.names
+++ b/erts/emulator/beam/atom.names
@@ -228,9 +228,6 @@ atom endian
atom env
atom eof
atom eol
-atom exception_from
-atom exception_trace
-atom extended
atom Eq='=:='
atom Eqeq='=='
atom erl_tracer
@@ -243,6 +240,8 @@ atom ets
atom ETS_TRANSFER='ETS-TRANSFER'
atom event
atom exact_reductions
+atom exception_from
+atom exception_trace
atom exclusive
atom exit_status
atom existing
@@ -251,7 +250,9 @@ atom existing_ports
atom existing
atom exiting
atom exports
+atom extended
atom external
+atom extra
atom false
atom fcgi
atom fd
@@ -389,7 +390,6 @@ atom min_heap_size
atom min_bin_vheap_size
atom minor_version
atom Minus='-'
-atom mixed
atom module
atom module_info
atom monitored_by
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index f8f2e29c95..4716460a6b 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1323,11 +1323,7 @@ void process_main(void)
if (start_time != 0) {
Sint64 diff = erts_timestamp_millis() - start_time;
- if (diff > 0 && (Uint) diff > erts_system_monitor_long_schedule
-#if defined(ERTS_SMP) && defined(ERTS_DIRTY_SCHEDULERS)
- && !ERTS_SCHEDULER_IS_DIRTY(erts_proc_sched_data(c_p))
-#endif
- ) {
+ if (diff > 0 && (Uint) diff > erts_system_monitor_long_schedule) {
BeamInstr *inptr = find_function_from_pc(start_time_i);
BeamInstr *outptr = find_function_from_pc(c_p->i);
monitor_long_schedule_proc(c_p,inptr,outptr,(Uint) diff);
@@ -1337,7 +1333,7 @@ void process_main(void)
PROCESS_MAIN_CHK_LOCKS(c_p);
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
- c_p = schedule(c_p, reds_used);
+ c_p = erts_schedule(NULL, c_p, reds_used);
ASSERT(!(c_p->flags & F_HIPE_MODE));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
start_time = 0;
@@ -3559,12 +3555,10 @@ do { \
typedef Eterm NifF(struct enif_environment_t*, int argc, Eterm argv[]);
NifF* fp = vbf = (NifF*) I[1];
struct enif_environment_t env;
-#ifdef ERTS_DIRTY_SCHEDULERS
- if (!c_p->scheduler_data)
- live_hf_end = ERTS_INVALID_HFRAG_PTR; /* On dirty scheduler */
- else
+#ifdef ERTS_SMP
+ ASSERT(c_p->scheduler_data);
#endif
- live_hf_end = c_p->mbuf;
+ live_hf_end = c_p->mbuf;
erts_pre_nif(&env, c_p, (struct erl_module_nif*)I[2], NULL);
nif_bif_result = (*fp)(&env, bif_nif_arity, reg);
if (env.exception_thrown)
@@ -3574,10 +3568,7 @@ do { \
PROCESS_MAIN_CHK_LOCKS(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_EMULATOR);
- if (env.exiting) {
- ERTS_SMP_REQ_PROC_MAIN_LOCK(c_p);
- goto do_schedule;
- }
+ ASSERT(!env.exiting);
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
}
@@ -5162,6 +5153,278 @@ do { \
}
}
+/*
+ * erts_dirty_process_main() is what dirty schedulers execute. Since they handle
+ * only NIF calls they do not need to be able to execute all BEAM
+ * instructions.
+ */
+void erts_dirty_process_main(ErtsSchedulerData *esdp)
+{
+#ifdef ERTS_DIRTY_SCHEDULERS
+ Process* c_p = NULL;
+ ErtsMonotonicTime start_time;
+#ifdef DEBUG
+ ERTS_DECLARE_DUMMY(Eterm pid);
+#endif
+
+ /* Pointer to X registers: x(1)..x(N); reg[0] is used when doing GC,
+ * in all other cases x0 is used.
+ */
+ register Eterm* reg REG_xregs = NULL;
+
+ /*
+ * Top of heap (next free location); grows upwards.
+ */
+ register Eterm* HTOP REG_htop = NULL;
+
+ /* Stack pointer. Grows downwards; points
+ * to last item pushed (normally a saved
+ * continuation pointer).
+ */
+ register Eterm* E REG_stop = NULL;
+
+ /*
+ * Pointer to next threaded instruction.
+ */
+ register BeamInstr *I REG_I = NULL;
+
+ ERTS_MSACC_DECLARE_CACHE_X() /* a cached value of the tsd pointer for msacc */
+
+ /*
+ * start_time always positive for dirty CPU schedulers,
+ * and negative for dirty I/O schedulers.
+ */
+
+ if (ERTS_SCHEDULER_IS_DIRTY_CPU(esdp)) {
+ start_time = erts_get_monotonic_time(NULL);
+ ASSERT(start_time >= 0);
+ }
+ else {
+ start_time = ERTS_SINT64_MIN;
+ ASSERT(start_time < 0);
+ }
+
+ goto do_dirty_schedule;
+
+ context_switch:
+ c_p->arity = I[-1];
+ c_p->current = I-3; /* Pointer to Mod, Func, Arity */
+
+ {
+ int reds_used;
+ Eterm* argp;
+ int i;
+
+ /*
+ * Make sure that there is enough room for the argument registers to be saved.
+ */
+ if (c_p->arity > c_p->max_arg_reg) {
+ /*
+ * Yes, this is an expensive operation, but you only pay it the first
+ * time you call a function with more than 6 arguments which is
+ * scheduled out. This is better than paying for 26 words of wasted
+ * space for most processes which never call functions with more than
+ * 6 arguments.
+ */
+ Uint size = c_p->arity * sizeof(c_p->arg_reg[0]);
+ if (c_p->arg_reg != c_p->def_arg_reg) {
+ c_p->arg_reg = (Eterm *) erts_realloc(ERTS_ALC_T_ARG_REG,
+ (void *) c_p->arg_reg,
+ size);
+ } else {
+ c_p->arg_reg = (Eterm *) erts_alloc(ERTS_ALC_T_ARG_REG, size);
+ }
+ c_p->max_arg_reg = c_p->arity;
+ }
+
+ /*
+ * Save the argument registers and everything else.
+ */
+
+ argp = c_p->arg_reg;
+ for (i = c_p->arity - 1; i >= 0; i--) {
+ argp[i] = reg[i];
+ }
+ SWAPOUT;
+ c_p->i = I;
+
+ do_dirty_schedule:
+
+ if (start_time < 0) {
+ /*
+ * Dirty I/O scheduler:
+ * One reduction consumed regardless of
+ * time spent in the dirty NIF.
+ */
+ reds_used = esdp->virtual_reds + 1;
+ }
+ else {
+ /*
+ * Dirty CPU scheduler:
+ * Currently two reductions consumed per
+ * micro second spent in the dirty NIF.
+ */
+ ErtsMonotonicTime time;
+ time = erts_get_monotonic_time(esdp);
+ time -= start_time;
+ time = ERTS_MONOTONIC_TO_USEC(time);
+ time *= (CONTEXT_REDS-1)/1000 + 1;
+ ASSERT(time >= 0);
+ if (time == 0)
+ time = 1; /* At least one reduction */
+ time += esdp->virtual_reds;
+ reds_used = time > INT_MAX ? INT_MAX : (int) time;
+ }
+
+ PROCESS_MAIN_CHK_LOCKS(c_p);
+ ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);
+ ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
+ c_p = erts_schedule(esdp, c_p, reds_used);
+
+ if (start_time >= 0) {
+ start_time = erts_get_monotonic_time(esdp);
+ ASSERT(start_time >= 0);
+ }
+ }
+
+ ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
+#ifdef DEBUG
+ pid = c_p->common.id; /* Save for debugging purposes */
+#endif
+ ERTS_SMP_REQ_PROC_MAIN_LOCK(c_p);
+ PROCESS_MAIN_CHK_LOCKS(c_p);
+
+ ASSERT(!(c_p->flags & F_HIPE_MODE));
+ ERTS_MSACC_UPDATE_CACHE_X();
+
+ reg = esdp->x_reg_array;
+ {
+ Eterm* argp;
+ int i;
+
+ argp = c_p->arg_reg;
+ for (i = c_p->arity - 1; i >= 0; i--) {
+ reg[i] = argp[i];
+ CHECK_TERM(reg[i]);
+ }
+
+ /*
+ * We put the original reduction count in the process structure, to reduce
+ * the code size (referencing a field in a struct through a pointer stored
+ * in a register gives smaller code than referencing a global variable).
+ */
+
+ I = c_p->i;
+
+ ASSERT(BeamOp(op_call_nif) == (BeamInstr *) *I);
+
+ /*
+ * Set fcalls even though we ignore it, so we don't
+ * confuse code accessing it...
+ */
+ if (ERTS_PROC_GET_SAVED_CALLS_BUF(c_p))
+ c_p->fcalls = 0;
+ else
+ c_p->fcalls = CONTEXT_REDS;
+
+ SWAPIN;
+
+#ifdef USE_VM_PROBES
+ if (DTRACE_ENABLED(process_scheduled)) {
+ DTRACE_CHARBUF(process_buf, DTRACE_TERM_BUF_SIZE);
+ DTRACE_CHARBUF(fun_buf, DTRACE_TERM_BUF_SIZE);
+ dtrace_proc_str(c_p, process_buf);
+
+ if (ERTS_PROC_IS_EXITING(c_p)) {
+ strcpy(fun_buf, "<exiting>");
+ } else {
+ BeamInstr *fptr = find_function_from_pc(c_p->i);
+ if (fptr) {
+ dtrace_fun_decode(c_p, (Eterm)fptr[0],
+ (Eterm)fptr[1], (Uint)fptr[2],
+ NULL, fun_buf);
+ } else {
+ erts_snprintf(fun_buf, sizeof(DTRACE_CHARBUF_NAME(fun_buf)),
+ "<unknown/%p>", *I);
+ }
+ }
+
+ DTRACE2(process_scheduled, process_buf, fun_buf);
+ }
+#endif
+ }
+
+ {
+#ifdef DEBUG
+ Eterm result;
+#endif
+ Eterm arity;
+
+ {
+ /*
+ * call_nif is always first instruction in function:
+ *
+ * I[-3]: Module
+ * I[-2]: Function
+ * I[-1]: Arity
+ * I[0]: &&call_nif
+ * I[1]: Function pointer to NIF function
+ * I[2]: Pointer to erl_module_nif
+ * I[3]: Function pointer to dirty NIF
+ */
+ BifFunction vbf;
+
+ ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_NIF);
+
+ DTRACE_NIF_ENTRY(c_p, (Eterm)I[-3], (Eterm)I[-2], (Uint)I[-1]);
+ c_p->current = I-3; /* current and vbf set to please handle_error */
+ SWAPOUT;
+ PROCESS_MAIN_CHK_LOCKS(c_p);
+ arity = I[-1];
+ ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);
+
+ ASSERT(!ERTS_PROC_IS_EXITING(c_p));
+ {
+ typedef Eterm NifF(struct enif_environment_t*, int argc, Eterm argv[]);
+ NifF* fp = vbf = (NifF*) I[1];
+ struct enif_environment_t env;
+ ASSERT(!c_p->scheduler_data);
+
+ erts_pre_dirty_nif(esdp, &env, c_p,
+ (struct erl_module_nif*)I[2], NULL);
+
+#ifdef DEBUG
+ result =
+#else
+ (void)
+#endif
+ (*fp)(&env, arity, reg);
+
+ erts_post_nif(&env);
+
+ ASSERT(!is_value(result));
+ ASSERT(c_p->freason == TRAP);
+ ASSERT(!(c_p->flags & F_HIBERNATE_SCHED));
+
+ PROCESS_MAIN_CHK_LOCKS(c_p);
+ ERTS_SMP_REQ_PROC_MAIN_LOCK(c_p);
+ ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
+ ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_EMULATOR);
+ if (env.exiting)
+ goto do_dirty_schedule;
+ ASSERT(!ERTS_PROC_IS_EXITING(c_p));
+ }
+
+ DTRACE_NIF_RETURN(c_p, (Eterm)I[-3], (Eterm)I[-2], (Uint)I[-1]);
+ ERTS_HOLE_CHECK(c_p);
+ SWAPIN;
+ I = c_p->i;
+ goto context_switch;
+ }
+ }
+#endif /* ERTS_DIRTY_SCHEDULERS */
+}
+
static BifFunction
translate_gc_bif(void* gcf)
{
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 2a3bd4afe5..b18910e2c7 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -917,9 +917,6 @@ BIF_RETTYPE spawn_opt_1(BIF_ALIST_1)
goto error;
} else if (arg == am_message_queue_data) {
switch (val) {
- case am_mixed:
- so.flags &= ~(SPO_OFF_HEAP_MSGQ|SPO_ON_HEAP_MSGQ);
- break;
case am_on_heap:
so.flags &= ~SPO_OFF_HEAP_MSGQ;
so.flags |= SPO_ON_HEAP_MSGQ;
@@ -3836,59 +3833,11 @@ BIF_RETTYPE display_nl_0(BIF_ALIST_0)
/**********************************************************************/
-/* stop the system */
-/* ARGSUSED */
-BIF_RETTYPE halt_0(BIF_ALIST_0)
-{
- VERBOSE(DEBUG_SYSTEM,("System halted by BIF halt()\n"));
- erts_halt(0);
- ERTS_BIF_YIELD1(bif_export[BIF_halt_1], BIF_P, am_undefined);
-}
-
-/**********************************************************************/
#define HALT_MSG_SIZE 200
-static char halt_msg[HALT_MSG_SIZE];
-
-/* stop the system with exit code */
-/* ARGSUSED */
-BIF_RETTYPE halt_1(BIF_ALIST_1)
-{
- Uint code;
-
- if (term_to_Uint_mask(BIF_ARG_1, &code)) {
- int pos_int_code = (int) (code & INT_MAX);
- VERBOSE(DEBUG_SYSTEM,("System halted by BIF halt(%T)\n", BIF_ARG_1));
- erts_halt(pos_int_code);
- ERTS_BIF_YIELD1(bif_export[BIF_halt_1], BIF_P, am_undefined);
- }
- else if (ERTS_IS_ATOM_STR("abort", BIF_ARG_1)) {
- VERBOSE(DEBUG_SYSTEM,("System halted by BIF halt(%T)\n", BIF_ARG_1));
- erts_smp_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
- erts_exit(ERTS_ABORT_EXIT, "");
- }
- else if (is_string(BIF_ARG_1) || BIF_ARG_1 == NIL) {
- Sint i;
-
- if ((i = intlist_to_buf(BIF_ARG_1, halt_msg, HALT_MSG_SIZE-1)) < 0) {
- goto error;
- }
- halt_msg[i] = '\0';
- VERBOSE(DEBUG_SYSTEM,("System halted by BIF halt(%T)\n", BIF_ARG_1));
- erts_smp_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
- erts_exit(ERTS_DUMP_EXIT, "%s\n", halt_msg);
- }
- else
- goto error;
- return NIL; /* Pedantic (lint does not know about erts_exit) */
- error:
- BIF_ERROR(BIF_P, BADARG);
-}
-
-/**********************************************************************/
+static char halt_msg[HALT_MSG_SIZE+1];
/* stop the system with exit code and flags */
-/* ARGSUSED */
BIF_RETTYPE halt_2(BIF_ALIST_2)
{
Uint code;
@@ -3924,7 +3873,7 @@ BIF_RETTYPE halt_2(BIF_ALIST_2)
("System halted by BIF halt(%T, %T)\n", BIF_ARG_1, BIF_ARG_2));
if (flush) {
erts_halt(pos_int_code);
- ERTS_BIF_YIELD1(bif_export[BIF_halt_1], BIF_P, am_undefined);
+ ERTS_BIF_YIELD2(bif_export[BIF_halt_2], BIF_P, am_undefined, am_undefined);
}
else {
erts_smp_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
@@ -3940,9 +3889,12 @@ BIF_RETTYPE halt_2(BIF_ALIST_2)
else if (is_string(BIF_ARG_1) || BIF_ARG_1 == NIL) {
Sint i;
- if ((i = intlist_to_buf(BIF_ARG_1, halt_msg, HALT_MSG_SIZE-1)) < 0) {
- goto error;
- }
+ if ((i = intlist_to_buf(BIF_ARG_1, halt_msg, HALT_MSG_SIZE)) == -1) {
+ goto error;
+ }
+ if (i == -2) /* truncated string */
+ i = HALT_MSG_SIZE;
+ ASSERT(i >= 0 && i <= HALT_MSG_SIZE);
halt_msg[i] = '\0';
VERBOSE(DEBUG_SYSTEM,
("System halted by BIF halt(%T, %T)\n", BIF_ARG_1, BIF_ARG_2));
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 872f0f9b2a..065018514a 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -72,8 +72,6 @@ bif erlang:get/1
bif erlang:get_keys/1
bif erlang:group_leader/0
bif erlang:group_leader/2
-bif erlang:halt/0
-bif erlang:halt/1
bif erlang:halt/2
bif erlang:phash/2
bif erlang:phash2/1
diff --git a/erts/emulator/beam/erl_ao_firstfit_alloc.c b/erts/emulator/beam/erl_ao_firstfit_alloc.c
index fbe4724047..7e239d1f5d 100644
--- a/erts/emulator/beam/erl_ao_firstfit_alloc.c
+++ b/erts/emulator/beam/erl_ao_firstfit_alloc.c
@@ -123,7 +123,7 @@ struct AOFF_Carrier_t_ {
AOFF_RBTree_t rbt_node; /* My node in the carrier tree */
AOFF_RBTree_t* root; /* Root of my block tree */
};
-#define RBT_NODE_TO_MBC(PTR) ((AOFF_Carrier_t*)((char*)(PTR) - offsetof(AOFF_Carrier_t, rbt_node)))
+#define RBT_NODE_TO_MBC(PTR) ErtsContainerStruct((PTR), AOFF_Carrier_t, rbt_node)
/*
To support carrier migration we keep two kinds of rb-trees:
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 2e195db0ee..b410578d37 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1565,9 +1565,6 @@ process_info_aux(Process *BIF_P,
case F_ON_HEAP_MSGQ:
res = am_on_heap;
break;
- case 0:
- res = am_mixed;
- break;
default:
res = am_error;
ERTS_INTERNAL_ERROR("Inconsistent message queue management state");
@@ -2809,8 +2806,6 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
BIF_RET(am_off_heap);
case SPO_ON_HEAP_MSGQ:
BIF_RET(am_on_heap);
- case 0:
- BIF_RET(am_mixed);
default:
ERTS_INTERNAL_ERROR("Inconsistent message queue management state");
BIF_RET(am_error);
diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c
index 37f4e1de49..fefa9d8391 100644
--- a/erts/emulator/beam/erl_bif_port.c
+++ b/erts/emulator/beam/erl_bif_port.c
@@ -1411,7 +1411,7 @@ BIF_RETTYPE decode_packet_3(BIF_ALIST_3)
trunc_len = val;
goto next_option;
case am_line_delimiter:
- if (type == TCP_PB_LINE_LF && val >= 0 && val <= 255) {
+ if (type == TCP_PB_LINE_LF && val <= 255) {
delimiter = (char)val;
goto next_option;
}
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index 74979f984a..074ac6d64e 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -95,7 +95,8 @@
/*
* The following symbols can be manipulated to "tune" the linear hash array
*/
-#define CHAIN_LEN 6 /* Medium bucket chain len */
+#define GROW_LIMIT(NACTIVE) ((NACTIVE)*2)
+#define SHRINK_LIMIT(NACTIVE) ((NACTIVE) / 2)
/* Number of slots per segment */
#define SEGSZ_EXP 8
@@ -463,7 +464,7 @@ db_finalize_dbterm_hash(int cret, DbUpdateHandle* handle);
static ERTS_INLINE void try_shrink(DbTableHash* tb)
{
int nactive = NACTIVE(tb);
- if (nactive > SEGSZ && NITEMS(tb) < (nactive * CHAIN_LEN)
+ if (nactive > SEGSZ && NITEMS(tb) < SHRINK_LIMIT(nactive)
&& !IS_FIXED(tb)) {
shrink(tb, nactive);
}
@@ -670,8 +671,8 @@ int db_create_hash(Process *p, DbTable *tbl)
tb->nsegs = NSEG_1;
tb->nslots = SEGSZ;
- erts_smp_atomic_init_nob(&tb->is_resizing, 0);
#ifdef ERTS_SMP
+ erts_smp_atomic_init_nob(&tb->is_resizing, 0);
if (tb->common.type & DB_FINE_LOCKED) {
erts_smp_rwmtx_opt_t rwmtx_opt = ERTS_SMP_RWMTX_OPT_DEFAULT_INITER;
int i;
@@ -862,7 +863,7 @@ Lnew:
WUNLOCK_HASH(lck);
{
int nactive = NACTIVE(tb);
- if (nitems > nactive * (CHAIN_LEN+1) && !IS_FIXED(tb)) {
+ if (nitems > GROW_LIMIT(nactive) && !IS_FIXED(tb)) {
grow(tb, nactive);
}
}
@@ -2250,12 +2251,12 @@ static int db_free_table_continue_hash(DbTable *tbl)
done /= 2;
while(tb->nslots != 0) {
- free_seg(tb, 1);
+ done += 1 + SEGSZ/64 + free_seg(tb, 1);
/*
* If we have done enough work, get out here.
*/
- if (++done >= (DELETE_RECORD_LIMIT / CHAIN_LEN / SEGSZ)) {
+ if (done >= DELETE_RECORD_LIMIT) {
return 0; /* Not done */
}
}
@@ -2604,23 +2605,22 @@ static Eterm build_term_list(Process* p, HashDbTerm* ptr1, HashDbTerm* ptr2,
static ERTS_INLINE int
begin_resizing(DbTableHash* tb)
{
+#ifdef ERTS_SMP
if (DB_USING_FINE_LOCKING(tb))
- return !erts_smp_atomic_xchg_acqb(&tb->is_resizing, 1);
- else {
- if (erts_smp_atomic_read_nob(&tb->is_resizing))
- return 0;
- erts_smp_atomic_set_nob(&tb->is_resizing, 1);
- return 1;
- }
+ return !erts_atomic_xchg_acqb(&tb->is_resizing, 1);
+ else
+ ERTS_LC_ASSERT(erts_lc_rwmtx_is_rwlocked(&tb->common.rwlock));
+#endif
+ return 1;
}
static ERTS_INLINE void
done_resizing(DbTableHash* tb)
{
+#ifdef ERTS_SMP
if (DB_USING_FINE_LOCKING(tb))
- erts_smp_atomic_set_relb(&tb->is_resizing, 0);
- else
- erts_smp_atomic_set_nob(&tb->is_resizing, 0);
+ erts_atomic_set_relb(&tb->is_resizing, 0);
+#endif
}
/* Grow table with one new bucket.
@@ -2871,7 +2871,7 @@ db_lookup_dbterm_hash(Process *p, DbTable *tbl, Eterm key, Eterm obj,
int nitems = erts_smp_atomic_inc_read_nob(&tb->common.nitems);
int nactive = NACTIVE(tb);
- if (nitems > nactive * (CHAIN_LEN + 1) && !IS_FIXED(tb)) {
+ if (nitems > GROW_LIMIT(nactive) && !IS_FIXED(tb)) {
grow(tb, nactive);
}
}
diff --git a/erts/emulator/beam/erl_db_hash.h b/erts/emulator/beam/erl_db_hash.h
index e654363cd5..081ff8fafc 100644
--- a/erts/emulator/beam/erl_db_hash.h
+++ b/erts/emulator/beam/erl_db_hash.h
@@ -60,8 +60,8 @@ typedef struct db_table_hash {
/* List of slots where elements have been deleted while table was fixed */
erts_smp_atomic_t fixdel; /* (FixedDeletion*) */
erts_smp_atomic_t nactive; /* Number of "active" slots */
- erts_smp_atomic_t is_resizing; /* grow/shrink in progress */
#ifdef ERTS_SMP
+ erts_smp_atomic_t is_resizing; /* grow/shrink in progress */
DbTableHashFineLocks* locks;
#endif
#ifdef VALGRIND
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 374da9407c..d0d74bbf44 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -1183,22 +1183,14 @@ minor_collection(Process* p, ErlHeapFragment *live_hf_end,
adjust_size = p->htop - p->heap;
}
- goto done;
}
+ else if (need_after > HEAP_SIZE(p)) {
+ grow_new_heap(p, next_heap_size(p, need_after, 0), objv, nobj);
+ adjust_size = p->htop - p->heap;
+ }
+ /*else: The heap size turned out to be just right. We are done. */
- if (HEAP_SIZE(p) >= need_after) {
- /*
- * The heap size turned out to be just right. We are done.
- */
- goto done;
- }
-
- grow_new_heap(p, next_heap_size(p, need_after, 0), objv, nobj);
- adjust_size = p->htop - p->heap;
-
- done:
ASSERT(HEAP_SIZE(p) == next_heap_size(p, HEAP_SIZE(p), 0));
- ASSERT(MBUF(p) == NULL);
/* The heap usage during GC should be larger than what we end up
after a GC, even if we grow it. If this assertion is not true
@@ -1591,6 +1583,9 @@ major_collection(Process* p, ErlHeapFragment *live_hf_end,
HIGH_WATER(p) = HEAP_TOP(p);
+#ifdef HARDDEBUG
+ disallow_heap_frag_ref_in_heap(p);
+#endif
remove_message_buffers(p);
if (p->flags & F_ON_HEAP_MSGQ)
@@ -1603,9 +1598,6 @@ major_collection(Process* p, ErlHeapFragment *live_hf_end,
adjusted = adjust_after_fullsweep(p, need, objv, nobj);
-#ifdef HARDDEBUG
- disallow_heap_frag_ref_in_heap(p);
-#endif
ErtsGcQuickSanityCheck(p);
return gc_cost(size_after, adjusted ? size_after : 0);
@@ -2293,18 +2285,13 @@ move_msgq_to_heap(Process *p)
free_message_buffer(bp);
}
else {
- ErtsMessage *tmp = erts_alloc_message(0, NULL);
- sys_memcpy((void *) tmp->m, (void *) mp->m,
- sizeof(Eterm)*ERL_MESSAGE_REF_ARRAY_SZ);
- tmp->next = mp->next;
- if (p->msg.save == &mp->next)
- p->msg.save = &tmp->next;
- if (p->msg.last == &mp->next)
- p->msg.last = &tmp->next;
- *mpp = tmp;
+ ErtsMessage *new_mp = erts_alloc_message(0, NULL);
+ sys_memcpy((void *) new_mp->m, (void *) mp->m,
+ sizeof(Eterm)*ERL_MESSAGE_REF_ARRAY_SZ);
+ erts_msgq_replace_msg_ref(&p->msg, new_mp, mpp);
mp->next = NULL;
erts_cleanup_messages(mp);
- mp = tmp;
+ mp = new_mp;
}
}
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 0649fb68de..fbdafec4ef 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -585,7 +585,7 @@ void erts_usage(void)
erts_fprintf(stderr, "-hpds size initial process dictionary size (default %d)\n",
erts_pd_initial_size);
erts_fprintf(stderr, "-hmqd val set default message queue data flag for processes,\n");
- erts_fprintf(stderr, " valid values are: off_heap | on_heap | mixed\n");
+ erts_fprintf(stderr, " valid values are: off_heap | on_heap\n");
/* erts_fprintf(stderr, "-i module set the boot module (default init)\n"); */
@@ -1526,9 +1526,7 @@ erl_start(int argc, char **argv)
erts_pd_initial_size));
} else if (has_prefix("mqd", sub_param)) {
arg = get_arg(sub_param+3, argv[i+1], &i);
- if (sys_strcmp(arg, "mixed") == 0)
- erts_default_spo_flags &= ~(SPO_ON_HEAP_MSGQ|SPO_OFF_HEAP_MSGQ);
- else if (sys_strcmp(arg, "on_heap") == 0) {
+ if (sys_strcmp(arg, "on_heap") == 0) {
erts_default_spo_flags &= ~SPO_OFF_HEAP_MSGQ;
erts_default_spo_flags |= SPO_ON_HEAP_MSGQ;
}
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c
index 579f6e427d..71ab92937d 100644
--- a/erts/emulator/beam/erl_message.c
+++ b/erts/emulator/beam/erl_message.c
@@ -1123,11 +1123,9 @@ erts_change_message_queue_management(Process *c_p, Eterm new_state)
break;
case am_on_heap:
c_p->flags |= F_ON_HEAP_MSGQ;
+ c_p->flags &= ~F_OFF_HEAP_MSGQ;
erts_smp_atomic32_read_bor_nob(&c_p->state,
ERTS_PSFLG_ON_HEAP_MSGQ);
- /* fall through */
- case am_mixed:
- c_p->flags &= ~F_OFF_HEAP_MSGQ;
/*
* We are not allowed to clear ERTS_PSFLG_OFF_HEAP_MSGQ
* if a off heap change is ongoing. It will be adjusted
@@ -1151,11 +1149,6 @@ erts_change_message_queue_management(Process *c_p, Eterm new_state)
switch (new_state) {
case am_on_heap:
break;
- case am_mixed:
- c_p->flags &= ~F_ON_HEAP_MSGQ;
- erts_smp_atomic32_read_band_nob(&c_p->state,
- ~ERTS_PSFLG_ON_HEAP_MSGQ);
- break;
case am_off_heap:
c_p->flags &= ~F_ON_HEAP_MSGQ;
erts_smp_atomic32_read_band_nob(&c_p->state,
@@ -1167,25 +1160,6 @@ erts_change_message_queue_management(Process *c_p, Eterm new_state)
}
break;
- case 0:
- res = am_mixed;
-
- switch (new_state) {
- case am_mixed:
- break;
- case am_on_heap:
- c_p->flags |= F_ON_HEAP_MSGQ;
- erts_smp_atomic32_read_bor_nob(&c_p->state,
- ERTS_PSFLG_ON_HEAP_MSGQ);
- break;
- case am_off_heap:
- goto change_to_off_heap;
- default:
- res = THE_NON_VALUE; /* badarg */
- break;
- }
- break;
-
default:
res = am_error;
ERTS_INTERNAL_ERROR("Inconsistent message queue management state");
@@ -1371,10 +1345,10 @@ erts_prep_msgq_for_inspection(Process *c_p, Process *rp,
mpp = i == 0 ? &rp->msg.first : &mip[i-1].msgp->next;
- if (rp->msg.save == &bad_mp->next)
- rp->msg.save = mpp;
- if (rp->msg.last == &bad_mp->next)
- rp->msg.last = mpp;
+ ASSERT(*mpp == bad_mp);
+
+ erts_msgq_update_internal_pointers(&rp->msg, mpp, &bad_mp->next);
+
mp = mp->next;
*mpp = mp;
rp->msg.len--;
@@ -1411,12 +1385,7 @@ erts_prep_msgq_for_inspection(Process *c_p, Process *rp,
sys_memcpy((void *) tmp->m, (void *) mp->m,
sizeof(Eterm)*ERL_MESSAGE_REF_ARRAY_SZ);
mpp = i == 0 ? &rp->msg.first : &mip[i-1].msgp->next;
- tmp->next = mp->next;
- if (rp->msg.save == &mp->next)
- rp->msg.save = &tmp->next;
- if (rp->msg.last == &mp->next)
- rp->msg.last = &tmp->next;
- *mpp = tmp;
+ erts_msgq_replace_msg_ref(&rp->msg, tmp, mpp);
erts_save_message_in_proc(rp, mp);
mp = tmp;
}
@@ -1756,7 +1725,7 @@ void erts_factory_trim_and_close(ErtsHeapFactory* factory,
case FACTORY_MESSAGE: {
ErtsMessage *mp = factory->message;
if (mp->data.attached == ERTS_MSG_COMBINED_HFRAG) {
- if (!mp->hfrag.next) {
+ if (!factory->heap_frags) {
Uint sz = factory->hp - factory->hp_start;
mp = erts_shrink_message(mp, sz, brefs, brefs_size);
factory->message = mp;
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h
index 46063ea0c2..6df969367b 100644
--- a/erts/emulator/beam/erl_message.h
+++ b/erts/emulator/beam/erl_message.h
@@ -366,6 +366,12 @@ ERTS_GLB_FORCE_INLINE ErtsMessage *erts_shrink_message(ErtsMessage *mp, Uint sz,
ERTS_GLB_FORCE_INLINE void erts_free_message(ErtsMessage *mp);
ERTS_GLB_INLINE Uint erts_used_frag_sz(const ErlHeapFragment*);
ERTS_GLB_INLINE Uint erts_msg_attached_data_size(ErtsMessage *msg);
+ERTS_GLB_INLINE void erts_msgq_update_internal_pointers(ErlMessageQueue *msgq,
+ ErtsMessage **newpp,
+ ErtsMessage **oldpp);
+ERTS_GLB_INLINE void erts_msgq_replace_msg_ref(ErlMessageQueue *msgq,
+ ErtsMessage *newp,
+ ErtsMessage **oldpp);
#define ERTS_MSG_COMBINED_HFRAG ((void *) 0x1)
@@ -468,6 +474,29 @@ ERTS_GLB_INLINE Uint erts_msg_attached_data_size(ErtsMessage *msg)
return sz;
}
}
+
+ERTS_GLB_INLINE void
+erts_msgq_update_internal_pointers(ErlMessageQueue *msgq,
+ ErtsMessage **newpp,
+ ErtsMessage **oldpp)
+{
+ if (msgq->save == oldpp)
+ msgq->save = newpp;
+ if (msgq->last == oldpp)
+ msgq->last = newpp;
+ if (msgq->saved_last == oldpp)
+ msgq->saved_last = newpp;
+}
+
+ERTS_GLB_INLINE void
+erts_msgq_replace_msg_ref(ErlMessageQueue *msgq, ErtsMessage *newp, ErtsMessage **oldpp)
+{
+ ErtsMessage *oldp = *oldpp;
+ newp->next = oldp->next;
+ erts_msgq_update_internal_pointers(msgq, &newp->next, &oldp->next);
+ *oldpp = newp;
+}
+
#endif
#endif
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 606b73c7b5..039f97ef43 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -178,9 +178,6 @@ static ERTS_INLINE void ensure_heap(ErlNifEnv* env, size_t may_need)
void erts_pre_nif(ErlNifEnv* env, Process* p, struct erl_module_nif* mod_nif,
Process* tracee)
{
-#ifdef ERTS_DIRTY_SCHEDULERS
- ErtsSchedulerData *esdp;
-#endif
env->mod_nif = mod_nif;
env->proc = p;
env->hp = HEAP_TOP(p);
@@ -193,57 +190,65 @@ void erts_pre_nif(ErlNifEnv* env, Process* p, struct erl_module_nif* mod_nif,
ASSERT(p->common.id != ERTS_INVALID_PID);
-#ifdef ERTS_DIRTY_SCHEDULERS
- esdp = erts_get_scheduler_data();
- ASSERT(esdp);
+#if defined(DEBUG) && defined(ERTS_DIRTY_SCHEDULERS)
+ {
+ ErtsSchedulerData *esdp = erts_get_scheduler_data();
+ ASSERT(esdp);
- if (!ERTS_SCHEDULER_IS_DIRTY(esdp)) {
-#ifdef DEBUG
- erts_aint32_t state = erts_smp_atomic32_read_nob(&p->state);
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp)) {
+ erts_aint32_t state = erts_smp_atomic32_read_nob(&p->state);
- ASSERT(p->scheduler_data == esdp);
- ASSERT((state & (ERTS_PSFLG_RUNNING
- | ERTS_PSFLG_RUNNING_SYS))
- && !(state & (ERTS_PSFLG_DIRTY_RUNNING
- | ERTS_PSFLG_DIRTY_RUNNING_SYS)));
+ ASSERT(p->scheduler_data == esdp);
+ ASSERT((state & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_RUNNING_SYS))
+ && !(state & (ERTS_PSFLG_DIRTY_RUNNING
+ | ERTS_PSFLG_DIRTY_RUNNING_SYS)));
+ }
+ }
#endif
+}
- }
- else {
- Process *sproc;
+void erts_pre_dirty_nif(ErtsSchedulerData *esdp,
+ ErlNifEnv* env, Process* p, struct erl_module_nif* mod_nif,
+ Process* tracee)
+{
+#ifdef ERTS_DIRTY_SCHEDULERS
+ Process *sproc;
#ifdef DEBUG
- erts_aint32_t state = erts_smp_atomic32_read_nob(&p->state);
+ erts_aint32_t state = erts_smp_atomic32_read_nob(&p->state);
- ASSERT(!p->scheduler_data);
- ASSERT((state & ERTS_PSFLG_DIRTY_RUNNING)
- && !(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)));
+ ASSERT(!p->scheduler_data);
+ ASSERT((state & ERTS_PSFLG_DIRTY_RUNNING)
+ && !(state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)));
+ ASSERT(esdp);
#endif
- sproc = esdp->dirty_shadow_process;
- ASSERT(sproc);
- ASSERT(sproc->static_flags & ERTS_STC_FLG_SHADOW_PROC);
- ASSERT(erts_smp_atomic32_read_nob(&sproc->state)
- == (ERTS_PSFLG_ACTIVE
- | ERTS_PSFLG_DIRTY_RUNNING
- | ERTS_PSFLG_PROXY));
-
- sproc->next = p;
- sproc->common.id = p->common.id;
- sproc->htop = p->htop;
- sproc->stop = p->stop;
- sproc->hend = p->hend;
- sproc->heap = p->heap;
- sproc->abandoned_heap = p->abandoned_heap;
- sproc->heap_sz = p->heap_sz;
- sproc->high_water = p->high_water;
- sproc->old_hend = p->old_hend;
- sproc->old_htop = p->old_htop;
- sproc->old_heap = p->old_heap;
- sproc->mbuf = NULL;
- sproc->mbuf_sz = 0;
- ERTS_INIT_OFF_HEAP(&sproc->off_heap);
- env->proc = sproc;
- }
+ erts_pre_nif(env, p, mod_nif, tracee);
+
+ sproc = esdp->dirty_shadow_process;
+ ASSERT(sproc);
+ ASSERT(sproc->static_flags & ERTS_STC_FLG_SHADOW_PROC);
+ ASSERT(erts_smp_atomic32_read_nob(&sproc->state)
+ == (ERTS_PSFLG_ACTIVE
+ | ERTS_PSFLG_DIRTY_RUNNING
+ | ERTS_PSFLG_PROXY));
+
+ sproc->next = p;
+ sproc->common.id = p->common.id;
+ sproc->htop = p->htop;
+ sproc->stop = p->stop;
+ sproc->hend = p->hend;
+ sproc->heap = p->heap;
+ sproc->abandoned_heap = p->abandoned_heap;
+ sproc->heap_sz = p->heap_sz;
+ sproc->high_water = p->high_water;
+ sproc->old_hend = p->old_hend;
+ sproc->old_htop = p->old_htop;
+ sproc->old_heap = p->old_heap;
+ sproc->mbuf = NULL;
+ sproc->mbuf_sz = 0;
+ ERTS_INIT_OFF_HEAP(&sproc->off_heap);
+ env->proc = sproc;
#endif
}
@@ -623,10 +628,28 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid,
}
} else {
Uint sz = size_object(msg);
+ ErlOffHeap *ohp;
Eterm *hp;
- mp = erts_alloc_message(sz, &hp);
- msg = copy_struct(msg, sz, &hp, &mp->hfrag.off_heap);
- ASSERT(hp == mp->hfrag.mem+mp->hfrag.used_size);
+ if (env && !env->tracee) {
+ flush_env(env);
+ mp = erts_alloc_message_heap(rp, &rp_locks, sz, &hp, &ohp);
+ cache_env(env);
+ }
+ else {
+ erts_aint_t state = erts_smp_atomic32_read_nob(&rp->state);
+ if (state & ERTS_PSFLG_OFF_HEAP_MSGQ) {
+ mp = erts_alloc_message(sz, &hp);
+ ohp = sz == 0 ? NULL : &mp->hfrag.off_heap;
+ }
+ else {
+ ErlHeapFragment *bp = new_message_buffer(sz);
+ mp = erts_alloc_message(0, NULL);
+ mp->data.heap_frag = bp;
+ hp = bp->mem;
+ ohp = &bp->off_heap;
+ }
+ }
+ msg = copy_struct(msg, sz, &hp, ohp);
}
ERL_MESSAGE_TERM(mp) = msg;
@@ -780,19 +803,13 @@ ERL_NIF_TERM enif_make_copy(ErlNifEnv* dst_env, ERL_NIF_TERM src_term)
{
Uint sz;
Eterm* hp;
-#ifdef SHCOPY
- erts_shcopy_t info;
- INITIALIZE_SHCOPY(info);
- sz = copy_shared_calculate(src_term, &info);
- hp = alloc_heap(dst_env, sz);
- src_term = copy_shared_perform(src_term, sz, &info, &hp, &MSO(dst_env->proc));
- DESTROY_SHCOPY(info);
- return src_term;
-#else
+ /*
+ * No preserved sharing allowed as long as literals are also preserved.
+ * Process independent environment can not be reached by purge.
+ */
sz = size_object(src_term);
hp = alloc_heap(dst_env, sz);
return copy_struct(src_term, sz, &hp, &MSO(dst_env->proc));
-#endif
}
@@ -2641,18 +2658,21 @@ done:
}
int
-enif_is_on_dirty_scheduler(ErlNifEnv* env)
+enif_thread_type(void)
{
- int scheduler;
- Process *c_p;
+ ErtsSchedulerData *esdp = erts_get_scheduler_data();
- execution_state(env, &c_p, &scheduler);
+ if (!esdp)
+ return ERL_NIF_THR_UNDEFINED;
+
+ if (!ERTS_SCHEDULER_IS_DIRTY(esdp))
+ return ERL_NIF_THR_NORMAL_SCHEDULER;
- if (!c_p || !scheduler)
- erts_exit(ERTS_ABORT_EXIT, "enif_is_on_dirty_scheduler: "
- "Invalid env");
+ if (ERTS_SCHEDULER_IS_DIRTY_CPU(esdp))
+ return ERL_NIF_THR_DIRTY_CPU_SCHEDULER;
- return scheduler < 0;
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY_IO(esdp));
+ return ERL_NIF_THR_DIRTY_IO_SCHEDULER;
}
/* Maps */
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index da7a754757..494971e118 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -209,6 +209,17 @@ typedef enum {
ERL_NIF_BIN2TERM_SAFE = 0x20000000
} ErlNifBinaryToTerm;
+/*
+ * Return values from enif_thread_type(). Negative values
+ * reserved for specific types of non-scheduler threads.
+ * Positive values reserved for scheduler thread types.
+ */
+
+#define ERL_NIF_THR_UNDEFINED 0
+#define ERL_NIF_THR_NORMAL_SCHEDULER 1
+#define ERL_NIF_THR_DIRTY_CPU_SCHEDULER 2
+#define ERL_NIF_THR_DIRTY_IO_SCHEDULER 3
+
#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
# define ERL_NIF_API_FUNC_DECL(RET_TYPE, NAME, ARGS) RET_TYPE (*NAME) ARGS
typedef struct {
diff --git a/erts/emulator/beam/erl_nif_api_funcs.h b/erts/emulator/beam/erl_nif_api_funcs.h
index b211ab4b16..9a8f216773 100644
--- a/erts/emulator/beam/erl_nif_api_funcs.h
+++ b/erts/emulator/beam/erl_nif_api_funcs.h
@@ -173,7 +173,7 @@ ERL_NIF_API_FUNC_DECL(int, enif_get_local_port, (ErlNifEnv* env, ERL_NIF_TERM, E
ERL_NIF_API_FUNC_DECL(int, enif_term_to_binary, (ErlNifEnv *env, ERL_NIF_TERM term, ErlNifBinary *bin));
ERL_NIF_API_FUNC_DECL(size_t, enif_binary_to_term, (ErlNifEnv *env, const unsigned char* data, size_t sz, ERL_NIF_TERM *term, unsigned int opts));
ERL_NIF_API_FUNC_DECL(int, enif_port_command, (ErlNifEnv *env, const ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg));
-ERL_NIF_API_FUNC_DECL(int,enif_is_on_dirty_scheduler,(ErlNifEnv*));
+ERL_NIF_API_FUNC_DECL(int,enif_thread_type,(void));
ERL_NIF_API_FUNC_DECL(int,enif_snprintf,(char * buffer, size_t size, const char *format, ...));
/*
@@ -330,7 +330,7 @@ ERL_NIF_API_FUNC_DECL(int,enif_snprintf,(char * buffer, size_t size, const char
# define enif_term_to_binary ERL_NIF_API_FUNC_MACRO(enif_term_to_binary)
# define enif_binary_to_term ERL_NIF_API_FUNC_MACRO(enif_binary_to_term)
# define enif_port_command ERL_NIF_API_FUNC_MACRO(enif_port_command)
-# define enif_is_on_dirty_scheduler ERL_NIF_API_FUNC_MACRO(enif_is_on_dirty_scheduler)
+# define enif_thread_type ERL_NIF_API_FUNC_MACRO(enif_thread_type)
# define enif_snprintf ERL_NIF_API_FUNC_MACRO(enif_snprintf)
/*
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index a853ec585b..5193be85b4 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -149,7 +149,7 @@ extern BeamInstr beam_apply[];
extern BeamInstr beam_exit[];
extern BeamInstr beam_continue_exit[];
-int ERTS_WRITE_UNLIKELY(erts_default_spo_flags) = 0;
+int ERTS_WRITE_UNLIKELY(erts_default_spo_flags) = SPO_ON_HEAP_MSGQ;
int ERTS_WRITE_UNLIKELY(erts_eager_check_io) = 1;
int ERTS_WRITE_UNLIKELY(erts_sched_compact_load);
int ERTS_WRITE_UNLIKELY(erts_sched_balance_util) = 0;
@@ -8197,7 +8197,7 @@ sched_dirty_cpu_thread_func(void *vesdp)
#endif
erts_thread_init_float();
- process_main();
+ erts_dirty_process_main(esdp);
/* No schedulers should *ever* terminate */
erts_exit(ERTS_ABORT_EXIT,
"Dirty CPU scheduler thread number %beu terminated\n",
@@ -8242,7 +8242,7 @@ sched_dirty_io_thread_func(void *vesdp)
#endif
erts_thread_init_float();
- process_main();
+ erts_dirty_process_main(esdp);
/* No schedulers should *ever* terminate */
erts_exit(ERTS_ABORT_EXIT,
"Dirty I/O scheduler thread number %beu terminated\n",
@@ -9377,77 +9377,6 @@ scheduler_gc_proc(Process *c_p, int reds_left)
return reds;
}
-static ERTS_INLINE void
-clean_dirty_start(Process *p)
-{
-#if defined(ERTS_DIRTY_SCHEDULERS) && !defined(ARCH_64)
- void *ptr = ERTS_PROC_SET_DIRTY_CPU_START(p, NULL);
- if (ptr)
- erts_free(ERTS_ALC_T_DIRTY_START, ptr);
-#endif
-}
-
-static ERTS_INLINE void
-save_dirty_start(ErtsSchedulerData *esdp, Process *c_p)
-{
-#ifdef ERTS_DIRTY_SCHEDULERS
- if (ERTS_RUNQ_IS_DIRTY_CPU_RUNQ(esdp->run_queue)) {
- ErtsMonotonicTime time = erts_get_monotonic_time(esdp);
-#ifdef ARCH_64
- ERTS_PROC_SET_DIRTY_CPU_START(c_p, (void *) time);
-#else
- ErtsMonotonicTime *stimep;
-
- stimep = (ErtsMonotonicTime *) ERTS_PROC_GET_DIRTY_CPU_START(c_p);
- if (!stimep) {
- stimep = erts_alloc(ERTS_ALC_T_DIRTY_START,
- sizeof(ErtsMonotonicTime));
- ERTS_PROC_SET_DIRTY_CPU_START(c_p, (void *) stimep);
- }
- *stimep = time;
-#endif
- }
-#endif
-}
-
-static ERTS_INLINE int
-get_dirty_reds(ErtsSchedulerData *esdp, Process *c_p)
-{
-
-#ifndef ERTS_DIRTY_SCHEDULERS
- return -1;
-#else
- ErtsMonotonicTime stime, time;
-
- if (!ERTS_RUNQ_IS_DIRTY_CPU_RUNQ(esdp->run_queue))
- return 1;
-
-#ifdef ARCH_64
- stime = (ErtsMonotonicTime) ERTS_PROC_GET_DIRTY_CPU_START(c_p);
-#else
- {
- ErtsMonotonicTime *stimep;
- stimep = (ErtsMonotonicTime *) ERTS_PROC_GET_DIRTY_CPU_START(c_p);
- ASSERT(stimep);
- stime = *stimep;
- }
-#endif
-
- time = erts_get_monotonic_time(esdp);
-
- ASSERT(stime && stime < time);
-
- time -= stime;
- time = ERTS_MONOTONIC_TO_USEC(time);
- time *= 2;
-
- if (time > INT_MAX)
- return INT_MAX;
- return (int) time;
-#endif
-
-}
-
/*
* schedule() is called from BEAM (process_main()) or HiPE
* (hipe_mode_switch()) when the current process is to be
@@ -9466,11 +9395,10 @@ get_dirty_reds(ErtsSchedulerData *esdp, Process *c_p)
* so that normal processes get to run more frequently.
*/
-Process *schedule(Process *p, int calls)
+Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls)
{
Process *proxy_p = NULL;
ErtsRunQueue *rq;
- ErtsSchedulerData *esdp;
int context_reds;
int fcalls;
int input_reductions;
@@ -9507,8 +9435,19 @@ Process *schedule(Process *p, int calls)
* Clean up after the process being scheduled out.
*/
if (!p) { /* NULL in the very first schedule() call */
+#ifdef ERTS_DIRTY_SCHEDULERS
+ is_normal_sched = !esdp;
+ if (is_normal_sched) {
+ esdp = erts_get_scheduler_data();
+ ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+ }
+ else {
+ ASSERT(ERTS_SCHEDULER_IS_DIRTY(esdp));
+ }
+#else
esdp = erts_get_scheduler_data();
- is_normal_sched = !ERTS_SCHEDULER_IS_DIRTY(esdp);
+ is_normal_sched = 1;
+#endif
rq = erts_get_runq_current(esdp);
ASSERT(esdp);
fcalls = (int) erts_smp_atomic32_read_acqb(&function_calls);
@@ -9517,12 +9456,12 @@ Process *schedule(Process *p, int calls)
} else {
#ifdef ERTS_SMP
#ifdef ERTS_DIRTY_SCHEDULERS
- esdp = p->scheduler_data;
- is_normal_sched = esdp != NULL;
- if (is_normal_sched)
+ is_normal_sched = !esdp;
+ if (is_normal_sched) {
+ esdp = p->scheduler_data;
ASSERT(!ERTS_SCHEDULER_IS_DIRTY(esdp));
+ }
else {
- esdp = erts_get_scheduler_data();
ASSERT(ERTS_SCHEDULER_IS_DIRTY(esdp));
}
#else
@@ -9541,10 +9480,7 @@ Process *schedule(Process *p, int calls)
ERTS_SMP_CHK_HAVE_ONLY_MAIN_PROC_LOCK(p);
- if (is_normal_sched)
- reds = actual_reds = calls - esdp->virtual_reds;
- else
- reds = actual_reds = get_dirty_reds(esdp, p);
+ reds = actual_reds = calls - esdp->virtual_reds;
ASSERT(actual_reds >= 0);
if (reds < ERTS_PROC_MIN_CONTEXT_SWITCH_REDS_COST)
@@ -9994,17 +9930,10 @@ Process *schedule(Process *p, int calls)
calls = 0;
reds = context_reds;
-#ifdef ERTS_SMP
-
erts_smp_runq_unlock(rq);
-#endif /* ERTS_SMP */
-
}
- if (!is_normal_sched)
- save_dirty_start(esdp, p);
-
#ifdef ERTS_SMP
if (flags & ERTS_RUNQ_FLG_PROTECTED)
@@ -10153,7 +10082,7 @@ Process *schedule(Process *p, int calls)
}
}
- if (ERTS_IS_GC_DESIRED(p)) {
+ if (ERTS_IS_GC_DESIRED(p) && !ERTS_SCHEDULER_IS_DIRTY_IO(esdp)) {
if (!(state & ERTS_PSFLG_EXITING) && !(p->flags & (F_DELAY_GC|F_DISABLE_GC))) {
int cost = scheduler_gc_proc(p, reds);
calls += cost;
@@ -11206,6 +11135,8 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
flags |= F_ON_HEAP_MSGQ;
}
+ ASSERT((flags & F_ON_HEAP_MSGQ) || (flags & F_OFF_HEAP_MSGQ));
+
if (!rq)
rq = erts_get_runq_proc(parent);
@@ -11218,6 +11149,11 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
goto error;
}
+ ASSERT((erts_smp_atomic32_read_nob(&p->state)
+ & ERTS_PSFLG_ON_HEAP_MSGQ)
+ || (erts_smp_atomic32_read_nob(&p->state)
+ & ERTS_PSFLG_OFF_HEAP_MSGQ));
+
#ifdef BM_COUNTERS
processes_busy++;
#endif
@@ -11738,8 +11674,6 @@ delete_process(Process* p)
if (nif_export)
erts_destroy_nif_export(nif_export);
- clean_dirty_start(p);
-
/* Cleanup psd */
psd = (ErtsPSD *) erts_smp_atomic_read_nob(&p->psd);
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index b44ac442aa..7c98b60647 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -810,25 +810,13 @@ erts_smp_reset_max_len(ErtsRunQueue *rq, ErtsRunQueueInfo *rqi)
#define ERTS_PSD_DELAYED_GC_TASK_QS 4
#define ERTS_PSD_NIF_TRAP_EXPORT 5
#define ERTS_PSD_SUSPENDED_SAVED_CALLS_BUF 6
-#define ERTS_PSD_DIRTY_CPU_START 7
-#define ERTS_PSD_SIZE 8
+#define ERTS_PSD_SIZE 7
-#if !defined(HIPE) && !defined(ERTS_DIRTY_SCHEDULERS)
+#if !defined(HIPE)
# undef ERTS_PSD_SUSPENDED_SAVED_CALLS_BUF
-# undef ERTS_PSD_DIRTY_CPU_START
# undef ERTS_PSD_SIZE
# define ERTS_PSD_SIZE 6
-#elif !defined(HIPE)
-# undef ERTS_PSD_SUSPENDED_SAVED_CALLS_BUF
-# undef ERTS_PSD_DIRTY_CPU_START
-# undef ERTS_PSD_SIZE
-# define ERTS_PSD_DIRTY_CPU_START 6
-# define ERTS_PSD_SIZE 7
-#elif !defined(ERTS_DIRTY_SCHEDULERS)
-# undef ERTS_PSD_DIRTY_CPU_START
-# undef ERTS_PSD_SIZE
-# define ERTS_PSD_SIZE 7
#endif
typedef struct {
@@ -1179,6 +1167,9 @@ void erts_check_for_holes(Process* p);
* USR_PRIO -> User prio. i.e., prio the user has set.
* PRQ_PRIO -> Prio queue prio, i.e., prio queue currently
* enqueued in.
+ *
+ * Update etp-proc-state-int in $ERL_TOP/erts/etc/unix/etp-commands.in
+ * when changing ERTS_PSFLG_*.
*/
#define ERTS_PSFLGS_ACT_PRIO_MASK \
(ERTS_PSFLGS_PRIO_MASK << ERTS_PSFLGS_ACT_PRIO_OFFSET)
@@ -1831,7 +1822,7 @@ Eterm erts_get_schedulers_binds(Process *c_p);
Eterm erts_set_cpu_topology(Process *c_p, Eterm term);
Eterm erts_bind_schedulers(Process *c_p, Eterm how);
ErtsRunQueue *erts_schedid2runq(Uint);
-Process *schedule(Process*, int);
+Process *erts_schedule(ErtsSchedulerData *, Process*, int);
void erts_schedule_misc_op(void (*)(void *), void *);
Eterm erl_create_process(Process*, Eterm, Eterm, Eterm, ErlSpawnOpts*);
void erts_do_exit_process(Process*, Eterm);
@@ -2061,13 +2052,6 @@ erts_psd_set(Process *p, int ix, void *data)
((struct saved_calls *) erts_psd_set((P), ERTS_PSD_SUSPENDED_SAVED_CALLS_BUF, (void *) (SCB)))
#endif
-#ifdef ERTS_DIRTY_SCHEDULERS
-#define ERTS_PROC_GET_DIRTY_CPU_START(P) \
- ((void *) erts_psd_get((P), ERTS_PSD_DIRTY_CPU_START))
-#define ERTS_PROC_SET_DIRTY_CPU_START(P, DCS) \
- ((void *) erts_psd_set((P), ERTS_PSD_DIRTY_CPU_START, (void *) (DCS)))
-#endif
-
ERTS_GLB_INLINE Eterm erts_proc_get_error_handler(Process *p);
ERTS_GLB_INLINE Eterm erts_proc_set_error_handler(Process *p, Eterm handler);
diff --git a/erts/emulator/beam/erl_process_dump.c b/erts/emulator/beam/erl_process_dump.c
index eeaa9a569c..a70dfb8e73 100644
--- a/erts/emulator/beam/erl_process_dump.c
+++ b/erts/emulator/beam/erl_process_dump.c
@@ -560,6 +560,11 @@ dump_externally(int to, void *to_arg, Eterm term)
}
}
+ /* Do not handle maps */
+ if (is_map(term)) {
+ term = am_undefined;
+ }
+
s = p = sbuf;
erts_encode_ext(term, &p);
erts_print(to, to_arg, "E%X:", p-s);
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index ca001fc156..3dca58d60b 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -2625,7 +2625,7 @@ static void init_tracer_template(ErtsTracerNif *tnif) {
/* default tracer functions */
tnif->tracers[TRACE_FUN_DEFAULT].name = "trace";
- tnif->tracers[TRACE_FUN_DEFAULT].arity = 6;
+ tnif->tracers[TRACE_FUN_DEFAULT].arity = 5;
tnif->tracers[TRACE_FUN_DEFAULT].cb = NULL;
tnif->tracers[TRACE_FUN_ENABLED].name = "enabled";
@@ -2634,35 +2634,35 @@ static void init_tracer_template(ErtsTracerNif *tnif) {
/* specific tracer functions */
tnif->tracers[TRACE_FUN_T_SEND].name = "trace_send";
- tnif->tracers[TRACE_FUN_T_SEND].arity = 6;
+ tnif->tracers[TRACE_FUN_T_SEND].arity = 5;
tnif->tracers[TRACE_FUN_T_SEND].cb = NULL;
tnif->tracers[TRACE_FUN_T_RECEIVE].name = "trace_receive";
- tnif->tracers[TRACE_FUN_T_RECEIVE].arity = 6;
+ tnif->tracers[TRACE_FUN_T_RECEIVE].arity = 5;
tnif->tracers[TRACE_FUN_T_RECEIVE].cb = NULL;
tnif->tracers[TRACE_FUN_T_CALL].name = "trace_call";
- tnif->tracers[TRACE_FUN_T_CALL].arity = 6;
+ tnif->tracers[TRACE_FUN_T_CALL].arity = 5;
tnif->tracers[TRACE_FUN_T_CALL].cb = NULL;
tnif->tracers[TRACE_FUN_T_SCHED_PROC].name = "trace_running_procs";
- tnif->tracers[TRACE_FUN_T_SCHED_PROC].arity = 6;
+ tnif->tracers[TRACE_FUN_T_SCHED_PROC].arity = 5;
tnif->tracers[TRACE_FUN_T_SCHED_PROC].cb = NULL;
tnif->tracers[TRACE_FUN_T_SCHED_PORT].name = "trace_running_ports";
- tnif->tracers[TRACE_FUN_T_SCHED_PORT].arity = 6;
+ tnif->tracers[TRACE_FUN_T_SCHED_PORT].arity = 5;
tnif->tracers[TRACE_FUN_T_SCHED_PORT].cb = NULL;
tnif->tracers[TRACE_FUN_T_GC].name = "trace_garbage_collection";
- tnif->tracers[TRACE_FUN_T_GC].arity = 6;
+ tnif->tracers[TRACE_FUN_T_GC].arity = 5;
tnif->tracers[TRACE_FUN_T_GC].cb = NULL;
tnif->tracers[TRACE_FUN_T_PROCS].name = "trace_procs";
- tnif->tracers[TRACE_FUN_T_PROCS].arity = 6;
+ tnif->tracers[TRACE_FUN_T_PROCS].arity = 5;
tnif->tracers[TRACE_FUN_T_PROCS].cb = NULL;
tnif->tracers[TRACE_FUN_T_PORTS].name = "trace_ports";
- tnif->tracers[TRACE_FUN_T_PORTS].arity = 6;
+ tnif->tracers[TRACE_FUN_T_PORTS].arity = 5;
tnif->tracers[TRACE_FUN_T_PORTS].cb = NULL;
/* specific enabled functions */
@@ -2834,10 +2834,12 @@ send_to_tracer_nif_raw(Process *c_p, Process *tracee,
Eterm tag, Eterm msg, Eterm extra, Eterm pam_result)
{
if (tnif || (tnif = lookup_tracer_nif(tracer)) != NULL) {
-#define MAP_SIZE 3
- Eterm argv[6], local_heap[3+MAP_SIZE /* values */ + (MAP_SIZE+1 /* keys */)];
+#define MAP_SIZE 4
+ Eterm argv[5], local_heap[3+MAP_SIZE /* values */ + (MAP_SIZE+1 /* keys */)];
flatmap_t *map = (flatmap_t*)(local_heap+(MAP_SIZE+1));
Eterm *map_values = flatmap_get_values(map);
+ Eterm *map_keys = local_heap + 1;
+ Uint map_elem_count = 0;
topt = (tnif->tracers[topt].cb) ? topt : TRACE_FUN_DEFAULT;
ASSERT(topt < NIF_TRACER_TYPES);
@@ -2846,31 +2848,40 @@ send_to_tracer_nif_raw(Process *c_p, Process *tracee,
argv[1] = ERTS_TRACER_STATE(tracer);
argv[2] = t_p_id;
argv[3] = msg;
- argv[4] = extra == THE_NON_VALUE ? am_undefined : extra;
- argv[5] = make_flatmap(map);
+ argv[4] = make_flatmap(map);
map->thing_word = MAP_HEADER_FLATMAP;
- map->size = MAP_SIZE;
- map->keys = TUPLE3(local_heap, am_match_spec_result, am_scheduler_id, am_timestamp);
-
- *map_values++ = pam_result;
- if (tracee_flags & F_TRACE_SCHED_NO)
- *map_values++ = make_small(erts_get_scheduler_id());
- else
- *map_values++ = am_undefined;
+
+ if (extra != THE_NON_VALUE) {
+ map_keys[map_elem_count] = am_extra;
+ map_values[map_elem_count++] = extra;
+ }
+
+ if (pam_result != am_true) {
+ map_keys[map_elem_count] = am_match_spec_result;
+ map_values[map_elem_count++] = pam_result;
+ }
+
+ if (tracee_flags & F_TRACE_SCHED_NO) {
+ map_keys[map_elem_count] = am_scheduler_id;
+ map_values[map_elem_count++] = make_small(erts_get_scheduler_id());
+ }
+ map_keys[map_elem_count] = am_timestamp;
if (tracee_flags & F_NOW_TS)
#ifdef HAVE_ERTS_NOW_CPU
if (erts_cpu_timestamp)
- *map_values++ = am_cpu_timestamp;
+ map_values[map_elem_count++] = am_cpu_timestamp;
else
#endif
- *map_values++ = am_timestamp;
+ map_values[map_elem_count++] = am_timestamp;
else if (tracee_flags & F_STRICT_MON_TS)
- *map_values++ = am_strict_monotonic;
+ map_values[map_elem_count++] = am_strict_monotonic;
else if (tracee_flags & F_MON_TS)
- *map_values++ = am_monotonic;
- else
- *map_values++ = am_undefined;
+ map_values[map_elem_count++] = am_monotonic;
+
+ map->size = map_elem_count;
+ map->keys = make_tuple(local_heap);
+ local_heap[0] = make_arityval(map_elem_count);
#undef MAP_SIZE
erts_nif_call_function(c_p, tracee ? tracee : c_p,
diff --git a/erts/emulator/beam/erlang_lttng.h b/erts/emulator/beam/erlang_lttng.h
index 12f68e477b..4e869671f7 100644
--- a/erts/emulator/beam/erlang_lttng.h
+++ b/erts/emulator/beam/erlang_lttng.h
@@ -20,7 +20,7 @@
#ifdef USE_LTTNG
#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER com_ericsson_otp
+#define TRACEPOINT_PROVIDER org_erlang_otp
#undef TRACEPOINT_INCLUDE
#define TRACEPOINT_INCLUDE "erlang_lttng.h"
@@ -33,7 +33,7 @@
/* Schedulers */
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
scheduler_poll,
TP_ARGS(
int, id,
@@ -62,7 +62,7 @@ typedef struct {
/* Port and Driver Scheduling */
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_start,
TP_ARGS(
char*, pid,
@@ -77,7 +77,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_init,
TP_ARGS(
char*, driver,
@@ -94,7 +94,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_outputv,
TP_ARGS(
char*, pid,
@@ -111,7 +111,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_output,
TP_ARGS(
char*, pid,
@@ -128,7 +128,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_ready_input,
TP_ARGS(
char*, pid,
@@ -143,7 +143,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_ready_output,
TP_ARGS(
char*, pid,
@@ -158,7 +158,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_event,
TP_ARGS(
char*, pid,
@@ -173,7 +173,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_timeout,
TP_ARGS(
char*, pid,
@@ -188,7 +188,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_stop_select,
TP_ARGS(
char*, driver
@@ -199,7 +199,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_flush,
TP_ARGS(
char*, pid,
@@ -214,7 +214,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_stop,
TP_ARGS(
char*, pid,
@@ -229,7 +229,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_process_exit,
TP_ARGS(
char*, pid,
@@ -244,7 +244,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_ready_async,
TP_ARGS(
char*, pid,
@@ -259,7 +259,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_finish,
TP_ARGS(
char*, driver
@@ -270,7 +270,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_call,
TP_ARGS(
char*, pid,
@@ -289,7 +289,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
driver_control,
TP_ARGS(
char*, pid,
@@ -310,7 +310,7 @@ TRACEPOINT_EVENT(
/* Async pool */
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
aio_pool_get,
TP_ARGS(
char*, port,
@@ -323,7 +323,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
aio_pool_put,
TP_ARGS(
char*, port,
@@ -339,7 +339,7 @@ TRACEPOINT_EVENT(
/* Memory Allocator */
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
carrier_create,
TP_ARGS(
const char*, type,
@@ -365,7 +365,7 @@ TRACEPOINT_EVENT(
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
carrier_destroy,
TP_ARGS(
const char*, type,
@@ -390,7 +390,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
carrier_pool_put,
TP_ARGS(
const char*, name,
@@ -405,7 +405,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_otp,
+ org_erlang_otp,
carrier_pool_get,
TP_ARGS(
const char*, name,
diff --git a/erts/emulator/beam/export.c b/erts/emulator/beam/export.c
index 02c24557c1..2a19211987 100644
--- a/erts/emulator/beam/export.c
+++ b/erts/emulator/beam/export.c
@@ -31,7 +31,7 @@
#define EXPORT_INITIAL_SIZE 4000
#define EXPORT_LIMIT (512*1024)
-#define EXPORT_HASH(m,f,a) ((m)*(f)+(a))
+#define EXPORT_HASH(m,f,a) ((atom_val(m) * atom_val(f)) ^ (a))
#ifdef DEBUG
# define IF_DEBUG(x) x
@@ -79,8 +79,7 @@ struct export_templ
static struct export_blob* entry_to_blob(struct export_entry* ee)
{
- return (struct export_blob*)
- ((char*)ee->ep - offsetof(struct export_blob,exp));
+ return ErtsContainerStruct(ee->ep, struct export_blob, exp);
}
void
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index b76b9cd874..f3d4ac56cd 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -62,6 +62,9 @@ struct enif_environment_t /* ErlNifEnv */
extern void erts_pre_nif(struct enif_environment_t*, Process*,
struct erl_module_nif*, Process* tracee);
extern void erts_post_nif(struct enif_environment_t* env);
+extern void erts_pre_dirty_nif(ErtsSchedulerData *,
+ struct enif_environment_t*, Process*,
+ struct erl_module_nif*, Process* tracee);
extern Eterm erts_nif_taints(Process* p);
extern void erts_print_nif_taints(int to, void* to_arg);
void erts_unload_nif(struct erl_module_nif* nif);
@@ -1152,6 +1155,7 @@ void print_pass_through(int, byte*, int);
int catchlevel(Process*);
void init_emulator(void);
void process_main(void);
+void erts_dirty_process_main(ErtsSchedulerData *);
Eterm build_stacktrace(Process* c_p, Eterm exc);
Eterm expand_error_value(Process* c_p, Uint freason, Eterm Value);
void erts_save_stacktrace(Process* p, struct StackTrace* s, int depth);
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 0377f6cb5e..01df5476db 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -938,18 +938,32 @@ int erts_port_handle_xports(Port *prt)
** -2 on type error
*/
-#define SET_VEC(iov, bv, bin, ptr, len, vlen) do { \
- (iov)->iov_base = (ptr); \
- (iov)->iov_len = (len); \
- if (sizeof((iov)->iov_len) < sizeof(len) \
- /* Check if (len) overflowed (iov)->iov_len */ \
- && (iov)->iov_len != (len)) { \
- goto L_overflow; \
- } \
- *(bv)++ = (bin); \
- (iov)++; \
- (vlen)++; \
-} while(0)
+#ifdef DEBUG
+#define MAX_SYSIOVEC_IOVLEN (1ull << (32 - 1))
+#else
+#define MAX_SYSIOVEC_IOVLEN (1ull << (sizeof(((SysIOVec*)0)->iov_len) * 8 - 1))
+#endif
+
+static ERTS_INLINE void
+io_list_to_vec_set_vec(SysIOVec **iov, ErlDrvBinary ***binv,
+ ErlDrvBinary *bin, byte *ptr, Uint len,
+ int *vlen)
+{
+ while (len > MAX_SYSIOVEC_IOVLEN) {
+ (*iov)->iov_base = ptr;
+ (*iov)->iov_len = MAX_SYSIOVEC_IOVLEN;
+ ptr += MAX_SYSIOVEC_IOVLEN;
+ len -= MAX_SYSIOVEC_IOVLEN;
+ (*iov)++;
+ (*vlen)++;
+ *(*binv)++ = bin;
+ }
+ (*iov)->iov_base = ptr;
+ (*iov)->iov_len = len;
+ *(*binv)++ = bin;
+ (*iov)++;
+ (*vlen)++;
+}
static int
io_list_to_vec(Eterm obj, /* io-list */
@@ -960,11 +974,11 @@ io_list_to_vec(Eterm obj, /* io-list */
{
DECLARE_ESTACK(s);
Eterm* objp;
- char *buf = cbin->orig_bytes;
+ byte *buf = (byte*)cbin->orig_bytes;
Uint len = cbin->orig_size;
Uint csize = 0;
int vlen = 0;
- char* cptr = buf;
+ byte* cptr = buf;
goto L_jump_start; /* avoid push */
@@ -1032,15 +1046,17 @@ io_list_to_vec(Eterm obj, /* io-list */
len -= size;
} else {
if (csize != 0) {
- SET_VEC(iov, binv, cbin, cptr, csize, vlen);
+ io_list_to_vec_set_vec(&iov, &binv, cbin,
+ cptr, csize, &vlen);
cptr = buf;
csize = 0;
}
if (pb->flags) {
erts_emasculate_writable_binary(pb);
}
- SET_VEC(iov, binv, Binary2ErlDrvBinary(pb->val),
- pb->bytes+offset, size, vlen);
+ io_list_to_vec_set_vec(
+ &iov, &binv, Binary2ErlDrvBinary(pb->val),
+ pb->bytes+offset, size, &vlen);
}
} else {
ErlHeapBin* hb = (ErlHeapBin *) bptr;
@@ -1060,7 +1076,7 @@ io_list_to_vec(Eterm obj, /* io-list */
}
if (csize != 0) {
- SET_VEC(iov, binv, cbin, cptr, csize, vlen);
+ io_list_to_vec_set_vec(&iov, &binv, cbin, cptr, csize, &vlen);
}
DESTROY_ESTACK(s);
@@ -1086,10 +1102,13 @@ do { \
if (_bitsize != 0) goto L_type_error; \
if (thing_subtag(*binary_val(_real)) == REFC_BINARY_SUBTAG && \
_bitoffs == 0) { \
- b_size += _size; \
+ b_size += _size; \
if (b_size < _size) goto L_overflow_error; \
in_clist = 0; \
- v_size++; \
+ v_size++; \
+ /* If iov_len is smaller then Uint we split the binary into*/ \
+ /* multiple smaller (2GB) elements in the iolist.*/ \
+ v_size += _size / MAX_SYSIOVEC_IOVLEN; \
if (_size >= ERL_SMALL_IO_BIN_LIMIT) { \
p_in_clist = 0; \
p_v_size++; \
diff --git a/erts/emulator/beam/lttng-wrapper.h b/erts/emulator/beam/lttng-wrapper.h
index 294872c365..0bc75c1552 100644
--- a/erts/emulator/beam/lttng-wrapper.h
+++ b/erts/emulator/beam/lttng-wrapper.h
@@ -77,23 +77,23 @@
(RQ)->scheduler->no
#define LTTNG_ENABLED(Name) \
- tracepoint_enabled(com_ericsson_otp, Name)
+ tracepoint_enabled(org_erlang_otp, Name)
/* include a special LTTNG_DO for do_tracepoint ? */
#define LTTNG1(Name, Arg1) \
- tracepoint(com_ericsson_otp, Name, (Arg1))
+ tracepoint(org_erlang_otp, Name, (Arg1))
#define LTTNG2(Name, Arg1, Arg2) \
- tracepoint(com_ericsson_otp, Name, (Arg1), (Arg2))
+ tracepoint(org_erlang_otp, Name, (Arg1), (Arg2))
#define LTTNG3(Name, Arg1, Arg2, Arg3) \
- tracepoint(com_ericsson_otp, Name, (Arg1), (Arg2), (Arg3))
+ tracepoint(org_erlang_otp, Name, (Arg1), (Arg2), (Arg3))
#define LTTNG4(Name, Arg1, Arg2, Arg3, Arg4) \
- tracepoint(com_ericsson_otp, Name, (Arg1), (Arg2), (Arg3), (Arg4))
+ tracepoint(org_erlang_otp, Name, (Arg1), (Arg2), (Arg3), (Arg4))
#define LTTNG5(Name, Arg1, Arg2, Arg3, Arg4, Arg5) \
- tracepoint(com_ericsson_otp, Name, (Arg1), (Arg2), (Arg3), (Arg4), (Arg5))
+ tracepoint(org_erlang_otp, Name, (Arg1), (Arg2), (Arg3), (Arg4), (Arg5))
#else /* USE_LTTNG */
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index f303d4f167..dfe82cab44 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -97,7 +97,7 @@
((UWord)((char*)(ptr) - (char*)(start)) < (nbytes))
#define ErtsContainerStruct(ptr, type, member) \
- (type *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member))
+ ((type *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member)))
#if defined (__WIN32__)
# include "erl_win_sys.h"
@@ -154,8 +154,9 @@ typedef ERTS_SYS_FD_TYPE ErtsSysFdType;
# define ERTS_WRITE_UNLIKELY(X) X
#endif
+/* clang may have too low __GNUC__ versions but can handle it */
#ifdef __GNUC__
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) || defined(__clang__)
# define ERTS_DECLARE_DUMMY(X) X __attribute__ ((unused))
# else
# define ERTS_DECLARE_DUMMY(X) X
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index cedc88e5fe..675fafa726 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -2210,7 +2210,9 @@ do_allocate_logger_message(Eterm gleader, Eterm **hp, ErlOffHeap **ohp,
#ifndef ERTS_SMP
#ifdef USE_THREADS
- if (erts_get_scheduler_data()) /* Must be scheduler thread */
+ if (!erts_get_scheduler_data()) /* Must be scheduler thread */
+ *p = NULL;
+ else
#endif
{
*p = erts_whereis_process(NULL, 0, am_error_logger, 0, 0);
@@ -2226,18 +2228,10 @@ do_allocate_logger_message(Eterm gleader, Eterm **hp, ErlOffHeap **ohp,
}
/* So we have an error logger, lets build the message */
- if (sz <= HeapWordsLeft(*p)) {
- *ohp = &MSO(*p);
- *hp = HEAP_TOP(*p);
- HEAP_TOP(*p) += sz;
- } else {
-#endif
- *bp = new_message_buffer(sz);
- *ohp = &(*bp)->off_heap;
- *hp = (*bp)->mem;
-#ifndef ERTS_SMP
- }
#endif
+ *bp = new_message_buffer(sz);
+ *ohp = &(*bp)->off_heap;
+ *hp = (*bp)->mem;
return (is_nil(gleader)
? am_noproc
@@ -3893,8 +3887,10 @@ void bin_write(int to, void *to_arg, byte* buf, size_t sz)
}
/* Fill buf with the contents of bytelist list
- return number of chars in list or -1 for error */
-
+ * return number of chars in list
+ * or -1 for type error
+ * or -2 for not enough buffer space (buffer contains truncated result)
+ */
Sint
intlist_to_buf(Eterm list, char *buf, Sint len)
{
@@ -3917,7 +3913,7 @@ intlist_to_buf(Eterm list, char *buf, Sint len)
return -1;
listptr = list_val(*(listptr + 1));
}
- return -1; /* not enough space */
+ return -2; /* not enough space */
}
/*
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index e87d141ddb..93ea9f5dcb 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stddef.h>
#include <ctype.h>
#include <sys/types.h>
#include <errno.h>
@@ -58,6 +59,9 @@
#ifdef HAVE_NETPACKET_PACKET_H
#include <netpacket/packet.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
/* All platforms fail on malloc errors. */
#define FATAL_MALLOC
@@ -573,7 +577,7 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#ifdef HAVE_SOCKLEN_T
# define SOCKLEN_T socklen_t
#else
-# define SOCKLEN_T int
+# define SOCKLEN_T size_t
#endif
#include "packet_parser.h"
@@ -587,6 +591,22 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
(((unsigned char*) (s))[1] << 8) | \
(((unsigned char*) (s))[0]))
+/* strnlen doesn't exist everywhere */
+static size_t my_strnlen(const char *s, size_t maxlen)
+{
+ size_t i = 0;
+ while (i < maxlen && s[i] != '\0')
+ i++;
+ return i;
+}
+
+/* Check that some character in the buffer != '\0' */
+static int is_nonzero(const char *s, size_t n)
+{
+ size_t i;
+ for (i = 0; i < n; i++) if (s[i] != '\0') return !0;
+ return 0;
+}
#ifdef VALGRIND
# include <valgrind/memcheck.h>
@@ -607,10 +627,13 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
*/
/* general address encode/decode tag */
+#define INET_AF_UNSPEC 0
#define INET_AF_INET 1
#define INET_AF_INET6 2
#define INET_AF_ANY 3 /* INADDR_ANY or IN6ADDR_ANY_INIT */
#define INET_AF_LOOPBACK 4 /* INADDR_LOOPBACK or IN6ADDR_LOOPBACK_INIT */
+#define INET_AF_LOCAL 5
+#define INET_AF_UNDEFINED 6 /* Unknown */
/* open and INET_REQ_GETTYPE enumeration */
#define INET_TYPE_STREAM 1
@@ -633,7 +656,7 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
/* INET_REQ_GETSTATUS enumeration */
#define INET_F_OPEN 0x0001
-#define INET_F_BOUND 0x0002
+/* INET_F_BOUND removed - renumber when there comes a bigger rewrite */
#define INET_F_ACTIVE 0x0004
#define INET_F_LISTEN 0x0008
#define INET_F_CON 0x0010
@@ -831,19 +854,15 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#define INET_STATE_CLOSED (0)
#define INET_STATE_OPEN (INET_F_OPEN)
-#define INET_STATE_BOUND (INET_STATE_OPEN | INET_F_BOUND)
-#define INET_STATE_CONNECTED (INET_STATE_BOUND | INET_F_ACTIVE)
-#define INET_STATE_LISTENING (INET_STATE_BOUND | INET_F_LISTEN)
-#define INET_STATE_CONNECTING (INET_STATE_BOUND | INET_F_CON)
+#define INET_STATE_CONNECTED (INET_STATE_OPEN | INET_F_ACTIVE)
+#define INET_STATE_LISTENING (INET_STATE_OPEN | INET_F_LISTEN)
+#define INET_STATE_CONNECTING (INET_STATE_OPEN | INET_F_CON)
#define INET_STATE_ACCEPTING (INET_STATE_LISTENING | INET_F_ACC)
#define INET_STATE_MULTI_ACCEPTING (INET_STATE_ACCEPTING | INET_F_MULTI_CLIENT)
#define IS_OPEN(d) \
(((d)->state & INET_F_OPEN) == INET_F_OPEN)
-#define IS_BOUND(d) \
- (((d)->state & INET_F_BOUND) == INET_F_BOUND)
-
#define IS_CONNECTED(d) \
(((d)->state & INET_STATE_CONNECTED) == INET_STATE_CONNECTED)
@@ -896,19 +915,35 @@ typedef union {
#ifdef HAVE_IN6
struct sockaddr_in6 sai6;
#endif
+#ifdef HAVE_SYS_UN_H
+ struct sockaddr_un sal;
+#endif
} inet_address;
-/* for AF_INET & AF_INET6 */
-#define inet_address_port(x) ((x)->sai.sin_port)
+#define inet_address_port(x) \
+ ((((x)->sai.sin_family == AF_INET) || \
+ ((x)->sai.sin_family == AF_INET6)) ? \
+ ((x)->sai.sin_port) : -1)
+
+#ifdef HAVE_SYS_UN_H
+#define localaddrlen(data) \
+ ((((unsigned char*)(data))[0] == INET_AF_LOCAL) ? \
+ (1 + 1 + ((unsigned char*)(data))[1]) : 1)
+#else
+#define localaddrlen(data) (1)
+#endif
#if defined(HAVE_IN6) && defined(AF_INET6)
-#define addrlen(family) \
- ((family == AF_INET) ? sizeof(struct in_addr) : \
- ((family == AF_INET6) ? sizeof(struct in6_addr) : 0))
+#define addrlen(data) \
+ ((((unsigned char*)(data))[0] == INET_AF_INET) ? \
+ (1 + 2 + 4) : \
+ ((((unsigned char*)(data))[0] == INET_AF_INET6) ? \
+ (1 + 2 + 16) : localaddrlen(data)))
#else
-#define addrlen(family) \
- ((family == AF_INET) ? sizeof(struct in_addr) : 0)
+#define addrlen(data) \
+ ((((unsigned char*)(data))[0] == INET_AF_INET) ? \
+ (1 + 2 + 4) : localaddrlen(data))
#endif
typedef struct _multi_timer_data {
@@ -999,8 +1034,10 @@ typedef struct {
inet_address peer_addr; /* fake peer address */
inet_address name_addr; /* fake local address */
- inet_address* peer_ptr; /* fake peername or NULL */
- inet_address* name_ptr; /* fake sockname or NULL */
+ inet_address* peer_ptr; /* fake peername or NULL */
+ inet_address* name_ptr; /* fake sockname or NULL */
+ SOCKLEN_T peer_addr_len; /* fake peername size */
+ SOCKLEN_T name_addr_len; /* fake sockname size */
int bufsz; /* minimum buffer constraint */
unsigned int hsz; /* the list header size, -1 is large !!! */
@@ -1246,6 +1283,8 @@ static int async_ref = 0; /* async reference id generator */
} while (0)
static ErlDrvTermData am_ok;
+static ErlDrvTermData am_undefined;
+static ErlDrvTermData am_unspec;
static ErlDrvTermData am_tcp;
static ErlDrvTermData am_error;
static ErlDrvTermData am_einval;
@@ -1262,6 +1301,7 @@ static ErlDrvTermData am_ssl_tls;
static ErlDrvTermData am_udp;
static ErlDrvTermData am_udp_passive;
static ErlDrvTermData am_udp_error;
+static ErlDrvTermData am_local;
#endif
#ifdef HAVE_SCTP
static ErlDrvTermData am_sctp;
@@ -1471,40 +1511,67 @@ static void *realloc_wrapper(void *current, ErlDrvSizeT size){
#endif
#ifdef HAVE_UDP
-static int load_ip_port(ErlDrvTermData* spec, int i, char* buf)
-{
- spec[i++] = ERL_DRV_INT;
- spec[i++] = (ErlDrvTermData) get_int16(buf);
- return i;
-}
-
-static int load_ip_address(ErlDrvTermData* spec, int i, int family, char* buf)
+static int load_address(ErlDrvTermData* spec, int i, char* buf)
{
int n;
- if (family == AF_INET) {
- for (n = 0; n < 4; n++) {
+ switch (*buf++) { /* Family */
+ case INET_AF_INET: {
+ for (n = 2; n < 2+4; n++) {
spec[i++] = ERL_DRV_INT;
spec[i++] = (ErlDrvTermData) ((unsigned char)buf[n]);
}
spec[i++] = ERL_DRV_TUPLE;
spec[i++] = 4;
+ spec[i++] = ERL_DRV_INT;
+ spec[i++] = (ErlDrvTermData) get_int16(buf);
+ break;
}
#if defined(HAVE_IN6) && defined(AF_INET6)
- else if (family == AF_INET6) {
- for (n = 0; n < 16; n += 2) {
+ case INET_AF_INET6: {
+ for (n = 2; n < 2+16; n += 2) {
spec[i++] = ERL_DRV_INT;
spec[i++] = (ErlDrvTermData) get_int16(buf+n);
}
spec[i++] = ERL_DRV_TUPLE;
spec[i++] = 8;
+ spec[i++] = ERL_DRV_INT;
+ spec[i++] = (ErlDrvTermData) get_int16(buf);
+ break;
}
#endif
- else {
+#ifdef HAVE_SYS_UN_H
+ case INET_AF_LOCAL: {
+ int len = *(unsigned char*)buf++;
+ i = LOAD_ATOM(spec, i, am_local);
+ i = LOAD_BUF2BINARY(spec, i, buf, len);
+ spec[i++] = ERL_DRV_TUPLE;
+ spec[i++] = 2;
+ spec[i++] = ERL_DRV_INT;
+ spec[i++] = 0;
+ break;
+ }
+#endif
+ case INET_AF_UNSPEC: {
+ i = LOAD_ATOM(spec, i, am_unspec);
+ i = LOAD_BUF2BINARY(spec, i, buf, 0);
spec[i++] = ERL_DRV_TUPLE;
+ spec[i++] = 2;
+ spec[i++] = ERL_DRV_INT;
spec[i++] = 0;
+ break;
+ }
+ default: { /* INET_AF_UNDEFINED */
+ i = LOAD_ATOM(spec, i, am_undefined);
+ i = LOAD_BUF2BINARY(spec, i, buf, 0);
+ spec[i++] = ERL_DRV_TUPLE;
+ spec[i++] = 2;
+ spec[i++] = ERL_DRV_INT;
+ spec[i++] = 0;
+ break;
+ }
}
return i;
-}
+ }
#endif
@@ -1512,10 +1579,13 @@ static int load_ip_address(ErlDrvTermData* spec, int i, int family, char* buf)
/* For SCTP, we often need to return {IP, Port} tuples: */
static int inet_get_address(char* dst, inet_address* src, unsigned int* len);
-#define LOAD_IP_AND_PORT_CNT \
+/* Max of {{int()*8},int()} | {{int()*4},int()} |
+ * {{'local',binary()},int()}
+ */
+#define LOAD_INET_GET_ADDRESS_CNT \
(8*LOAD_INT_CNT + LOAD_TUPLE_CNT + LOAD_INT_CNT + LOAD_TUPLE_CNT)
-static int load_ip_and_port
+static int load_inet_get_address
(ErlDrvTermData* spec, int i, inet_descriptor* desc,
struct sockaddr_storage* addr)
{
@@ -1533,8 +1603,7 @@ static int load_ip_and_port
/* NB: the following functions are safe to use, as they create tuples
of copied Ints on the "spec", and do not install any String pts --
a ptr to "abuf" would be dangling upon exiting this function: */
- i = load_ip_address(spec, i, desc->sfamily, abuf+3);
- i = load_ip_port (spec, i, abuf+1);
+ i = load_address(spec, i, abuf); /* IP,Port | Family,Addr */
i = LOAD_TUPLE (spec, i, 2);
return i;
}
@@ -2226,7 +2295,6 @@ static ErlDrvTermData am_http_error;
static ErlDrvTermData am_abs_path;
static ErlDrvTermData am_absoluteURI;
static ErlDrvTermData am_star;
-static ErlDrvTermData am_undefined;
static ErlDrvTermData am_http;
static ErlDrvTermData am_https;
static ErlDrvTermData am_scheme;
@@ -2917,7 +2985,7 @@ static int sctp_parse_async_event
ASSERT(sptr->spc_length <= sz); /* No buffer overrun */
i = LOAD_ATOM (spec, i, am_sctp_paddr_change);
- i = load_ip_and_port(spec, i, desc, &sptr->spc_aaddr);
+ i = load_inet_get_address(spec, i, desc, &sptr->spc_aaddr);
switch (sptr->spc_state)
{
@@ -3344,10 +3412,11 @@ static int tcp_error_message(tcp_descriptor* desc, int err)
#ifdef HAVE_UDP
/*
** active mode message:
-** {udp, S, IP, Port, [H1,...Hsz | Data]} or
-** {sctp, S, IP, Port, {[AncilData], Event_or_Data}}
+** {udp, S, IP, Port, [H1,...Hsz | Data]} or
+** {sctp, S, IP, Port, {[AncilData], Event_or_Data}}
** where
** [H1,...,HSz] are msg headers (without IP/Port, UDP only),
+** [AddrLen, H2,...,HSz] are msg headers for UDP AF_UNIX only
** Data : List() | Binary()
*/
static int packet_binary_message
@@ -3357,6 +3426,7 @@ static int packet_binary_message
ErlDrvTermData spec [PACKET_ERL_DRV_TERM_DATA_LEN];
int i = 0;
int alen;
+ char* data = bin->orig_bytes+offs;
DEBUGF(("packet_binary_message(%ld): len = %d\r\n",
(long)desc->port, len));
@@ -3366,13 +3436,12 @@ static int packet_binary_message
i = LOAD_ATOM(spec, i, am_udp ); /* UDP only */
# endif
i = LOAD_PORT(spec, i, desc->dport); /* S */
-
- alen = addrlen(desc->sfamily);
- i = load_ip_address(spec, i, desc->sfamily, bin->orig_bytes+offs+3);
- i = load_ip_port(spec, i, bin->orig_bytes+offs+1); /* IP, Port */
-
- offs += (alen + 3);
- len -= (alen + 3);
+
+ alen = addrlen(data);
+ i = load_address(spec, i, data); /* IP,Port | Family,Addr */
+
+ offs += alen;
+ len -= alen;
# ifdef HAVE_SCTP
if (!IS_SCTP(desc))
@@ -3759,6 +3828,8 @@ static int inet_init()
# endif
INIT_ATOM(ok);
+ INIT_ATOM(undefined);
+ INIT_ATOM(unspec);
INIT_ATOM(tcp);
#ifdef HAVE_UDP
INIT_ATOM(udp);
@@ -3775,6 +3846,7 @@ static int inet_init()
#ifdef HAVE_UDP
INIT_ATOM(udp_passive);
INIT_ATOM(udp_error);
+ INIT_ATOM(local);
#endif
INIT_ATOM(empty_out_q);
INIT_ATOM(ssl_tls);
@@ -3787,7 +3859,6 @@ static int inet_init()
INIT_ATOM(abs_path);
INIT_ATOM(absoluteURI);
am_star = driver_mk_atom("*");
- INIT_ATOM(undefined);
INIT_ATOM(http);
INIT_ATOM(https);
INIT_ATOM(scheme);
@@ -3883,7 +3954,7 @@ static int inet_init()
/*
-** Set a inaddr structure:
+** Set an inaddr structure:
** src = [P1,P0,X1,X2,.....]
** dst points to a structure large enugh to keep any kind
** of inaddr.
@@ -3923,6 +3994,18 @@ static char* inet_set_address(int family, inet_address* dst,
return src + 2+16;
}
#endif
+#ifdef HAVE_SYS_UN_H
+ else if ((family == AF_UNIX) && (*len >= 1)) {
+ int n = *((unsigned char*)src);
+ if ((*len < 1+n) || (sizeof(dst->sal.sun_path) < n+1))
+ return NULL;
+ sys_memzero((char*)dst, sizeof(struct sockaddr_un));
+ dst->sal.sun_family = family;
+ sys_memcpy(dst->sal.sun_path, src+1, n);
+ *len = offsetof(struct sockaddr_un, sun_path) + n;
+ return src + 1 + n;
+ }
+#endif
return NULL;
}
@@ -3931,7 +4014,7 @@ static char* inet_set_address(int family, inet_address* dst,
** or from argument if source data specifies constant address.
**
** src = [TAG,P1,P0] when TAG = INET_AF_ANY | INET_AF_LOOPBACK
-** src = [TAG,P1,P0,X1,X2,...] when TAG = INET_AF_INET | INET_AF_INET6
+** src = [TAG,P1,P0,X1,X2,...] when TAG = INET_AF_INET | INET_AF_INET6 | INET_AF_LOCAL
*/
static char *inet_set_faddress(int family, inet_address* dst,
char *src, ErlDrvSizeT* len) {
@@ -3949,6 +4032,12 @@ static char *inet_set_faddress(int family, inet_address* dst,
family = AF_INET6;
break;
# endif
+# ifdef HAVE_SYS_UN_H
+ case INET_AF_LOCAL: {
+ family = AF_UNIX;
+ break;
+ }
+# endif
case INET_AF_ANY:
case INET_AF_LOOPBACK: {
int port;
@@ -4012,7 +4101,6 @@ static char *inet_set_faddress(int family, inet_address* dst,
return inet_set_address(family, dst, src, len);
}
-
/* Get a inaddr structure
** src = inaddr structure
** *len is the lenght of structure
@@ -4023,6 +4111,7 @@ static char *inet_set_faddress(int family, inet_address* dst,
*/
static int inet_get_address(char* dst, inet_address* src, unsigned int* len)
{
+ /* Compare the code with inet_address_to_erlang() */
int family;
short port;
@@ -4045,6 +4134,36 @@ static int inet_get_address(char* dst, inet_address* src, unsigned int* len)
return 0;
}
#endif
+#ifdef HAVE_SYS_UN_H
+ else if (family == AF_UNIX) {
+ size_t n, m;
+ if (*len < offsetof(struct sockaddr_un, sun_path)) return -1;
+ n = *len - offsetof(struct sockaddr_un, sun_path);
+ if (255 < n) return -1;
+ /* Portability fix: Assume that the address is a zero terminated
+ * string, except when the first byte is \0 i.e the
+ * string length is 0. Then use the reported length instead.
+ * This fix handles Linux's abstract socket address
+ * nonportable extension.
+ */
+ m = my_strnlen(src->sal.sun_path, n);
+ if ((m == 0) && is_nonzero(src->sal.sun_path, n))
+ m = n;
+ dst[0] = INET_AF_LOCAL;
+ dst[1] = (char) ((unsigned char) m);
+ sys_memcpy(dst+2, src->sal.sun_path, m);
+ *len = 1 + 1 + m;
+ return 0;
+ }
+#endif
+ else if (family == AF_UNSPEC) {
+ dst[0] = INET_AF_UNSPEC;
+ *len = 1;
+ }
+ else {
+ dst[0] = INET_AF_UNDEFINED;
+ *len = 1;
+ }
return -1;
}
@@ -4053,7 +4172,9 @@ static int inet_get_address(char* dst, inet_address* src, unsigned int* len)
** according to the size of the current,
** and return the resulting encoded size
*/
-static int inet_address_to_erlang(char *dst, inet_address **src) {
+static int
+inet_address_to_erlang(char *dst, inet_address **src, SOCKLEN_T sz) {
+ /* Compare the code with inet_get_address() */
short port;
switch ((*src)->sa.sa_family) {
@@ -4078,6 +4199,30 @@ static int inet_address_to_erlang(char *dst, inet_address **src) {
(*src) = (inet_address *) (&(*src)->sai6 + 1);
return 1 + 2 + 16;
#endif
+#ifdef HAVE_SYS_UN_H
+ case AF_UNIX: {
+ size_t n, m;
+ if (sz < offsetof(struct sockaddr_un, sun_path)) return -1;
+ n = sz - offsetof(struct sockaddr_un, sun_path);
+ if (255 < n) return -1;
+ /* Portability fix: Assume that the address is a zero terminated
+ * string, except when the first byte is \0 i.e the
+ * string length is 0. Then use the reported length instead.
+ * This fix handles Linux's abstract socket address
+ * nonportable extension.
+ */
+ m = my_strnlen((*src)->sal.sun_path, n);
+ if ((m == 0) && is_nonzero((*src)->sal.sun_path, n))
+ m = n;
+ if (dst) {
+ dst[0] = INET_AF_LOCAL;
+ dst[1] = (char) ((unsigned char) m);
+ sys_memcpy(dst+2, (*src)->sal.sun_path, m);
+ }
+ (*src) = (inet_address *) (&(*src)->sal + 1);
+ return 1 + 1 + m;
+ }
+#endif
default:
return -1;
}
@@ -4086,7 +4231,7 @@ static int inet_address_to_erlang(char *dst, inet_address **src) {
/* Encode n encoded addresses from addrs in the result buffer
*/
static ErlDrvSizeT reply_inet_addrs
-(int n, inet_address *addrs, char **rbuf, ErlDrvSizeT rsize) {
+(int n, inet_address *addrs, char **rbuf, ErlDrvSizeT rsize, SOCKLEN_T sz) {
inet_address *ia;
int i, s;
ErlDrvSizeT rlen;
@@ -4094,11 +4239,19 @@ static ErlDrvSizeT reply_inet_addrs
if (IS_SOCKET_ERROR(n)) return ctl_error(sock_errno(), rbuf, rsize);
if (n == 0) return ctl_reply(INET_REP_OK, NULL, 0, rbuf, rsize);
+ /* The sz argument is only used when we have got an actual size
+ * of addrs[0] from e.g getsockname() and then n == 1
+ * so we will loop over 1 element below. Otherwise sz
+ * would be expected to differ between addresses but that
+ * can only happen for AF_UNIX and we will only be called with
+ * n > 1 for SCTP and that will never (?) happen with AF_UNIX
+ */
+
/* Calculate result length */
rlen = 1;
ia = addrs;
for (i = 0; i < n; i++) {
- s = inet_address_to_erlang(NULL, &ia);
+ s = inet_address_to_erlang(NULL, &ia, sz);
if (s < 0) break;
rlen += s;
}
@@ -4109,7 +4262,7 @@ static ErlDrvSizeT reply_inet_addrs
rlen = 1;
ia = addrs;
for (i = 0; i < n; i++) {
- s = inet_address_to_erlang((*rbuf)+rlen, &ia);
+ s = inet_address_to_erlang((*rbuf)+rlen, &ia, sz);
if (s < 0) break;
rlen += s;
}
@@ -4180,6 +4333,7 @@ static ErlDrvSSizeT inet_ctl_open(inet_descriptor* desc, int domain, int type,
char** rbuf, ErlDrvSizeT rsize)
{
int save_errno;
+ int protocol;
#ifdef HAVE_SETNS
int current_ns, new_ns;
current_ns = new_ns = 0;
@@ -4218,7 +4372,11 @@ static ErlDrvSSizeT inet_ctl_open(inet_descriptor* desc, int domain, int type,
}
}
#endif
- if ((desc->s = sock_open(domain, type, desc->sprotocol)) == INVALID_SOCKET)
+ protocol = desc->sprotocol;
+#ifdef HAVE_SYS_UN_H
+ if (domain == AF_UNIX) protocol = 0;
+#endif
+ if ((desc->s = sock_open(domain, type, protocol)) == INVALID_SOCKET)
save_errno = sock_errno();
#ifdef HAVE_SETNS
if (desc->netns != NULL) {
@@ -4272,10 +4430,12 @@ static ErlDrvSSizeT inet_ctl_fdopen(inet_descriptor* desc, int domain, int type,
char** rbuf, ErlDrvSizeT rsize)
{
inet_address name;
- unsigned int sz = sizeof(name);
+ unsigned int sz;
if (bound) {
/* check that it is a socket and that the socket is bound */
+ sz = sizeof(name);
+ sys_memzero((char *) &name, sz);
if (IS_SOCKET_ERROR(sock_name(s, (struct sockaddr*) &name, &sz)))
return ctl_error(sock_errno(), rbuf, rsize);
if (name.sa.sa_family != domain)
@@ -4290,10 +4450,7 @@ static ErlDrvSSizeT inet_ctl_fdopen(inet_descriptor* desc, int domain, int type,
driver_select(desc->port, desc->event, ERL_DRV_READ, 1);
#endif
- if (bound)
- desc->state = INET_STATE_BOUND;
- else
- desc->state = INET_STATE_OPEN;
+ desc->state = INET_STATE_OPEN;
if (type == SOCK_STREAM) { /* check if connected */
sz = sizeof(name);
@@ -7119,14 +7276,14 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
#ifdef HAVE_SCTP
#define LOAD_PADDRINFO_CNT \
- (2*LOAD_ATOM_CNT + LOAD_ASSOC_ID_CNT + LOAD_IP_AND_PORT_CNT + \
+ (2*LOAD_ATOM_CNT + LOAD_ASSOC_ID_CNT + LOAD_INET_GET_ADDRESS_CNT + \
4*LOAD_INT_CNT + LOAD_TUPLE_CNT)
static int load_paddrinfo (ErlDrvTermData * spec, int i,
inet_descriptor* desc, struct sctp_paddrinfo* pai)
{
i = LOAD_ATOM (spec, i, am_sctp_paddrinfo);
i = LOAD_ASSOC_ID (spec, i, pai->spinfo_assoc_id);
- i = load_ip_and_port(spec, i, desc, &pai->spinfo_address);
+ i = load_inet_get_address(spec, i, desc, &pai->spinfo_address);
switch(pai->spinfo_state)
{
case SCTP_ACTIVE:
@@ -7542,7 +7699,7 @@ static ErlDrvSSizeT sctp_fill_opts(inet_descriptor* desc,
/* Fill in the response: */
PLACE_FOR(spec, i,
2*LOAD_ATOM_CNT + LOAD_ASSOC_ID_CNT +
- LOAD_IP_AND_PORT_CNT + 2*LOAD_TUPLE_CNT);
+ LOAD_INET_GET_ADDRESS_CNT + 2*LOAD_TUPLE_CNT);
switch (eopt) {
case SCTP_OPT_PRIMARY_ADDR:
i = LOAD_ATOM(spec, i, am_sctp_primary_addr);
@@ -7556,7 +7713,7 @@ static ErlDrvSSizeT sctp_fill_opts(inet_descriptor* desc,
ASSERT(0);
}
i = LOAD_ASSOC_ID (spec, i, sp.sspp_assoc_id);
- i = load_ip_and_port(spec, i, desc, &sp.sspp_addr);
+ i = load_inet_get_address(spec, i, desc, &sp.sspp_addr);
i = LOAD_TUPLE (spec, i, 3);
i = LOAD_TUPLE (spec, i, 2);
break;
@@ -7603,11 +7760,11 @@ static ErlDrvSSizeT sctp_fill_opts(inet_descriptor* desc,
/* Fill in the response: */
PLACE_FOR(spec, i,
2*LOAD_ATOM_CNT + LOAD_ASSOC_ID_CNT +
- LOAD_IP_AND_PORT_CNT + 4*LOAD_INT_CNT);
+ LOAD_INET_GET_ADDRESS_CNT + 4*LOAD_INT_CNT);
i = LOAD_ATOM (spec, i, am_sctp_peer_addr_params);
i = LOAD_ATOM (spec, i, am_sctp_paddrparams);
i = LOAD_ASSOC_ID (spec, i, ap.spp_assoc_id);
- i = load_ip_and_port(spec, i, desc, &ap.spp_address);
+ i = load_inet_get_address(spec, i, desc, &ap.spp_address);
i = LOAD_INT (spec, i, ap.spp_hbinterval);
i = LOAD_INT (spec, i, ap.spp_pathmaxrxt);
@@ -8248,6 +8405,11 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
put_int32(INET_AF_INET6, &tbuf[0]);
}
#endif
+#ifdef HAVE_SYS_UN_H
+ else if (desc->sfamily == AF_UNIX) {
+ put_int32(INET_AF_LOCAL, &tbuf[0]);
+ }
+#endif
else
return ctl_error(EINVAL, rbuf, rsize);
@@ -8296,7 +8458,6 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
if (len != 4) return ctl_error(EINVAL, rbuf, rsize);
if (! IS_OPEN(desc)) return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (! IS_BOUND(desc)) return ctl_xerror(EXBADSEQ, rbuf, rsize);
#ifdef HAVE_SCTP
if (IS_SCTP(desc) && p_sctp_getpaddrs) {
@@ -8307,19 +8468,19 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
assoc_id = get_int32(buf);
n = p_sctp_getpaddrs(desc->s, assoc_id, &sa);
- rlen = reply_inet_addrs(n, (inet_address *) sa, rbuf, rsize);
+ rlen = reply_inet_addrs(n, (inet_address *) sa, rbuf, rsize, 0);
if (n > 0) p_sctp_freepaddrs(sa);
return rlen;
}
#endif
{ /* Fallback to sock_peer */
inet_address addr;
- unsigned int sz;
+ SOCKLEN_T sz;
int i;
sz = sizeof(addr);
i = sock_peer(desc->s, (struct sockaddr *) &addr, &sz);
- return reply_inet_addrs(i >= 0 ? 1 : i, &addr, rbuf, rsize);
+ return reply_inet_addrs(i >= 0 ? 1 : i, &addr, rbuf, rsize, sz);
}
}
@@ -8327,15 +8488,21 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
char tbuf[sizeof(inet_address)];
inet_address peer;
inet_address* ptr;
- unsigned int sz = sizeof(peer);
+ unsigned int sz;
DEBUGF(("inet_ctl(%ld): PEER\r\n", (long)desc->port));
if (!(desc->state & INET_F_ACTIVE))
return ctl_error(ENOTCONN, rbuf, rsize);
- if ((ptr = desc->peer_ptr) == NULL) {
+ if ((ptr = desc->peer_ptr) != NULL) {
+ sz = desc->peer_addr_len;
+ }
+ else {
ptr = &peer;
- if (IS_SOCKET_ERROR(sock_peer(desc->s, (struct sockaddr*)ptr,&sz)))
+ sz = sizeof(peer);
+ if (IS_SOCKET_ERROR
+ (sock_peer
+ (desc->s, (struct sockaddr*)ptr, &sz)))
return ctl_error(sock_errno(), rbuf, rsize);
}
if (inet_get_address(tbuf, ptr, &sz) < 0)
@@ -8350,11 +8517,12 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
}
else if (len < 2)
return ctl_error(EINVAL, rbuf, rsize);
- else if (inet_set_address(desc->sfamily, &desc->peer_addr,
- buf, &len) == NULL)
+ else if (inet_set_faddress
+ (desc->sfamily, &desc->peer_addr, buf, &len) == NULL)
return ctl_error(EINVAL, rbuf, rsize);
else {
desc->peer_ptr = &desc->peer_addr;
+ desc->peer_addr_len = (SOCKLEN_T) len;
return ctl_reply(INET_REP_OK, NULL, 0, rbuf, rsize);
}
}
@@ -8365,7 +8533,6 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
if (len != 4) return ctl_error(EINVAL, rbuf, rsize);
if (! IS_OPEN(desc)) return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (! IS_BOUND(desc)) return ctl_xerror(EXBADSEQ, rbuf, rsize);
#ifdef HAVE_SCTP
if (IS_SCTP(desc) && p_sctp_getladdrs) {
@@ -8376,19 +8543,20 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
assoc_id = get_int32(buf);
n = p_sctp_getladdrs(desc->s, assoc_id, &sa);
- rlen = reply_inet_addrs(n, (inet_address *) sa, rbuf, rsize);
+ rlen = reply_inet_addrs(n, (inet_address *) sa, rbuf, rsize, 0);
if (n > 0) p_sctp_freeladdrs(sa);
return rlen;
}
#endif
{ /* Fallback to sock_name */
inet_address addr;
- unsigned int sz;
+ SOCKLEN_T sz;
int i;
sz = sizeof(addr);
+ sys_memzero((char *) &addr, sz);
i = sock_name(desc->s, (struct sockaddr *) &addr, &sz);
- return reply_inet_addrs(i >= 0 ? 1 : i, &addr, rbuf, rsize);
+ return reply_inet_addrs(i >= 0 ? 1 : i, &addr, rbuf, rsize, sz);
}
}
@@ -8396,16 +8564,19 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
char tbuf[sizeof(inet_address)];
inet_address name;
inet_address* ptr;
- unsigned int sz = sizeof(name);
+ unsigned int sz;
DEBUGF(("inet_ctl(%ld): NAME\r\n", (long)desc->port));
- if (!IS_BOUND(desc))
- return ctl_error(EINVAL, rbuf, rsize); /* address is not valid */
-
- if ((ptr = desc->name_ptr) == NULL) {
+ if ((ptr = desc->name_ptr) != NULL) {
+ sz = desc->name_addr_len;
+ }
+ else {
ptr = &name;
- if (IS_SOCKET_ERROR(sock_name(desc->s, (struct sockaddr*)ptr, &sz)))
+ sz = sizeof(name);
+ sys_memzero((char *) &name, sz);
+ if (IS_SOCKET_ERROR
+ (sock_name(desc->s, (struct sockaddr*)ptr, &sz)))
return ctl_error(sock_errno(), rbuf, rsize);
}
if (inet_get_address(tbuf, ptr, &sz) < 0)
@@ -8413,18 +8584,19 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
return ctl_reply(INET_REP_OK, tbuf, sz, rbuf, rsize);
}
- case INET_REQ_SETNAME: { /* set fake peername Port Address */
+ case INET_REQ_SETNAME: { /* set fake sockname Port Address */
if (len == 0) {
desc->name_ptr = NULL;
return ctl_reply(INET_REP_OK, NULL, 0, rbuf, rsize);
}
else if (len < 2)
return ctl_error(EINVAL, rbuf, rsize);
- else if (inet_set_address(desc->sfamily, &desc->name_addr,
- buf, &len) == NULL)
+ else if (inet_set_faddress
+ (desc->sfamily, &desc->name_addr, buf, &len) == NULL)
return ctl_error(EINVAL, rbuf, rsize);
else {
desc->name_ptr = &desc->name_addr;
+ desc->name_addr_len = (SOCKLEN_T) len;
return ctl_reply(INET_REP_OK, NULL, 0, rbuf, rsize);
}
}
@@ -8432,7 +8604,7 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
case INET_REQ_BIND: { /* bind socket */
char tbuf[2];
inet_address local;
- short port;
+ int port;
DEBUGF(("inet_ctl(%ld): BIND\r\n", (long)desc->port));
@@ -8447,15 +8619,17 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf,
if (IS_SOCKET_ERROR(sock_bind(desc->s,(struct sockaddr*) &local, len)))
return ctl_error(sock_errno(), rbuf, rsize);
- desc->state = INET_STATE_BOUND;
+ desc->state = INET_STATE_OPEN;
- if ((port = inet_address_port(&local)) == 0) {
+ port = inet_address_port(&local);
+ if (port == 0) {
SOCKLEN_T adrlen = sizeof(local);
+ sys_memzero((char *) &local, adrlen);
sock_name(desc->s, &local.sa, &adrlen);
port = inet_address_port(&local);
}
- port = sock_ntohs(port);
- put_int16(port, tbuf);
+ else if (port == -1) port = 0;
+ put_int16(sock_ntohs((Uint16) port), tbuf);
return ctl_reply(INET_REP_OK, tbuf, 2, rbuf, rsize);
}
@@ -8912,6 +9086,11 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
return ctl_xerror("eafnosupport", rbuf, rsize);
break;
#endif
+#ifdef HAVE_SYS_UN_H
+ case INET_AF_LOCAL:
+ domain = AF_UNIX;
+ break;
+#endif
default:
return ctl_error(EINVAL, rbuf, rsize);
}
@@ -8938,6 +9117,11 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
return ctl_xerror("eafnosupport", rbuf, rsize);
break;
#endif
+#ifdef HAVE_SYS_UN_H
+ case INET_AF_LOCAL:
+ domain = AF_UNIX;
+ break;
+#endif
default:
return ctl_error(EINVAL, rbuf, rsize);
}
@@ -8960,8 +9144,6 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
return ctl_xerror(EXBADPORT, rbuf, rsize);
if (!IS_OPEN(INETP(desc)))
return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (!IS_BOUND(INETP(desc)))
- return ctl_xerror(EXBADSEQ, rbuf, rsize);
if (len != 2)
return ctl_error(EINVAL, rbuf, rsize);
backlog = get_int16(buf);
@@ -8984,8 +9166,6 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
return ctl_xerror(EXBADPORT, rbuf, rsize);
if (IS_CONNECTED(INETP(desc)))
return ctl_error(EISCONN, rbuf, rsize);
- if (!IS_BOUND(INETP(desc)))
- return ctl_xerror(EXBADSEQ, rbuf, rsize);
if (IS_CONNECTING(INETP(desc)))
return ctl_error(EINVAL, rbuf, rsize);
if (len < 6)
@@ -8993,8 +9173,8 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
timeout = get_int32(buf);
buf += 4;
len -= 4;
- if (inet_set_address(desc->inet.sfamily, &desc->inet.remote,
- buf, &len) == NULL)
+ if (inet_set_faddress
+ (desc->inet.sfamily, &desc->inet.remote, buf, &len) == NULL)
return ctl_error(EINVAL, rbuf, rsize);
code = sock_connect(desc->inet.s,
@@ -9086,6 +9266,7 @@ static ErlDrvSSizeT tcp_inet_ctl(ErlDrvData e, unsigned int cmd,
return ctl_reply(INET_REP_OK, tbuf, 2, rbuf, rsize);
} else {
n = sizeof(desc->inet.remote);
+ sys_memzero((char *) &remote, n);
s = sock_accept(desc->inet.s, (struct sockaddr*) &remote, &n);
if (s == INVALID_SOCKET) {
if (sock_errno() == ERRNO_BLOCK) {
@@ -9971,6 +10152,7 @@ static int tcp_inet_input(tcp_descriptor* desc, HANDLE event)
inet_async_op *this_op = desc->inet.opt;
len = sizeof(desc->inet.remote);
+ sys_memzero((char *) &remote, len);
s = sock_accept(desc->inet.s, (struct sockaddr*) &remote, &len);
if (s == INVALID_SOCKET && sock_errno() == ERRNO_BLOCK) {
/* Just try again, no real error, just a ghost trigger from poll,
@@ -10037,6 +10219,7 @@ static int tcp_inet_input(tcp_descriptor* desc, HANDLE event)
while (desc->inet.state == INET_STATE_MULTI_ACCEPTING) {
len = sizeof(desc->inet.remote);
+ sys_memzero((char *) &remote, len);
s = sock_accept(desc->inet.s, (struct sockaddr*) &remote, &len);
if (s == INVALID_SOCKET && sock_errno() == ERRNO_BLOCK) {
/* Just try again, no real error, keep the last return code */
@@ -10477,7 +10660,7 @@ static int tcp_inet_output(tcp_descriptor* desc, HANDLE event)
(struct sockaddr*) &desc->inet.remote, &sz);
if (IS_SOCKET_ERROR(code)) {
- desc->inet.state = INET_STATE_BOUND; /* restore state */
+ desc->inet.state = INET_STATE_OPEN; /* restore state */
ret = async_error(INETP(desc), sock_errno());
goto done;
}
@@ -10490,7 +10673,7 @@ static int tcp_inet_output(tcp_descriptor* desc, HANDLE event)
(void *)&error, &sz);
if ((code < 0) || error) {
- desc->inet.state = INET_STATE_BOUND; /* restore state */
+ desc->inet.state = INET_STATE_OPEN; /* restore state */
ret = async_error(INETP(desc), error);
goto done;
}
@@ -10777,6 +10960,9 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return ctl_xerror("eafnosupport", rbuf, rsize);
break;
#endif
+#ifdef HAVE_SYS_UN_H
+ case INET_AF_LOCAL: af = AF_UNIX; break;
+#endif
default:
return ctl_error(EINVAL, rbuf, rsize);
}
@@ -10827,6 +11013,9 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return ctl_xerror("eafnosupport", rbuf, rsize);
break;
#endif
+#ifdef HAVE_SYS_UN_H
+ case INET_AF_LOCAL: af = AF_UNIX; break;
+#endif
default:
return ctl_error(EINVAL, rbuf, rsize);
}
@@ -10893,8 +11082,6 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
if (!IS_OPEN(desc))
return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (!IS_BOUND(desc))
- return ctl_xerror(EXBADSEQ, rbuf, rsize);
#ifdef HAVE_SCTP
if (IS_SCTP(desc)) {
inet_address remote;
@@ -10909,7 +11096,7 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
/* For SCTP, we do not set the peer's addr in desc->remote, as
multiple peers are possible: */
- if (inet_set_address(desc->sfamily, &remote, buf, &len) == NULL)
+ if (inet_set_faddress(desc->sfamily, &remote, buf, &len) == NULL)
return ctl_error(EINVAL, rbuf, rsize);
sock_select(desc, FD_CONNECT, 1);
@@ -10949,8 +11136,8 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
/* Ignore timeout */
buf += 4;
len -= 4;
- if (inet_set_address(desc->sfamily,
- &desc->remote, buf, &len) == NULL)
+ if (inet_set_faddress
+ (desc->sfamily, &desc->remote, buf, &len) == NULL)
return ctl_error(EINVAL, rbuf, rsize);
code = sock_connect(desc->s,
@@ -10981,8 +11168,6 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return ctl_xerror(EXBADPORT, rbuf, rsize);
if (!IS_OPEN(desc))
return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (!IS_BOUND(desc))
- return ctl_xerror(EXBADSEQ, rbuf, rsize);
if (len != 2)
return ctl_error(EINVAL, rbuf, rsize);
@@ -11029,7 +11214,7 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return ctl_error(sock_errno(), rbuf, rsize);
}
- desc->state = INET_STATE_BOUND;
+ desc->state = INET_STATE_OPEN;
return ctl_reply(INET_REP_OK, NULL, 0, rbuf, rsize);
}
@@ -11046,8 +11231,6 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
return ctl_xerror(EXBADPORT, rbuf, rsize);
if (!IS_OPEN(desc))
return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (!IS_BOUND(desc))
- return ctl_xerror(EXBADSEQ, rbuf, rsize);
if (! p_sctp_peeloff)
return ctl_error(ENOTSUP, rbuf, rsize);
@@ -11088,8 +11271,6 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf,
/* INPUT: Timeout(4), Length(4) */
if (!IS_OPEN(desc))
return ctl_xerror(EXBADPORT, rbuf, rsize);
- if (!IS_BOUND(desc))
- return ctl_error(EINVAL, rbuf, rsize);
if (desc->active || (len != 8))
return ctl_error(EINVAL, rbuf, rsize);
timeout = get_int32(buf);
@@ -11130,12 +11311,12 @@ static void packet_inet_timeout(ErlDrvData e)
/* THIS IS A "send*" REQUEST; on the Erlang side: "port_command".
-** input should be: P1 P0 Address buffer .
+** input should be: Family Address buffer .
** For UDP, buffer (after Address) is just data to be sent.
** For SCTP, buffer contains a list representing 2 items:
** (1) 6 parms for sctp_sndrcvinfo, as in sctp_get_sendparams();
** (2) 0+ real data bytes.
-** There is no destination address -- SCTYP send is performed over
+** There is no destination address -- SCTP send is performed over
** an existing association, using "sctp_sndrcvinfo" specified.
*/
static void packet_inet_command(ErlDrvData e, char* buf, ErlDrvSizeT len)
@@ -11154,10 +11335,6 @@ static void packet_inet_command(ErlDrvData e, char* buf, ErlDrvSizeT len)
inet_reply_error(desc, EINVAL);
return;
}
- if (!IS_BOUND(desc)) {
- inet_reply_error(desc, EINVAL);
- return;
- }
#ifdef HAVE_SCTP
if (IS_SCTP(desc))
@@ -11210,7 +11387,7 @@ static void packet_inet_command(ErlDrvData e, char* buf, ErlDrvSizeT len)
/* UDP socket. Even if it is connected, there is an address prefix
here -- ignored for connected sockets: */
sz = len;
- qtr = inet_set_address(desc->sfamily, &other, ptr, &sz);
+ qtr = inet_set_faddress(desc->sfamily, &other, ptr, &sz);
if (qtr == NULL) {
inet_reply_error(desc, EINVAL);
return;
@@ -11288,6 +11465,8 @@ static int packet_inet_input(udp_descriptor* udesc, HANDLE event)
while(packet_count--) {
unsigned int len = sizeof(other);
+ sys_memzero((char *) &other, sizeof(other));
+
/* udesc->i_buf is only kept between SCTP fragments */
if (udesc->i_buf == NULL) {
udesc->i_bufsz = desc->bufsz + len;
@@ -11483,7 +11662,7 @@ static int packet_inet_output(udp_descriptor* udesc, HANDLE event)
(struct sockaddr*) &desc->remote, &sz);
if (IS_SOCKET_ERROR(code)) {
- desc->state = INET_STATE_BOUND; /* restore state */
+ desc->state = INET_STATE_OPEN; /* restore state */
ret = async_error(desc, sock_errno());
goto done;
}
@@ -11496,7 +11675,7 @@ static int packet_inet_output(udp_descriptor* udesc, HANDLE event)
(void *)&error, &sz);
if ((code < 0) || error) {
- desc->state = INET_STATE_BOUND; /* restore state */
+ desc->state = INET_STATE_OPEN; /* restore state */
ret = async_error(desc, error);
goto done;
}
@@ -11809,9 +11988,8 @@ int erts_sock_connect(erts_sock_t socket, byte *ip_addr, int len, Uint16 port)
if (!inet_set_address(AF_INET, &addr, buf, &blen))
return 0;
- if (IS_SOCKET_ERROR(sock_connect(s,
- (struct sockaddr *) &addr,
- sizeof(struct sockaddr_in))))
+ if (IS_SOCKET_ERROR
+ (sock_connect(s, (struct sockaddr *) &addr, blen)))
return 0;
return 1;
}
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index 4063cbf306..3336fded7a 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -418,6 +418,8 @@ BIF_RETTYPE hipe_bifs_enter_code_2(BIF_ALIST_2)
BIF_RET(make_tuple(hp));
}
+#define IS_POWER_OF_TWO(Val) (((Val) > 0) && (((Val) & ((Val)-1)) == 0))
+
/*
* Allocate memory for arbitrary non-Erlang data.
*/
@@ -427,16 +429,18 @@ BIF_RETTYPE hipe_bifs_alloc_data_2(BIF_ALIST_2)
void *block;
if (is_not_small(BIF_ARG_1) || is_not_small(BIF_ARG_2) ||
- (align = unsigned_val(BIF_ARG_1),
- align != sizeof(long) && align != sizeof(double)))
+ (align = unsigned_val(BIF_ARG_1), !IS_POWER_OF_TWO(align)))
BIF_ERROR(BIF_P, BADARG);
nrbytes = unsigned_val(BIF_ARG_2);
if (nrbytes == 0)
BIF_RET(make_small(0));
block = erts_alloc(ERTS_ALC_T_HIPE, nrbytes);
- if ((unsigned long)block & (align-1))
+ if ((unsigned long)block & (align-1)) {
fprintf(stderr, "%s: erts_alloc(%lu) returned %p which is not %lu-byte aligned\r\n",
__FUNCTION__, (unsigned long)nrbytes, block, (unsigned long)align);
+ erts_free(ERTS_ALC_T_HIPE, block);
+ BIF_ERROR(BIF_P, EXC_NOTSUP);
+ }
BIF_RET(address_to_term(block, BIF_P));
}
@@ -693,7 +697,7 @@ static struct nbif nbifs[BIF_SIZE] = {
#undef BIF_LIST
};
-#define NBIF_HASH(m,f,a) ((m)*(f)+(a))
+#define NBIF_HASH(m,f,a) (atom_val(m) ^ atom_val(f) ^ (a))
static Hash nbif_table;
static HashValue nbif_hash(struct nbif *x)
@@ -1059,7 +1063,7 @@ static inline void hipe_mfa_info_table_rwunlock(void)
erts_smp_rwmtx_rwunlock(&hipe_mfa_info_table.lock);
}
-#define HIPE_MFA_HASH(M,F,A) ((M) * (F) + (A))
+#define HIPE_MFA_HASH(M,F,A) (atom_val(M) ^ atom_val(F) ^ (A))
static struct hipe_mfa_info **hipe_mfa_info_table_alloc_bucket(unsigned int size)
{
@@ -1140,10 +1144,13 @@ static inline struct hipe_mfa_info *hipe_mfa_info_table_get_locked(Eterm m, Eter
h = HIPE_MFA_HASH(m, f, arity);
i = h & hipe_mfa_info_table.mask;
p = hipe_mfa_info_table.bucket[i];
- for (; p; p = p->bucket.next)
- /* XXX: do we want to compare p->bucket.hvalue as well? */
- if (p->m == m && p->f == f && p->a == arity)
- return p;
+ for (; p; p = p->bucket.next) {
+ if (p->bucket.hvalue == h) {
+ if (p->m == m && p->f == f && p->a == arity)
+ return p;
+ }
+ else ASSERT(!(p->m == m && p->f == f && p->a == arity));
+ }
return NULL;
}
@@ -1167,10 +1174,13 @@ static struct hipe_mfa_info *hipe_mfa_info_table_put_rwlocked(Eterm m, Eterm f,
h = HIPE_MFA_HASH(m, f, arity);
i = h & hipe_mfa_info_table.mask;
p = hipe_mfa_info_table.bucket[i];
- for (; p; p = p->bucket.next)
- /* XXX: do we want to compare p->bucket.hvalue as well? */
- if (p->m == m && p->f == f && p->a == arity)
- return p;
+ for (; p; p = p->bucket.next) {
+ if (p->bucket.hvalue == h) {
+ if (p->m == m && p->f == f && p->a == arity)
+ return p;
+ }
+ else ASSERT(!(p->m == m && p->f == f && p->a == arity));
+ }
p = hipe_mfa_info_table_alloc(m, f, arity);
p->bucket.hvalue = h;
p->bucket.next = hipe_mfa_info_table.bucket[i];
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c
index 884331e969..ed95045292 100644
--- a/erts/emulator/hipe/hipe_mode_switch.c
+++ b/erts/emulator/hipe/hipe_mode_switch.c
@@ -547,7 +547,7 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[])
p->flags &= ~F_HIPE_MODE;
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(p);
- p = schedule(p, reds_in - p->fcalls);
+ p = erts_schedule(NULL, p, reds_in - p->fcalls);
ERTS_SMP_REQ_PROC_MAIN_LOCK(p);
ASSERT(!(p->flags & F_HIPE_MODE));
#ifdef ERTS_SMP
diff --git a/erts/emulator/hipe/hipe_x86.c b/erts/emulator/hipe/hipe_x86.c
index 3d25646231..5f6c8c200e 100644
--- a/erts/emulator/hipe/hipe_x86.c
+++ b/erts/emulator/hipe/hipe_x86.c
@@ -37,7 +37,7 @@
void hipe_patch_load_fe(Uint32 *address, Uint32 value)
{
/* address points to a disp32 or imm32 operand */
- *address = value;
+ *address += value;
}
int hipe_patch_insn(void *address, Uint32 value, Eterm type)
@@ -54,7 +54,7 @@ int hipe_patch_insn(void *address, Uint32 value, Eterm type)
default:
return -1;
}
- *(Uint32*)address = value;
+ *(Uint32*)address += value;
return 0;
}
diff --git a/erts/emulator/nifs/common/erl_tracer_nif.c b/erts/emulator/nifs/common/erl_tracer_nif.c
index 6dddc80607..c0cc48ff42 100644
--- a/erts/emulator/nifs/common/erl_tracer_nif.c
+++ b/erts/emulator/nifs/common/erl_tracer_nif.c
@@ -45,7 +45,7 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ErlNifFunc nif_funcs[] = {
{"enabled", 3, enabled},
- {"trace", 6, trace}
+ {"trace", 5, trace}
};
@@ -57,6 +57,7 @@ ERL_NIF_INIT(erl_tracer, nif_funcs, load, NULL, upgrade, unload)
ATOM_DECL(cpu_timestamp); \
ATOM_DECL(discard); \
ATOM_DECL(exception_from); \
+ ATOM_DECL(extra); \
ATOM_DECL(match_spec_result); \
ATOM_DECL(monotonic); \
ATOM_DECL(ok); \
@@ -76,8 +77,7 @@ ERL_NIF_INIT(erl_tracer, nif_funcs, load, NULL, upgrade, unload)
ATOM_DECL(gc_minor_start); \
ATOM_DECL(gc_minor_end); \
ATOM_DECL(gc_major_start); \
- ATOM_DECL(gc_major_end); \
- ATOM_DECL(undefined);
+ ATOM_DECL(gc_major_end);
#define ATOM_DECL(A) static ERL_NIF_TERM atom_##A
ATOMS
@@ -154,11 +154,6 @@ static ERL_NIF_TERM enabled(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
Tracee :: pid() || port() || undefined,
Msg :: term(),
Opts :: map()) -> ignored().
- -spec trace(Tag :: atom(), TracerState :: pid() | port(),
- Tracee :: pid() || port() || undefined,
- Msg :: term(),
- Extra :: term(),
- Opts :: map()) -> ignored().
*/
static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
@@ -167,7 +162,8 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
ErlNifPort to_port;
size_t tt_sz = 0;
int is_port = 0;
- ASSERT(argc == 6);
+ size_t opts_sz = 0;
+ ASSERT(argc == 5);
if (!enif_get_local_pid(env, argv[1], &to_pid)) {
if (!enif_get_local_port(env, argv[1], &to_port)) {
@@ -179,12 +175,17 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
is_port = 1;
}
- if (!enif_is_identical(argv[4], atom_undefined)) {
+ opts = argv[4];
+
+ if (!enif_get_map_size(env, opts, &opts_sz))
+ opts_sz = 0;
+
+ if (opts_sz && enif_get_map_value(env, opts, atom_extra, &value)) {
tt[tt_sz++] = atom_trace;
tt[tt_sz++] = argv[2];
tt[tt_sz++] = argv[0];
tt[tt_sz++] = argv[3];
- tt[tt_sz++] = argv[4];
+ tt[tt_sz++] = value;
} else {
if (enif_is_identical(argv[0], atom_seq_trace)) {
tt[tt_sz++] = atom_seq_trace;
@@ -198,21 +199,16 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
}
}
- opts = argv[5];
- if (enif_get_map_value(env, opts, atom_match_spec_result,
- &value)
- && !enif_is_identical(value, atom_true)) {
+ if (opts_sz && enif_get_map_value(env, opts, atom_match_spec_result, &value)) {
tt[tt_sz++] = value;
}
- if (enif_get_map_value(env, opts, atom_scheduler_id, &value)
- && !enif_is_identical(value, atom_undefined)) {
+ if (opts_sz && enif_get_map_value(env, opts, atom_scheduler_id, &value)) {
tt[tt_sz++] = value;
}
- if (enif_get_map_value(env, opts, atom_timestamp, &value)
- && !enif_is_identical(value, atom_undefined)) {
+ if (opts_sz && enif_get_map_value(env, opts, atom_timestamp, &value)) {
ERL_NIF_TERM ts;
if (enif_is_identical(value, atom_monotonic)) {
ErlNifTime mon = enif_monotonic_time(ERL_NIF_NSEC);
diff --git a/erts/emulator/sys/win32/erl_poll.c b/erts/emulator/sys/win32/erl_poll.c
index 94f3840b5f..f23c7ab03d 100644
--- a/erts/emulator/sys/win32/erl_poll.c
+++ b/erts/emulator/sys/win32/erl_poll.c
@@ -424,7 +424,7 @@ static ERTS_INLINE int
wakeup_cause(ErtsPollSet ps)
{
int res;
- erts_aint32_t wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
+ erts_aint32_t wakeup_state = erts_atomic32_read_acqb(&ps->wakeup_state);
switch (wakeup_state) {
case ERTS_POLL_WOKEN_IO_READY:
res = 0;
@@ -487,9 +487,8 @@ wake_poller(ErtsPollSet ps, int io_ready)
{
erts_aint32_t wakeup_state;
if (io_ready) {
- /* We may set the event multiple times. This is, however, harmless. */
- wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
- erts_atomic32_set_relb(&ps->wakeup_state, ERTS_POLL_WOKEN_IO_READY);
+ wakeup_state = erts_atomic32_xchg_relb(&ps->wakeup_state,
+ ERTS_POLL_WOKEN_IO_READY);
}
else {
ERTS_THR_MEMORY_BARRIER;
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl
index 26bb416bf0..d31399e4af 100644
--- a/erts/emulator/test/bif_SUITE.erl
+++ b/erts/emulator/test/bif_SUITE.erl
@@ -141,9 +141,11 @@ guard_bifs_in_erl_bif_types(_Config) ->
shadow_comments(_Config) ->
ensure_erl_bif_types_compiled(),
+ ErlangList = [{erlang,F,A} || {F,A} <- erlang:module_info(exports),
+ not is_operator(F,A)],
List0 = erlang:system_info(snifs),
- List1 = [MFA || {M,_,_}=MFA <- List0, M =/= hipe_bifs],
- List = [MFA || MFA <- List1, not is_operator(MFA)],
+ List1 = [MFA || {M,_,_}=MFA <- List0, M =/= hipe_bifs, M =/= erlang],
+ List = List1 ++ ErlangList,
HasTypes = [MFA || {M,F,A}=MFA <- List,
erl_bif_types:is_known(M, F, A)],
Path = get_code_path(),
@@ -253,12 +255,15 @@ specs(_) ->
end.
is_operator({erlang,F,A}) ->
+ is_operator(F,A);
+is_operator(_) -> false.
+
+is_operator(F,A) ->
erl_internal:arith_op(F, A) orelse
erl_internal:bool_op(F, A) orelse
erl_internal:comp_op(F, A) orelse
erl_internal:list_op(F, A) orelse
- erl_internal:send_op(F, A);
-is_operator(_) -> false.
+ erl_internal:send_op(F, A).
extract_specs(M, Abstr) ->
[{make_mfa(M, Name),Spec} || {attribute,_,spec,{Name,Spec}} <- Abstr].
@@ -646,6 +651,8 @@ erlang_halt(Config) when is_list(Config) ->
{badrpc,nodedown} = rpc:call(N2, erlang, halt, [0]),
{ok,N3} = slave:start(H, halt_node3),
{badrpc,nodedown} = rpc:call(N3, erlang, halt, [0,[]]),
+ {ok,N4} = slave:start(H, halt_node4),
+ {badrpc,nodedown} = rpc:call(N4, erlang, halt, [lists:duplicate(300,$x)]),
% This test triggers a segfault when dumping a crash dump
% to make sure that we can handle it properly.
diff --git a/erts/emulator/test/bs_construct_SUITE.erl b/erts/emulator/test/bs_construct_SUITE.erl
index 941cb435f7..22a1c0b765 100644
--- a/erts/emulator/test/bs_construct_SUITE.erl
+++ b/erts/emulator/test/bs_construct_SUITE.erl
@@ -527,7 +527,7 @@ huge_float_check({'EXIT',{system_limit,_}}) -> ok;
huge_float_check({'EXIT',{badarg,_}}) -> ok.
huge_binary(Config) when is_list(Config) ->
- ct:timetrap({seconds, 30}),
+ ct:timetrap({seconds, 60}),
16777216 = size(<<0:(id(1 bsl 26)),(-1):(id(1 bsl 26))>>),
garbage_collect(),
{Shift,Return} = case free_mem() of
@@ -561,30 +561,13 @@ huge_binary(Config) when is_list(Config) ->
end.
free_mem() ->
- Cmd = "uname; free",
- Output = string:tokens(os:cmd(Cmd), "\n"),
- io:format("Output from command ~p\n~p\n",[Cmd,Output]),
- case Output of
- [OS, ColumnNames, Values | _] ->
- case string:str(OS,"Linux") of
- 0 ->
- io:format("Unknown OS\n",[]),
- undefined;
- _ ->
- case {string:tokens(ColumnNames, " \t"),
- string:tokens(Values, " \t")} of
- {[_,_,"free"|_],["Mem:",_,_,FreeKb|_]} ->
- list_to_integer(FreeKb) div 1024;
- _ ->
- io:format("Failed to parse output from 'free':\n",[]),
- undefined
- end
- end;
- _ ->
- io:format("Too few lines in output\n",[]),
- undefined
+ {ok,Apps} = application:ensure_all_started(os_mon),
+ Mem = memsup:get_system_memory_data(),
+ [ok = application:stop(App)||App <- Apps],
+ case proplists:get_value(free_memory,Mem) of
+ undefined -> undefined;
+ Val -> Val div 1024
end.
-
system_limit(Config) when is_list(Config) ->
WordSize = erlang:system_info(wordsize),
@@ -614,8 +597,7 @@ system_limit_32() ->
{'EXIT',{system_limit,_}} = (catch <<42:536870912/unit:8>>),
{'EXIT',{system_limit,_}} = (catch <<42:(id(536870912))/unit:8>>),
{'EXIT',{system_limit,_}} = (catch <<0:(id(8)),42:536870912/unit:8>>),
- {'EXIT',{system_limit,_}} =
- (catch <<0:(id(8)),42:(id(536870912))/unit:8>>),
+ {'EXIT',{system_limit,_}} = (catch <<0:(id(8)),42:(id(536870912))/unit:8>>),
%% The size would be silently truncated, resulting in a crash.
{'EXIT',{system_limit,_}} = (catch <<0:(1 bsl 35)>>),
@@ -627,16 +609,10 @@ system_limit_32() ->
ok.
badarg(Config) when is_list(Config) ->
- {'EXIT',{badarg,_}} =
- (catch <<0:(id(1 bsl 100)),0:(id(-1))>>),
- {'EXIT',{badarg,_}} =
- (catch <<0:(id(1 bsl 100)),0:(id(-(1 bsl 70)))>>),
- {'EXIT',{badarg,_}} =
- (catch <<0:(id(-(1 bsl 70))),0:(id(1 bsl 100))>>),
-
- {'EXIT',{badarg,_}} =
- (catch <<(id(<<>>))/binary,0:(id(-(1 bsl 100)))>>),
-
+ {'EXIT',{badarg,_}} = (catch <<0:(id(1 bsl 100)),0:(id(-1))>>),
+ {'EXIT',{badarg,_}} = (catch <<0:(id(1 bsl 100)),0:(id(-(1 bsl 70)))>>),
+ {'EXIT',{badarg,_}} = (catch <<0:(id(-(1 bsl 70))),0:(id(1 bsl 100))>>),
+ {'EXIT',{badarg,_}} = (catch <<(id(<<>>))/binary,0:(id(-(1 bsl 100)))>>),
ok.
copy_writable_binary(Config) when is_list(Config) ->
diff --git a/erts/emulator/test/dirty_nif_SUITE.erl b/erts/emulator/test/dirty_nif_SUITE.erl
index c3afbc0803..83b098a704 100644
--- a/erts/emulator/test/dirty_nif_SUITE.erl
+++ b/erts/emulator/test/dirty_nif_SUITE.erl
@@ -32,19 +32,23 @@
dirty_nif/1, dirty_nif_send/1,
dirty_nif_exception/1, call_dirty_nif_exception/1,
dirty_scheduler_exit/1, dirty_call_while_terminated/1,
- dirty_heap_access/1]).
+ dirty_heap_access/1, dirty_process_info/1,
+ dirty_process_register/1, dirty_process_trace/1]).
-define(nif_stub,nif_stub_error(?LINE)).
suite() -> [{ct_hooks,[ts_install_cth]}].
-all() ->
+all() ->
[dirty_nif,
dirty_nif_send,
dirty_nif_exception,
dirty_scheduler_exit,
dirty_call_while_terminated,
- dirty_heap_access].
+ dirty_heap_access,
+ dirty_process_info,
+ dirty_process_register,
+ dirty_process_trace].
init_per_suite(Config) ->
try erlang:system_info(dirty_cpu_schedulers) of
@@ -187,7 +191,7 @@ dirty_call_while_terminated(Config) when is_list(Config) ->
blipp:blupp(Bin)
end,
[monitor,link]),
- receive {dirty_alive, Pid} -> ok end,
+ receive {dirty_alive, _Pid} -> ok end,
{value, {BinAddr, 4711, 2}} = lists:keysearch(4711, 2,
element(2,
process_info(self(),
@@ -241,7 +245,7 @@ dirty_heap_access(Config) when is_list(Config) ->
end),
{N, R} = access_dirty_heap(Dirty, RGL, 0, 0),
receive
- {Pid, Res} ->
+ {_Pid, Res} ->
1000 = length(Res),
lists:foreach(fun (X) -> Ref = X end, Res)
end,
@@ -269,12 +273,123 @@ access_dirty_heap(Dirty, RGL, N, R) ->
end)
end.
+%% These tests verify that processes that access a process executing a
+%% dirty NIF where the main lock is needed for that access do not get
+%% blocked. Each test passes its pid to dirty_sleeper, which sends a
+%% 'ready' message when it's running on a dirty scheduler and just before
+%% it starts a 6 second sleep. When it receives the message, it verifies
+%% that access to the dirty process is as it expects. After the dirty
+%% process finishes its 6 second sleep but before it returns from the dirty
+%% scheduler, it sends a 'done' message. If the tester already received
+%% that message, the test fails because it means attempting to access the
+%% dirty process waited for that process to return to a regular scheduler,
+%% so verify that we haven't received that message, and also verify that
+%% the dirty process is still alive immediately after accessing it.
+dirty_process_info(Config) when is_list(Config) ->
+ access_dirty_process(
+ Config,
+ fun() -> ok end,
+ fun(NifPid) ->
+ PI = process_info(NifPid),
+ {current_function,{?MODULE,dirty_sleeper,1}} =
+ lists:keyfind(current_function, 1, PI),
+ ok
+ end,
+ fun(_) -> ok end).
+
+dirty_process_register(Config) when is_list(Config) ->
+ access_dirty_process(
+ Config,
+ fun() -> ok end,
+ fun(NifPid) ->
+ register(test_dirty_process_register, NifPid),
+ NifPid = whereis(test_dirty_process_register),
+ unregister(test_dirty_process_register),
+ false = lists:member(test_dirty_process_register,
+ registered()),
+ ok
+ end,
+ fun(_) -> ok end).
+
+dirty_process_trace(Config) when is_list(Config) ->
+ access_dirty_process(
+ Config,
+ fun() ->
+ erlang:trace_pattern({?MODULE,dirty_sleeper,1},
+ [{'_',[],[{return_trace}]}],
+ [local,meta]),
+ ok
+ end,
+ fun(NifPid) ->
+ erlang:trace(NifPid, true, [call,timestamp]),
+ ok
+ end,
+ fun(NifPid) ->
+ receive
+ done ->
+ receive
+ {trace_ts,NifPid,call,{?MODULE,dirty_sleeper,_},_} ->
+ ok
+ after
+ 0 ->
+ error(missing_trace_call_message)
+ end,
+ receive
+ {trace_ts,NifPid,return_from,{?MODULE,dirty_sleeper,1},
+ ok,_} ->
+ ok
+ after
+ 100 ->
+ error(missing_trace_return_message)
+ end
+ after
+ 6500 ->
+ error(missing_done_message)
+ end,
+ ok
+ end).
+
%%
%% Internal...
%%
+access_dirty_process(Config, Start, Test, Finish) ->
+ {ok, Node} = start_node(Config, ""),
+ [ok] = mcall(Node,
+ [fun() ->
+ Path = ?config(data_dir, Config),
+ Lib = atom_to_list(?MODULE),
+ ok = erlang:load_nif(filename:join(Path,Lib), []),
+ ok = test_dirty_process_access(Start, Test, Finish)
+ end]),
+ stop_node(Node),
+ ok.
+
+test_dirty_process_access(Start, Test, Finish) ->
+ ok = Start(),
+ Self = self(),
+ NifPid = spawn_link(fun() ->
+ ok = dirty_sleeper(Self)
+ end),
+ ok = receive
+ ready ->
+ ok = Test(NifPid),
+ receive
+ done ->
+ error(dirty_process_info_blocked)
+ after
+ 0 ->
+ true = erlang:is_process_alive(NifPid),
+ ok
+ end
+ after
+ 3000 ->
+ error(timeout)
+ end,
+ ok = Finish(NifPid).
+
receive_any() ->
- receive M -> M end.
+ receive M -> M end.
start_node(Config) ->
start_node(Config, "").
@@ -314,13 +429,13 @@ mcall(Node, Funs) ->
%% The NIFs:
lib_loaded() -> false.
-call_nif_schedule(_,_) -> ?nif_stub.
call_dirty_nif(_,_,_) -> ?nif_stub.
send_from_dirty_nif(_) -> ?nif_stub.
call_dirty_nif_exception(_) -> ?nif_stub.
call_dirty_nif_zero_args() -> ?nif_stub.
dirty_call_while_terminated_nif(_) -> ?nif_stub.
dirty_sleeper() -> ?nif_stub.
+dirty_sleeper(_) -> ?nif_stub.
dirty_heap_access_nif(_) -> ?nif_stub.
nif_stub_error(Line) ->
diff --git a/erts/emulator/test/dirty_nif_SUITE_data/dirty_nif_SUITE.c b/erts/emulator/test/dirty_nif_SUITE_data/dirty_nif_SUITE.c
index 2013c88167..d92933a096 100644
--- a/erts/emulator/test/dirty_nif_SUITE_data/dirty_nif_SUITE.c
+++ b/erts/emulator/test/dirty_nif_SUITE_data/dirty_nif_SUITE.c
@@ -19,7 +19,9 @@
*/
#include "erl_nif.h"
#include <assert.h>
-#ifndef __WIN32__
+#ifdef __WIN32__
+#include <windows.h>
+#else
#include <unistd.h>
#endif
@@ -46,7 +48,8 @@ static ERL_NIF_TERM dirty_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
char s[10];
ErlNifBinary b;
if (have_dirty_schedulers()) {
- assert(enif_is_on_dirty_scheduler(env));
+ assert(ERL_NIF_THR_DIRTY_CPU_SCHEDULER == enif_thread_type()
+ || ERL_NIF_THR_DIRTY_IO_SCHEDULER == enif_thread_type());
}
assert(argc == 3);
enif_get_int(env, argv[0], &n);
@@ -63,7 +66,7 @@ static ERL_NIF_TERM call_dirty_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
int n;
char s[10];
ErlNifBinary b;
- assert(!enif_is_on_dirty_scheduler(env));
+ assert(ERL_NIF_THR_NORMAL_SCHEDULER == enif_thread_type());
if (argc != 3)
return enif_make_badarg(env);
if (have_dirty_schedulers()) {
@@ -146,12 +149,32 @@ static ERL_NIF_TERM call_dirty_nif_zero_args(ErlNifEnv* env, int argc, const ERL
static ERL_NIF_TERM
dirty_sleeper(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
- assert(enif_is_on_dirty_scheduler(env));
+ ErlNifPid pid;
+ ErlNifEnv* msg_env = NULL;
+
+ assert(ERL_NIF_THR_DIRTY_CPU_SCHEDULER == enif_thread_type()
+ || ERL_NIF_THR_DIRTY_IO_SCHEDULER == enif_thread_type());
+
+ /* If we get a pid argument, it indicates a process involved in the
+ test wants a message from us. Prior to the sleep we send a 'ready'
+ message, and then after the sleep, send a 'done' message. */
+ if (argc == 1 && enif_get_local_pid(env, argv[0], &pid)) {
+ msg_env = enif_alloc_env();
+ enif_send(env, &pid, msg_env, enif_make_atom(msg_env, "ready"));
+ }
+
#ifdef __WIN32__
Sleep(6000);
#else
sleep(6);
#endif
+
+ if (argc == 1) {
+ assert(msg_env != NULL);
+ enif_send(env, &pid, msg_env, enif_make_atom(msg_env, "done"));
+ enif_free_env(msg_env);
+ }
+
return enif_make_atom(env, "ok");
}
@@ -200,7 +223,8 @@ static ERL_NIF_TERM dirty_heap_access_nif(ErlNifEnv* env, int argc, const ERL_NI
{
ERL_NIF_TERM res = enif_make_list(env, 0);
int i;
- assert(enif_is_on_dirty_scheduler(env));
+ assert(ERL_NIF_THR_DIRTY_CPU_SCHEDULER == enif_thread_type()
+ || ERL_NIF_THR_DIRTY_IO_SCHEDULER == enif_thread_type());
for (i = 0; i < 1000; i++)
res = enif_make_list_cell(env, enif_make_copy(env, argv[0]), res);
@@ -216,6 +240,7 @@ static ErlNifFunc nif_funcs[] =
{"call_dirty_nif_exception", 1, call_dirty_nif_exception, ERL_NIF_DIRTY_JOB_IO_BOUND},
{"call_dirty_nif_zero_args", 0, call_dirty_nif_zero_args, ERL_NIF_DIRTY_JOB_CPU_BOUND},
{"dirty_sleeper", 0, dirty_sleeper, ERL_NIF_DIRTY_JOB_IO_BOUND},
+ {"dirty_sleeper", 1, dirty_sleeper, ERL_NIF_DIRTY_JOB_CPU_BOUND},
{"dirty_call_while_terminated_nif", 1, dirty_call_while_terminated_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND},
{"dirty_heap_access_nif", 1, dirty_heap_access_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}
};
diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl
index d0096fb1bc..26780f6017 100644
--- a/erts/emulator/test/distribution_SUITE.erl
+++ b/erts/emulator/test/distribution_SUITE.erl
@@ -55,7 +55,8 @@
bad_dist_ext_receive/1,
bad_dist_ext_process_info/1,
bad_dist_ext_control/1,
- bad_dist_ext_connection_id/1]).
+ bad_dist_ext_connection_id/1,
+ start_epmd_false/1, epmd_module/1]).
%% Internal exports.
-export([sender/3, receiver2/2, dummy_waiter/0, dead_process/0,
@@ -64,6 +65,9 @@
dist_evil_parallel_receiver/0,
sendersender/4, sendersender2/4]).
+%% epmd_module exports
+-export([start_link/0, register_node/2, port_please/2]).
+
suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap, {minutes, 4}}].
@@ -76,7 +80,8 @@ all() ->
{group, trap_bif}, {group, dist_auto_connect},
dist_parallel_send, atom_roundtrip, unicode_atom_roundtrip, atom_roundtrip_r15b,
contended_atom_cache_entry, contended_unicode_atom_cache_entry,
- bad_dist_structure, {group, bad_dist_ext}].
+ bad_dist_structure, {group, bad_dist_ext},
+ start_epmd_false, epmd_module].
groups() ->
[{bulk_send, [], [bulk_send_small, bulk_send_big, bulk_send_bigbig]},
@@ -1881,6 +1886,66 @@ dmsg_ext(Term) ->
dmsg_bad_atom_cache_ref() ->
[$R, 137].
+start_epmd_false(Config) when is_list(Config) ->
+ %% Start a node with the option -start_epmd false.
+ {ok, OtherNode} = start_node(start_epmd_false, "-start_epmd false"),
+ %% We should be able to ping it, as epmd was started by us:
+ pong = net_adm:ping(OtherNode),
+ stop_node(OtherNode),
+
+ ok.
+
+epmd_module(Config) when is_list(Config) ->
+ %% We need a relay node to test this, since the test node uses the
+ %% standard epmd module.
+ Sock1 = start_relay_node(epmd_module_node1, "-epmd_module " ++ ?MODULE_STRING),
+ Node1 = inet_rpc_nodename(Sock1),
+ %% Ask what port it's listening on - it won't have registered with
+ %% epmd.
+ {ok, {ok, Port1}} = do_inet_rpc(Sock1, application, get_env, [kernel, dist_listen_port]),
+
+ %% Start a second node, passing the port number as a secret
+ %% argument.
+ Sock2 = start_relay_node(epmd_module_node2, "-epmd_module " ++ ?MODULE_STRING
+ ++ " -other_node_port " ++ integer_to_list(Port1)),
+ Node2 = inet_rpc_nodename(Sock2),
+ %% Node 1 can't ping node 2
+ {ok, pang} = do_inet_rpc(Sock1, net_adm, ping, [Node2]),
+ {ok, []} = do_inet_rpc(Sock1, erlang, nodes, []),
+ {ok, []} = do_inet_rpc(Sock2, erlang, nodes, []),
+ %% But node 2 can ping node 1
+ {ok, pong} = do_inet_rpc(Sock2, net_adm, ping, [Node1]),
+ {ok, [Node2]} = do_inet_rpc(Sock1, erlang, nodes, []),
+ {ok, [Node1]} = do_inet_rpc(Sock2, erlang, nodes, []),
+
+ stop_relay_node(Sock2),
+ stop_relay_node(Sock1).
+
+%% epmd_module functions:
+
+start_link() ->
+ ignore.
+
+register_node(_Name, Port) ->
+ %% Save the port number we're listening on.
+ application:set_env(kernel, dist_listen_port, Port),
+ Creation = rand:uniform(3),
+ {ok, Creation}.
+
+port_please(_Name, _Ip) ->
+ case init:get_argument(other_node_port) of
+ error ->
+ %% None specified. Default to 42.
+ Port = 42,
+ Version = 5,
+ {port, Port, Version};
+ {ok, [[PortS]]} ->
+ %% Port number given on command line.
+ Port = list_to_integer(PortS),
+ Version = 5,
+ {port, Port, Version}
+ end.
+
%%% Utilities
timestamp() ->
diff --git a/erts/emulator/test/lttng_SUITE.erl b/erts/emulator/test/lttng_SUITE.erl
index c64ddc40da..6b7ad836f5 100644
--- a/erts/emulator/test/lttng_SUITE.erl
+++ b/erts/emulator/test/lttng_SUITE.erl
@@ -44,6 +44,7 @@ suite() ->
all() ->
[t_lttng_list,
+ t_memory_carrier,
t_carrier_pool,
t_async_io_pool,
t_driver_start_stop,
@@ -52,8 +53,7 @@ all() ->
t_driver_timeout,
t_driver_caller,
t_driver_flush,
- t_scheduler_poll,
- t_memory_carrier].
+ t_scheduler_poll].
init_per_suite(Config) ->
@@ -80,34 +80,34 @@ end_per_testcase(Case, _Config) ->
ok.
%% Not tested yet
-%% com_ericsson_otp:driver_process_exit
-%% com_ericsson_otp:driver_event
+%% org_erlang_otp:driver_process_exit
+%% org_erlang_otp:driver_event
%% tracepoints
%%
-%% com_ericsson_otp:carrier_pool_get
-%% com_ericsson_otp:carrier_pool_put
-%% com_ericsson_otp:carrier_destroy
-%% com_ericsson_otp:carrier_create
-%% com_ericsson_otp:aio_pool_put
-%% com_ericsson_otp:aio_pool_get
-%% com_ericsson_otp:driver_control
-%% com_ericsson_otp:driver_call
-%% com_ericsson_otp:driver_finish
-%% com_ericsson_otp:driver_ready_async
-%% com_ericsson_otp:driver_process_exit
-%% com_ericsson_otp:driver_stop
-%% com_ericsson_otp:driver_flush
-%% com_ericsson_otp:driver_stop_select
-%% com_ericsson_otp:driver_timeout
-%% com_ericsson_otp:driver_event
-%% com_ericsson_otp:driver_ready_output
-%% com_ericsson_otp:driver_ready_input
-%% com_ericsson_otp:driver_output
-%% com_ericsson_otp:driver_outputv
-%% com_ericsson_otp:driver_init
-%% com_ericsson_otp:driver_start
-%% com_ericsson_otp:scheduler_poll
+%% org_erlang_otp:carrier_pool_get
+%% org_erlang_otp:carrier_pool_put
+%% org_erlang_otp:carrier_destroy
+%% org_erlang_otp:carrier_create
+%% org_erlang_otp:aio_pool_put
+%% org_erlang_otp:aio_pool_get
+%% org_erlang_otp:driver_control
+%% org_erlang_otp:driver_call
+%% org_erlang_otp:driver_finish
+%% org_erlang_otp:driver_ready_async
+%% org_erlang_otp:driver_process_exit
+%% org_erlang_otp:driver_stop
+%% org_erlang_otp:driver_flush
+%% org_erlang_otp:driver_stop_select
+%% org_erlang_otp:driver_timeout
+%% org_erlang_otp:driver_event
+%% org_erlang_otp:driver_ready_output
+%% org_erlang_otp:driver_ready_input
+%% org_erlang_otp:driver_output
+%% org_erlang_otp:driver_outputv
+%% org_erlang_otp:driver_init
+%% org_erlang_otp:driver_start
+%% org_erlang_otp:scheduler_poll
%%
%% Testcases
@@ -117,48 +117,48 @@ t_lttng_list(_Config) ->
{ok, _} = cmd("lttng list -u"),
ok.
-%% com_ericsson_otp:carrier_pool_get
-%% com_ericsson_otp:carrier_pool_put
+%% org_erlang_otp:carrier_pool_get
+%% org_erlang_otp:carrier_pool_put
t_carrier_pool(Config) ->
case have_carriers(ets_alloc) of
false ->
{skip, "No Memory Carriers configured on system."};
true ->
- ok = lttng_start_event("com_ericsson_otp:carrier_pool*", Config),
+ ok = lttng_start_event("org_erlang_otp:carrier_pool*", Config),
ok = ets_load(),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:carrier_pool_get", Res),
- ok = check_tracepoint("com_ericsson_otp:carrier_pool_put", Res),
+ ok = check_tracepoint("org_erlang_otp:carrier_pool_get", Res),
+ ok = check_tracepoint("org_erlang_otp:carrier_pool_put", Res),
ok
end.
-%% com_ericsson_otp:carrier_destroy
-%% com_ericsson_otp:carrier_create
+%% org_erlang_otp:carrier_destroy
+%% org_erlang_otp:carrier_create
t_memory_carrier(Config) ->
case have_carriers(ets_alloc) of
false ->
{skip, "No Memory Carriers configured on system."};
true ->
- ok = lttng_start_event("com_ericsson_otp:carrier_*", Config),
+ ok = lttng_start_event("org_erlang_otp:carrier_*", Config),
ok = ets_load(),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:carrier_destroy", Res),
- ok = check_tracepoint("com_ericsson_otp:carrier_create", Res),
+ ok = check_tracepoint("org_erlang_otp:carrier_destroy", Res),
+ ok = check_tracepoint("org_erlang_otp:carrier_create", Res),
ok
end.
-%% com_ericsson_otp:aio_pool_put
-%% com_ericsson_otp:aio_pool_get
+%% org_erlang_otp:aio_pool_put
+%% org_erlang_otp:aio_pool_get
t_async_io_pool(Config) ->
case have_async_threads() of
false ->
{skip, "No Async Threads configured on system."};
true ->
- ok = lttng_start_event("com_ericsson_otp:aio_pool_*", Config),
+ ok = lttng_start_event("org_erlang_otp:aio_pool_*", Config),
Path1 = proplists:get_value(priv_dir, Config),
{ok, [[Path2]]} = init:get_argument(home),
@@ -168,51 +168,54 @@ t_async_io_pool(Config) ->
{ok, _} = file:list_dir(Path2),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:aio_pool_put", Res),
- ok = check_tracepoint("com_ericsson_otp:aio_pool_get", Res),
+ ok = check_tracepoint("org_erlang_otp:aio_pool_put", Res),
+ ok = check_tracepoint("org_erlang_otp:aio_pool_get", Res),
ok
end.
-%% com_ericsson_otp:driver_start
-%% com_ericsson_otp:driver_stop
+%% org_erlang_otp:driver_start
+%% org_erlang_otp:driver_stop
t_driver_start_stop(Config) ->
- ok = lttng_start_event("com_ericsson_otp:driver_*", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_*", Config),
+ timer:sleep(500),
Path = proplists:get_value(priv_dir, Config),
Name = filename:join(Path, "sometext.txt"),
Bin = txt(),
ok = file:write_file(Name, Bin),
{ok, Bin} = file:read_file(Name),
+ timer:sleep(500),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:driver_start", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_stop", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_control", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_outputv", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_ready_async", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_start", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_stop", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_control", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_outputv", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_ready_async", Res),
ok.
-%% com_ericsson_otp:driver_control
-%% com_ericsson_otp:driver_outputv
-%% com_ericsson_otp:driver_ready_async
+%% org_erlang_otp:driver_control
+%% org_erlang_otp:driver_outputv
+%% org_erlang_otp:driver_ready_async
t_driver_control_ready_async(Config) ->
- ok = lttng_start_event("com_ericsson_otp:driver_control", Config),
- ok = lttng_start_event("com_ericsson_otp:driver_outputv", Config),
- ok = lttng_start_event("com_ericsson_otp:driver_ready_async", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_control", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_outputv", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_ready_async", Config),
Path = proplists:get_value(priv_dir, Config),
Name = filename:join(Path, "sometext.txt"),
Bin = txt(),
ok = file:write_file(Name, Bin),
{ok, Bin} = file:read_file(Name),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:driver_control", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_outputv", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_ready_async", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_control", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_outputv", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_ready_async", Res),
ok.
-%% com_ericsson_otp:driver_ready_input
-%% com_ericsson_otp:driver_ready_output
+%% org_erlang_otp:driver_ready_input
+%% org_erlang_otp:driver_ready_output
t_driver_ready_input_output(Config) ->
- ok = lttng_start_event("com_ericsson_otp:driver_ready_*", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_ready_*", Config),
+ timer:sleep(500),
Me = self(),
Pid = spawn_link(fun() -> tcp_server(Me, active) end),
receive {Pid, accept} -> ok end,
@@ -225,16 +228,17 @@ t_driver_ready_input_output(Config) ->
ok = gen_tcp:close(Sock),
receive {Pid, done} -> ok end,
+ timer:sleep(500),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:driver_ready_input", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_ready_output", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_ready_input", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_ready_output", Res),
ok.
-%% com_ericsson_otp:driver_stop_select
-%% com_ericsson_otp:driver_timeout
+%% org_erlang_otp:driver_stop_select
+%% org_erlang_otp:driver_timeout
t_driver_timeout(Config) ->
- ok = lttng_start_event("com_ericsson_otp:driver_*", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_*", Config),
Me = self(),
Pid = spawn_link(fun() -> tcp_server(Me, timeout) end),
receive {Pid, accept} -> ok end,
@@ -243,16 +247,16 @@ t_driver_timeout(Config) ->
receive {Pid, done} -> ok end,
ok = gen_tcp:close(Sock),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:driver_timeout", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_stop_select", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_timeout", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_stop_select", Res),
ok.
-%% com_ericsson_otp:driver_call
-%% com_ericsson_otp:driver_output
-%% com_ericsson_otp:driver_init
-%% com_ericsson_otp:driver_finish
+%% org_erlang_otp:driver_call
+%% org_erlang_otp:driver_output
+%% org_erlang_otp:driver_init
+%% org_erlang_otp:driver_finish
t_driver_caller(Config) ->
- ok = lttng_start_event("com_ericsson_otp:driver_*", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_*", Config),
Drv = 'caller_drv',
os:putenv("CALLER_DRV_USE_OUTPUTV", "false"),
@@ -278,25 +282,25 @@ t_driver_caller(Config) ->
erl_ddll:unload_driver(Drv),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:driver_call", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_output", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_init", Res),
- ok = check_tracepoint("com_ericsson_otp:driver_finish", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_call", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_output", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_init", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_finish", Res),
ok.
-%% com_ericsson_otp:scheduler_poll
+%% org_erlang_otp:scheduler_poll
t_scheduler_poll(Config) ->
- ok = lttng_start_event("com_ericsson_otp:scheduler_poll", Config),
+ ok = lttng_start_event("org_erlang_otp:scheduler_poll", Config),
ok = memory_load(),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:scheduler_poll", Res),
+ ok = check_tracepoint("org_erlang_otp:scheduler_poll", Res),
ok.
-%% com_ericsson_otp:driver_flush
+%% org_erlang_otp:driver_flush
t_driver_flush(Config) ->
- ok = lttng_start_event("com_ericsson_otp:driver_flush", Config),
+ ok = lttng_start_event("org_erlang_otp:driver_flush", Config),
Me = self(),
Pid = spawn_link(fun() -> tcp_server(Me, passive_no_read) end),
@@ -320,7 +324,7 @@ t_driver_flush(Config) ->
receive {Pid, done} -> ok end,
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_otp:driver_flush", Res),
+ ok = check_tracepoint("org_erlang_otp:driver_flush", Res),
ok.
%%
@@ -412,29 +416,29 @@ tcp_server(Pid, Type) ->
txt() ->
<<"%% tracepoints\n"
"%%\n"
- "%% com_ericsson_otp:carrier_pool_get\n"
- "%% com_ericsson_otp:carrier_pool_put\n"
- "%% com_ericsson_otp:carrier_destroy\n"
- "%% com_ericsson_otp:carrier_create\n"
- "%% com_ericsson_otp:aio_pool_put\n"
- "%% com_ericsson_otp:aio_pool_get\n"
- "%% com_ericsson_otp:driver_control\n"
- "%% com_ericsson_otp:driver_call\n"
- "%% com_ericsson_otp:driver_finish\n"
- "%% com_ericsson_otp:driver_ready_async\n"
- "%% com_ericsson_otp:driver_process_exit\n"
- "%% com_ericsson_otp:driver_stop\n"
- "%% com_ericsson_otp:driver_flush\n"
- "%% com_ericsson_otp:driver_stop_select\n"
- "%% com_ericsson_otp:driver_timeout\n"
- "%% com_ericsson_otp:driver_event\n"
- "%% com_ericsson_otp:driver_ready_output\n"
- "%% com_ericsson_otp:driver_ready_input\n"
- "%% com_ericsson_otp:driver_output\n"
- "%% com_ericsson_otp:driver_outputv\n"
- "%% com_ericsson_otp:driver_init\n"
- "%% com_ericsson_otp:driver_start\n"
- "%% com_ericsson_otp:scheduler_poll">>.
+ "%% org_erlang_otp:carrier_pool_get\n"
+ "%% org_erlang_otp:carrier_pool_put\n"
+ "%% org_erlang_otp:carrier_destroy\n"
+ "%% org_erlang_otp:carrier_create\n"
+ "%% org_erlang_otp:aio_pool_put\n"
+ "%% org_erlang_otp:aio_pool_get\n"
+ "%% org_erlang_otp:driver_control\n"
+ "%% org_erlang_otp:driver_call\n"
+ "%% org_erlang_otp:driver_finish\n"
+ "%% org_erlang_otp:driver_ready_async\n"
+ "%% org_erlang_otp:driver_process_exit\n"
+ "%% org_erlang_otp:driver_stop\n"
+ "%% org_erlang_otp:driver_flush\n"
+ "%% org_erlang_otp:driver_stop_select\n"
+ "%% org_erlang_otp:driver_timeout\n"
+ "%% org_erlang_otp:driver_event\n"
+ "%% org_erlang_otp:driver_ready_output\n"
+ "%% org_erlang_otp:driver_ready_input\n"
+ "%% org_erlang_otp:driver_output\n"
+ "%% org_erlang_otp:driver_outputv\n"
+ "%% org_erlang_otp:driver_init\n"
+ "%% org_erlang_otp:driver_start\n"
+ "%% org_erlang_otp:scheduler_poll">>.
load_driver(Dir, Driver) ->
case erl_ddll:load_driver(Dir, Driver) of
diff --git a/erts/emulator/test/message_queue_data_SUITE.erl b/erts/emulator/test/message_queue_data_SUITE.erl
index 226462676c..44e77dfad0 100644
--- a/erts/emulator/test/message_queue_data_SUITE.erl
+++ b/erts/emulator/test/message_queue_data_SUITE.erl
@@ -52,18 +52,12 @@ basic(Config) when is_list(Config) ->
ok = rpc:call(Node2, ?MODULE, basic_test, [on_heap]),
stop_node(Node2),
- {ok, Node3} = start_node(Config, "+hmqd mixed"),
- ok = rpc:call(Node3, ?MODULE, basic_test, [mixed]),
- stop_node(Node3),
-
ok.
is_valid_mqd_value(off_heap) ->
true;
is_valid_mqd_value(on_heap) ->
true;
-is_valid_mqd_value(mixed) ->
- true;
is_valid_mqd_value(_) ->
false.
@@ -78,9 +72,6 @@ basic_test(Default) ->
{message_queue_data, off_heap} = process_info(self(), message_queue_data),
off_heap = process_flag(message_queue_data, on_heap),
{message_queue_data, on_heap} = process_info(self(), message_queue_data),
- on_heap = process_flag(message_queue_data, mixed),
- {message_queue_data, mixed} = process_info(self(), message_queue_data),
- mixed = process_flag(message_queue_data, Default),
{'EXIT', _} = (catch process_flag(message_queue_data, blupp)),
P1 = spawn_opt(fun () -> receive after infinity -> ok end end,
@@ -101,12 +92,6 @@ basic_test(Default) ->
unlink(P3),
exit(P3, bye),
- P4 = spawn_opt(fun () -> receive after infinity -> ok end end,
- [link, {message_queue_data, mixed}]),
- {message_queue_data, mixed} = process_info(P4, message_queue_data),
- unlink(P4),
- exit(P4, bye),
-
{'EXIT', _} = (catch spawn_opt(fun () -> receive after infinity -> ok end end,
[link, {message_queue_data, blapp}])),
@@ -116,21 +101,18 @@ process_info_messages(Config) when is_list(Config) ->
Tester = self(),
P1 = spawn_opt(fun () ->
receive after 500 -> ok end,
- mixed = process_flag(message_queue_data, off_heap),
+ on_heap = process_flag(message_queue_data, off_heap),
Tester ! first,
receive after 500 -> ok end,
off_heap = process_flag(message_queue_data, on_heap),
Tester ! second,
receive after 500 -> ok end,
- on_heap = process_flag(message_queue_data, mixed),
+ on_heap = process_flag(message_queue_data, off_heap),
Tester ! third,
- receive after 500 -> ok end,
- mixed = process_flag(message_queue_data, off_heap),
- Tester ! fourth,
receive after infinity -> ok end
end,
- [link, {message_queue_data, mixed}]),
+ [link, {message_queue_data, on_heap}]),
P1 ! "A",
receive first -> ok end,
@@ -139,25 +121,20 @@ process_info_messages(Config) when is_list(Config) ->
P1 ! "C",
receive third -> ok end,
P1 ! "D",
- receive fourth -> ok end,
- P1 ! "E",
- {messages, ["A", "B", "C", "D", "E"]} = process_info(P1, messages),
+ {messages, ["A", "B", "C", "D"]} = process_info(P1, messages),
P2 = spawn_opt(fun () ->
receive after 500 -> ok end,
- mixed = process_flag(message_queue_data, off_heap),
+ on_heap = process_flag(message_queue_data, off_heap),
Tester ! first,
receive after 500 -> ok end,
off_heap = process_flag(message_queue_data, on_heap),
Tester ! second,
receive after 500 -> ok end,
- on_heap = process_flag(message_queue_data, mixed),
+ on_heap = process_flag(message_queue_data, off_heap),
Tester ! third,
receive after 500 -> ok end,
- mixed = process_flag(message_queue_data, off_heap),
- Tester ! fourth,
- receive after 500 -> ok end,
Tester ! process_info(self(), messages),
@@ -165,11 +142,10 @@ process_info_messages(Config) when is_list(Config) ->
receive M2 -> M2 = "B" end,
receive M3 -> M3 = "C" end,
receive M4 -> M4 = "D" end,
- receive M5 -> M5 = "E" end,
Tester ! self()
end,
- [link, {message_queue_data, mixed}]),
+ [link, {message_queue_data, on_heap}]),
P2 ! "A",
receive first -> ok end,
@@ -178,12 +154,10 @@ process_info_messages(Config) when is_list(Config) ->
P2 ! "C",
receive third -> ok end,
P2 ! "D",
- receive fourth -> ok end,
- P2 ! "E",
receive
Msg ->
- {messages, ["A", "B", "C", "D", "E"]} = Msg
+ {messages, ["A", "B", "C", "D"]} = Msg
end,
receive P2 -> ok end,
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index eaa4026a8a..4ebc1f5782 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -147,11 +147,7 @@ spawn_with_binaries(Config) when is_list(Config) ->
TwoMeg = lists:duplicate(1024, L),
Fun = fun() -> spawn(?MODULE, binary_owner, [list_to_binary(TwoMeg)]),
receive after 1 -> ok end end,
- Iter = case test_server:purify_is_running() of
- true -> 10;
- false -> 150
- end,
- test_server:do_times(Iter, Fun),
+ test_server:do_times(150, Fun),
ok.
binary_owner(Bin) when is_binary(Bin) ->
diff --git a/erts/emulator/test/tracer_SUITE.erl b/erts/emulator/test/tracer_SUITE.erl
index 20fb7e475e..9eb55c9af3 100644
--- a/erts/emulator/test/tracer_SUITE.erl
+++ b/erts/emulator/test/tracer_SUITE.erl
@@ -28,9 +28,9 @@
init_per_group/2,end_per_group/2, init_per_testcase/2,
end_per_testcase/2]).
-export([load/1, unload/1, reload/1, invalid_tracers/1]).
--export([send/1, recv/1, spawn/1, exit/1, link/1, unlink/1,
- getting_linked/1, getting_unlinked/1, register/1, unregister/1,
- in/1, out/1, gc_start/1, gc_end/1]).
+-export([send/1, recv/1, call/1, call_return/1, spawn/1, exit/1,
+ link/1, unlink/1, getting_linked/1, getting_unlinked/1,
+ register/1, unregister/1, in/1, out/1, gc_start/1, gc_end/1]).
suite() -> [{ct_hooks,[ts_install_cth]},
{timetrap, {minutes, 1}}].
@@ -39,9 +39,9 @@ all() ->
[load, unload, reload, invalid_tracers, {group, basic}].
groups() ->
- [{ basic, [], [send, recv, spawn, exit, link, unlink, getting_linked,
- getting_unlinked, register, unregister, in, out,
- gc_start, gc_end]}].
+ [{ basic, [], [send, recv, call, call_return, spawn, exit,
+ link, unlink, getting_linked, getting_unlinked,
+ register, unregister, in, out, gc_start, gc_end]}].
init_per_suite(Config) ->
erlang:trace_pattern({'_','_','_'}, false, [local]),
@@ -223,8 +223,8 @@ send(_Config) ->
Expect = fun(Pid, State, EOpts) ->
receive
Msg ->
- {send, State, Pid, ok, Self, Opts} = Msg,
- check_opts(EOpts, Opts)
+ {send, State, Pid, ok, Opts} = Msg,
+ check_opts(EOpts, Opts, Self)
end
end,
test(send, Tc, Expect).
@@ -239,13 +239,59 @@ recv(_Config) ->
Expect = fun(Pid, State, EOpts) ->
receive
Msg ->
- {'receive', State, Pid, ok, undefined, Opts} = Msg,
+ {'receive', State, Pid, ok, Opts} = Msg,
check_opts(EOpts, Opts)
end
end,
test('receive', Tc, Expect, false).
+call(_Config) ->
+
+ Self = self(),
+ Tc = fun(Pid) ->
+ Pid ! fun() -> call_test(Self), Self ! ok end,
+ receive ok -> ok after 100 -> ct:fail(timeout) end
+ end,
+
+ erlang:trace_pattern({?MODULE, call_test, 1}, [], [local]),
+
+ Expect = fun(Pid, State, EOpts) ->
+ receive
+ Msg ->
+ {call, State, Pid, {?MODULE, call_test, [Self]}, Opts} = Msg,
+ check_opts(EOpts, Opts)
+ end
+ end,
+ test(call, Tc, Expect).
+
+call_return(_Config) ->
+
+ Self = self(),
+ Tc = fun(Pid) ->
+ Pid ! fun() -> call_test(undefined), Self ! ok end,
+ receive ok -> ok after 100 -> ct:fail(timeout) end
+ end,
+
+ 1 = erlang:trace_pattern({?MODULE, call_test, 1}, [{'_',[],[{return_trace}]}], [local]),
+
+ Expect = fun(Pid, State, EOpts) ->
+ receive
+ CallMsg ->
+ {call, State, Pid, {?MODULE, call_test, [undefined]}, COpts} = CallMsg,
+ check_opts(EOpts, COpts)
+ end,
+ receive
+ RetMsg ->
+ {return_from, State, Pid, {?MODULE, call_test, 1}, ROpts} = RetMsg,
+ check_opts(EOpts, ROpts, undefined)
+ end
+ end,
+ test(call, Tc, Expect).
+
+call_test(Arg) ->
+ Arg.
+
spawn(_Config) ->
Tc = fun(Pid) ->
@@ -256,9 +302,8 @@ spawn(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {spawn, State, Pid, NewPid,
- {lists,seq,[1,10]}, Opts} = Msg,
- check_opts(EOpts, Opts),
+ {spawn, State, Pid, NewPid, Opts} = Msg,
+ check_opts(EOpts, Opts, {lists,seq,[1,10]}),
true = is_pid(NewPid) andalso NewPid /= Pid
end
end,
@@ -274,7 +319,7 @@ exit(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {exit, State, Pid, normal, undefined, Opts} = Msg,
+ {exit, State, Pid, normal, Opts} = Msg,
check_opts(EOpts, Opts)
end
end,
@@ -295,7 +340,7 @@ link(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {link, State, Pid, NewPid, undefined, Opts} = Msg,
+ {link, State, Pid, NewPid, Opts} = Msg,
check_opts(EOpts, Opts),
true = is_pid(NewPid) andalso NewPid /= Pid
end
@@ -318,7 +363,7 @@ unlink(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {unlink, State, Pid, NewPid, undefined, Opts} = Msg,
+ {unlink, State, Pid, NewPid, Opts} = Msg,
check_opts(EOpts, Opts),
true = is_pid(NewPid) andalso NewPid /= Pid
end
@@ -340,7 +385,7 @@ getting_linked(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {getting_linked, State, Pid, NewPid, undefined, Opts} = Msg,
+ {getting_linked, State, Pid, NewPid, Opts} = Msg,
check_opts(EOpts, Opts),
true = is_pid(NewPid) andalso NewPid /= Pid
end
@@ -364,7 +409,7 @@ getting_unlinked(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {getting_unlinked, State, Pid, NewPid, undefined, Opts} = Msg,
+ {getting_unlinked, State, Pid, NewPid, Opts} = Msg,
check_opts(EOpts, Opts),
true = is_pid(NewPid) andalso NewPid /= Pid
end
@@ -386,7 +431,7 @@ register(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {register, State, Pid, ?MODULE, undefined, Opts} = Msg,
+ {register, State, Pid, ?MODULE, Opts} = Msg,
check_opts(EOpts, Opts)
end
end,
@@ -407,7 +452,7 @@ unregister(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {unregister, State, Pid, ?MODULE, undefined, Opts} = Msg,
+ {unregister, State, Pid, ?MODULE, Opts} = Msg,
check_opts(EOpts, Opts)
end
end,
@@ -427,8 +472,7 @@ in(_Config) ->
N = (fun F(N) ->
receive
Msg ->
- {in, State, Pid, _,
- undefined, Opts} = Msg,
+ {in, State, Pid, _, Opts} = Msg,
check_opts(EOpts, Opts),
F(N+1)
after 0 -> N
@@ -452,8 +496,7 @@ out(_Config) ->
N = (fun F(N) ->
receive
Msg ->
- {out, State, Pid, _,
- undefined, Opts} = Msg,
+ {out, State, Pid, _, Opts} = Msg,
check_opts(EOpts, Opts),
F(N+1)
after 0 -> N
@@ -477,7 +520,7 @@ gc_start(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {gc_major_start, State, Pid, _, undefined, Opts} = Msg,
+ {gc_major_start, State, Pid, _, Opts} = Msg,
check_opts(EOpts, Opts)
end
end,
@@ -497,7 +540,7 @@ gc_end(_Config) ->
fun(Pid, State, EOpts) ->
receive
Msg ->
- {gc_major_end, State, Pid, _, undefined, Opts} = Msg,
+ {gc_major_end, State, Pid, _, Opts} = Msg,
check_opts(EOpts, Opts)
end
end,
@@ -513,9 +556,7 @@ test(Event, TraceFlag, Tc, Expect, Removes) ->
test(Event, TraceFlag, Tc, Expect, _Removes, Dies) ->
ComplexState = {fun() -> ok end, <<0:(128*8)>>},
- Opts = #{ timestamp => undefined,
- scheduler_id => undefined,
- match_spec_result => true },
+ Opts = #{ },
%% Test that trace works
State1 = {#{ Event => trace }, self(), ComplexState},
@@ -540,8 +581,8 @@ test(Event, TraceFlag, Tc, Expect, _Removes, Dies) ->
Tc(Pid1T),
ok = trace_delivered(Pid1T),
- Expect(Pid1T, State1, Opts#{ scheduler_id := number,
- timestamp := timestamp}),
+ Expect(Pid1T, State1, Opts#{ scheduler_id => number,
+ timestamp => timestamp}),
receive M11T -> ct:fail({unexpected, M11T}) after 0 -> ok end,
if not Dies ->
{flags, [scheduler_id, TraceFlag, timestamp]}
@@ -568,6 +609,8 @@ test(Event, TraceFlag, Tc, Expect, _Removes, Dies) ->
ok.
+check_opts(E, O, Extra) ->
+ check_opts(E#{ extra => Extra }, O).
check_opts(#{ scheduler_id := number } = E, #{ scheduler_id := N } = O)
when is_integer(N) ->
E1 = maps:remove(scheduler_id, E),
diff --git a/erts/emulator/test/tracer_SUITE_data/tracer_test.c b/erts/emulator/test/tracer_SUITE_data/tracer_test.c
index 908f35da9c..a26bb33600 100644
--- a/erts/emulator/test/tracer_SUITE_data/tracer_test.c
+++ b/erts/emulator/test/tracer_SUITE_data/tracer_test.c
@@ -36,7 +36,7 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ErlNifFunc nif_funcs[] = {
{"enabled", 3, enabled},
- {"trace", 6, trace}
+ {"trace", 5, trace}
};
ERL_NIF_INIT(tracer_test, nif_funcs, load, NULL, upgrade, unload)
@@ -100,7 +100,7 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
ErlNifPid self, to;
ERL_NIF_TERM *tuple, msg;
const ERL_NIF_TERM *state_tuple;
- ASSERT(argc == 6);
+ ASSERT(argc == 5);
enif_get_tuple(env, argv[1], &state_arity, &state_tuple);
diff --git a/erts/emulator/test/tracer_test.erl b/erts/emulator/test/tracer_test.erl
index d4778f4531..1da80bfe31 100644
--- a/erts/emulator/test/tracer_test.erl
+++ b/erts/emulator/test/tracer_test.erl
@@ -24,14 +24,14 @@
%%% Test tracer
%%%
--export([enabled/3, trace/6]).
+-export([enabled/3, trace/5]).
-export([load/1, load/2]).
-on_load(load/0).
enabled(_, _, _) ->
erlang:nif_error(nif_not_loaded).
-trace(_, _, _, _, _, _) ->
+trace(_, _, _, _, _) ->
erlang:nif_error(nif_not_loaded).
load() ->
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 42da05b1f7..2b2e0e480a 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -195,6 +195,7 @@ static char *plusz_val_switches[] = {
#endif
void usage(const char *switchname);
+static void usage_format(char *format, ...);
void start_epmd(char *epmd);
void error(char* format, ...);
@@ -795,6 +796,24 @@ int main(int argc, char **argv)
get_start_erl_data((char *) NULL);
}
#endif
+ else if (strcmp(argv[i], "-start_epmd") == 0) {
+ if (i+1 >= argc)
+ usage("-start_epmd");
+
+ if (strcmp(argv[i+1], "true") == 0) {
+ /* The default */
+ no_epmd = 0;
+ }
+ else if (strcmp(argv[i+1], "false") == 0) {
+ no_epmd = 1;
+ }
+ else
+ usage_format("Expected boolean argument for \'-start_epmd\'.\n");
+
+ add_arg(argv[i]);
+ add_arg(argv[i+1]);
+ i++;
+ }
else
add_arg(argv[i]);
@@ -1173,7 +1192,7 @@ usage_aux(void)
"]"
#endif
"] "
- "[-make] [-man [manopts] MANPAGE] [-x] [-emu_args] "
+ "[-make] [-man [manopts] MANPAGE] [-x] [-emu_args] [-start_epmd BOOLEAN] "
"[-args_file FILENAME] [+A THREADS] [+a SIZE] [+B[c|d|i]] [+c [BOOLEAN]] "
"[+C MODE] [+h HEAP_SIZE_OPTION] [+K BOOLEAN] "
"[+l] [+M<SUBSWITCH> <ARGUMENT>] [+P MAX_PROCS] [+Q MAX_PORTS] "
diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c
index e931ae4641..a4008186c4 100644
--- a/erts/etc/common/heart.c
+++ b/erts/etc/common/heart.c
@@ -119,6 +119,8 @@
#define HEART_COMMAND_ENV "HEART_COMMAND"
#define ERL_CRASH_DUMP_SECONDS_ENV "ERL_CRASH_DUMP_SECONDS"
#define HEART_KILL_SIGNAL "HEART_KILL_SIGNAL"
+#define HEART_NO_KILL "HEART_NO_KILL"
+
#define MSG_HDR_SIZE (2)
#define MSG_HDR_PLUS_OP_SIZE (3)
@@ -524,6 +526,12 @@ static void
kill_old_erlang(void){
HANDLE erlh;
DWORD exit_code;
+ char* envvar = NULL;
+
+ envvar = get_env(HEART_NO_KILL);
+ if (!envvar || strcmp(envvar, "TRUE") == 0)
+ return;
+
if(heart_beat_kill_pid != 0){
if((erlh = OpenProcess(PROCESS_TERMINATE |
SYNCHRONIZE |
@@ -555,10 +563,14 @@ kill_old_erlang(void){
pid_t pid;
int i, res;
int sig = SIGKILL;
- char *sigenv = NULL;
+ char *envvar = NULL;
+
+ envvar = get_env(HEART_NO_KILL);
+ if (!envvar || strcmp(envvar, "TRUE") == 0)
+ return;
- sigenv = get_env(HEART_KILL_SIGNAL);
- if (sigenv && strcmp(sigenv, "SIGABRT") == 0) {
+ envvar = get_env(HEART_KILL_SIGNAL);
+ if (envvar && strcmp(envvar, "SIGABRT") == 0) {
print_error("kill signal SIGABRT requested");
sig = SIGABRT;
}
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index 4dc24d68b4..8f9945c4b4 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -1657,8 +1657,29 @@ end
define etp-proc-state-int
# Args: int
#
- if ($arg0 & 0xff000000)
- printf "GARBAGE | "
+ if ($arg0 & 0x80000000)
+ printf "GARBAGE<0x80000000> | "
+ end
+ if ($arg0 & 0x40000000)
+ printf "dirty-running-sys | "
+ end
+ if ($arg0 & 0x20000000)
+ printf "dirty-running | "
+ end
+ if ($arg0 & 0x10000000)
+ printf "dirty-active-sys | "
+ end
+ if ($arg0 & 0x8000000)
+ printf "dirty-io-proc | "
+ end
+ if ($arg0 & 0x4000000)
+ printf "dirty-cpu-proc | "
+ end
+ if ($arg0 & 0x2000000)
+ printf "on-heap-msgq | "
+ end
+ if ($arg0 & 0x1000000)
+ printf "off-heap-msgq | "
end
if ($arg0 & 0x800000)
printf "delayed-sys | "
diff --git a/erts/preloaded/ebin/erl_tracer.beam b/erts/preloaded/ebin/erl_tracer.beam
index 69804540c9..22286ed221 100644
--- a/erts/preloaded/ebin/erl_tracer.beam
+++ b/erts/preloaded/ebin/erl_tracer.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 8379bf1768..cde8c9ab72 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 7b5797e90a..6fc95b914e 100644
--- a/erts/preloaded/ebin/init.beam
+++ b/erts/preloaded/ebin/init.beam
Binary files differ
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index 0521060e34..fdf8bbf4e2 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/src/erl_tracer.erl b/erts/preloaded/src/erl_tracer.erl
index fe15812535..c810069d17 100644
--- a/erts/preloaded/src/erl_tracer.erl
+++ b/erts/preloaded/src/erl_tracer.erl
@@ -1,6 +1,6 @@
-module(erl_tracer).
--export([enabled/3, trace/6, on_load/0]).
+-export([enabled/3, trace/5, on_load/0]).
-type tracee() :: port() | pid() | undefined.
@@ -26,9 +26,9 @@
| trace_tag_running_ports()
| trace_tag_gc().
--type trace_opts() :: #{ match_spec_result => true | term(),
- scheduler_id => undefined | non_neg_integer(),
- timestamp => undefined | timestamp | cpu_timestamp |
+-type trace_opts() :: #{ extra => term(), match_spec_result => term(),
+ scheduler_id => non_neg_integer(),
+ timestamp => timestamp | cpu_timestamp |
monotonic | strict_monotonic }.
-type tracer_state() :: term().
@@ -41,6 +41,9 @@ on_load() ->
%%% NIF placeholders
%%%
+%% This suppression is needed as trace_tag gets collapsed to atom()
+-dialyzer({no_contracts, enabled/3}).
+
-spec enabled(Tag :: trace_status,
TracerState :: tracer_state(),
Tracee :: tracee()) ->
@@ -56,8 +59,7 @@ enabled(_, _, _) ->
TracerState :: tracer_state(),
Tracee :: tracee(),
Msg :: term(),
- Extra :: term(),
Opts :: trace_opts()) -> any().
-trace(_, _, _, _, _, _) ->
+trace(_, _, _, _, _) ->
erlang:nif_error(nif_not_loaded).
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 3d152c4e92..94f3078173 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -980,14 +980,14 @@ group_leader(_GroupLeader, _Pid) ->
%% Shadowed by erl_bif_types: erlang:halt/0
-spec halt() -> no_return().
halt() ->
- erlang:nif_error(undefined).
+ erlang:halt(0, []).
%% halt/1
%% Shadowed by erl_bif_types: erlang:halt/1
-spec halt(Status) -> no_return() when
Status :: non_neg_integer() | 'abort' | string().
-halt(_Status) ->
- erlang:nif_error(undefined).
+halt(Status) ->
+ erlang:halt(Status, []).
%% halt/2
%% Shadowed by erl_bif_types: erlang:halt/2
@@ -2059,7 +2059,7 @@ open_port(PortName, PortSettings) ->
low | normal | high | max.
-type message_queue_data() ::
- off_heap | on_heap | mixed.
+ off_heap | on_heap.
-spec process_flag(trap_exit, Boolean) -> OldBoolean when
Boolean :: boolean(),
@@ -2578,6 +2578,7 @@ universaltime_to_localtime(_Universaltime) ->
%%--------------------------------------------------------------------------
+%% Shadowed by erl_bif_types: erlang:apply/2
-spec apply(Fun, Args) -> term() when
Fun :: function(),
Args :: [term()].
diff --git a/erts/preloaded/src/erts.app.src b/erts/preloaded/src/erts.app.src
index 98e0224a5f..e18da28905 100644
--- a/erts/preloaded/src/erts.app.src
+++ b/erts/preloaded/src/erts.app.src
@@ -37,7 +37,7 @@
{registered, []},
{applications, []},
{env, []},
- {runtime_dependencies, ["stdlib-2.5", "kernel-4.0", "sasl-2.4"]}
+ {runtime_dependencies, ["stdlib-3.0", "kernel-5.0", "sasl-3.0"]}
]}.
%% vim: ft=erlang
diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl
index 618b53f6bb..45468b3b9c 100644
--- a/erts/preloaded/src/init.erl
+++ b/erts/preloaded/src/init.erl
@@ -90,6 +90,7 @@
-define(ON_LOAD_HANDLER, init__boot__on_load_handler).
+
debug(false, _) -> ok;
debug(_, T) -> erlang:display(T).
@@ -173,7 +174,25 @@ stop() -> init ! {stop,stop}, ok.
-spec stop(Status) -> 'ok' when
Status :: non_neg_integer() | string().
-stop(Status) -> init ! {stop,{stop,Status}}, ok.
+stop(Status) when is_integer(Status), Status >= 0 ->
+ stop_1(Status);
+stop(Status) when is_list(Status) ->
+ case is_bytelist(Status) of
+ true ->
+ stop_1(Status);
+ false ->
+ erlang:error(badarg)
+ end;
+stop(_) ->
+ erlang:error(badarg).
+
+is_bytelist([B|Bs]) when is_integer(B), B >= 0, B < 256 -> is_bytelist(Bs);
+is_bytelist([]) -> true;
+is_bytelist(_) -> false.
+
+%% Note that we check the type of Status beforehand to ensure that
+%% the call to halt(Status) by the init process cannot fail
+stop_1(Status) -> init ! {stop,{stop,Status}}, ok.
-spec boot(BootArgs) -> no_return() when
BootArgs :: [binary()].
@@ -285,21 +304,13 @@ things_to_string([]) ->
"".
halt_string(String, List) ->
- HaltString = String ++ things_to_string(List),
- if
- length(HaltString)<199 -> HaltString;
- true -> first198(HaltString, 198)
- end.
-
-first198([H|T], N) when N>0 ->
- [H|first198(T, N-1)];
-first198(_, 0) ->
- [].
+ String ++ things_to_string(List).
%% String = string()
%% List = [string() | atom() | pid() | number()]
%% Any other items in List, such as tuples, are ignored when creating
%% the string used as argument to erlang:halt/1.
+-spec crash(_, _) -> no_return().
crash(String, List) ->
halt(halt_string(String, List)).
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index 4872ffd00c..560810d222 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -70,11 +70,13 @@ open(Protocol, Family, Type) ->
open(Protocol, Family, Type, Opts) ->
open(Protocol, Family, Type, Opts, ?INET_REQ_OPEN, []).
+%% FDOPEN(tcp|udp|sctp, inet|inet6|local, stream|dgram|seqpacket, integer())
+
fdopen(Protocol, Family, Type, Fd) when is_integer(Fd) ->
fdopen(Protocol, Family, Type, Fd, true).
fdopen(Protocol, Family, Type, Fd, Bound)
- when is_integer(Fd), Bound == true orelse Bound == false ->
+ when is_integer(Fd), is_boolean(Bound) ->
open(Protocol, Family, Type, [], ?INET_REQ_FDOPEN,
[?int32(Fd), enc_value_2(bool, Bound)]).
@@ -104,8 +106,9 @@ open(Protocol, Family, Type, Opts, Req, Data) ->
error:system_limit -> {error, system_limit}
end.
-enc_family(inet) -> ?INET_AF_INET;
-enc_family(inet6) -> ?INET_AF_INET6.
+enc_family(inet) -> ?INET_AF_INET;
+enc_family(inet6) -> ?INET_AF_INET6;
+enc_family(local) -> ?INET_AF_LOCAL.
enc_type(stream) -> ?INET_TYPE_STREAM;
enc_type(dgram) -> ?INET_TYPE_DGRAM;
@@ -189,41 +192,52 @@ close_port(S) ->
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bind(S,IP,Port) when is_port(S), is_integer(Port), Port >= 0, Port =< 65535 ->
- case ctl_cmd(S,?INET_REQ_BIND,enc_value(set, addr, {IP,Port})) of
- {ok, [P1,P0]} -> {ok, ?u16(P1, P0)};
- {error,_}=Error -> Error
- end;
-
%% Multi-homed "bind": sctp_bindx(). The Op is 'add' or 'remove'.
%% If no addrs are specified, it just does nothing.
%% Function returns {ok, S} on success, unlike TCP/UDP "bind":
-bind(S, Op, Addrs) when is_port(S), is_list(Addrs) ->
- case Op of
- add ->
- bindx(S, 1, Addrs);
- remove ->
- bindx(S, 0, Addrs);
- _ -> {error, einval}
+bind(S, add, Addrs) when is_port(S), is_list(Addrs) ->
+ bindx(S, 1, Addrs);
+bind(S, remove, Addrs) when is_port(S), is_list(Addrs) ->
+ bindx(S, 0, Addrs);
+bind(S, Addr, _) when is_port(S), tuple_size(Addr) =:= 2 ->
+ case type_value(set, addr, Addr) of
+ true ->
+ case ctl_cmd(S,?INET_REQ_BIND,enc_value(set, addr, Addr)) of
+ {ok, [P1,P0]} -> {ok, ?u16(P1, P0)};
+ {error, _} = Error -> Error
+ end;
+ false ->
+ {error, einval}
end;
-bind(_, _, _) -> {error, einval}.
+bind(S, IP, Port) ->
+ bind(S, {IP, Port}, 0).
bindx(S, AddFlag, Addrs) ->
case getprotocol(S) of
sctp ->
- %% Really multi-homed "bindx". Stringified args:
- %% [AddFlag, (AddrBytes see enc_value_2(addr,X))+]:
- Args =
- [?int8(AddFlag)|
- [enc_value(set, addr, {IP,Port}) ||
- {IP, Port} <- Addrs]],
- case ctl_cmd(S, ?SCTP_REQ_BINDX, Args) of
- {ok,_} -> {ok, S};
- {error,_}=Error -> Error
+ case bindx_check_addrs(Addrs) of
+ true ->
+ %% Really multi-homed "bindx". Stringified args:
+ %% [AddFlag, (AddrBytes see enc_value_2(addr,X))+]:
+ Args =
+ [?int8(AddFlag)|
+ [enc_value(set, addr, Addr) || Addr <- Addrs]],
+ case ctl_cmd(S, ?SCTP_REQ_BINDX, Args) of
+ {ok, _} -> {ok, S};
+ {error, _}=Error -> Error
+ end;
+ false ->
+ {error, einval}
end;
- _ -> {error, einval}
+ _ ->
+ {error, einval}
end.
+bindx_check_addrs([Addr|Addrs]) ->
+ type_value(set, addr, Addr) andalso bindx_check_addrs(Addrs);
+bindx_check_addrs([]) ->
+ true.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% CONNECT(insock(), IP, Port [,Timeout]) -> ok | {error, Reason}
@@ -242,14 +256,24 @@ bindx(S, AddFlag, Addrs) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% For TCP, UDP or SCTP sockets.
%%
-connect(S, IP, Port) -> connect0(S, IP, Port, -1).
-connect(S, IP, Port, infinity) -> connect0(S, IP, Port, -1);
-connect(S, IP, Port, Time) -> connect0(S, IP, Port, Time).
+connect(S, IP, Port) ->
+ connect(S, IP, Port, infinity).
+%%
+connect(S, Addr, _, Time) when is_port(S), tuple_size(Addr) =:= 2 ->
+ case type_value(set, addr, Addr) of
+ true when Time =:= infinity ->
+ connect0(S, Addr, -1);
+ true when is_integer(Time) ->
+ connect0(S, Addr, Time);
+ false ->
+ {error, einval}
+ end;
+connect(S, IP, Port, Time) ->
+ connect(S, {IP, Port}, 0, Time).
-connect0(S, IP, Port, Time) when is_port(S), Port > 0, Port =< 65535,
- is_integer(Time) ->
- case async_connect(S, IP, Port, Time) of
+connect0(S, Addr, Time) ->
+ case async_connect0(S, Addr, Time) of
{ok, S, Ref} ->
receive
{inet_async, S, Ref, Status} ->
@@ -258,11 +282,27 @@ connect0(S, IP, Port, Time) when is_port(S), Port > 0, Port =< 65535,
Error -> Error
end.
+
+async_connect(S, Addr, _, Time) when is_port(S), tuple_size(Addr) =:= 2 ->
+ case type_value(set, addr, Addr) of
+ true when Time =:= infinity ->
+ async_connect0(S, Addr, -1);
+ true when is_integer(Time) ->
+ async_connect0(S, Addr, Time);
+ false ->
+ {error, einval}
+ end;
+%%
async_connect(S, IP, Port, Time) ->
- case ctl_cmd(S, ?INET_REQ_CONNECT,
- [enc_time(Time),?int16(Port),ip_to_bytes(IP)]) of
+ async_connect(S, {IP, Port}, 0, Time).
+
+async_connect0(S, Addr, Time) ->
+ case ctl_cmd(
+ S, ?INET_REQ_CONNECT,
+ [enc_time(Time),enc_value(set, addr, Addr)])
+ of
{ok, [R1,R0]} -> {ok, S, ?u16(R1,R0)};
- {error,_}=Error -> Error
+ {error, _}=Error -> Error
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -400,20 +440,34 @@ send(S, Data) ->
%% "sendto" is for UDP. IP and Port are set by the caller to 0 if the socket
%% is known to be connected.
-sendto(S, IP, Port, Data) when is_port(S), Port >= 0, Port =< 65535 ->
- ?DBG_FORMAT("prim_inet:sendto(~p, ~p, ~p, ~p)~n", [S,IP,Port,Data]),
- try erlang:port_command(S, [?int16(Port),ip_to_bytes(IP),Data]) of
- true ->
- receive
- {inet_reply,S,Reply} ->
- ?DBG_FORMAT("prim_inet:sendto() -> ~p~n", [Reply]),
- Reply
- end
- catch
- error:_ ->
- ?DBG_FORMAT("prim_inet:sendto() -> {error,einval}~n", []),
- {error,einval}
- end.
+sendto(S, Addr, _, Data) when is_port(S), tuple_size(Addr) =:= 2 ->
+ case type_value(set, addr, Addr) of
+ true ->
+ ?DBG_FORMAT("prim_inet:sendto(~p, ~p, ~p)~n", [S,Addr,Data]),
+ try
+ erlang:port_command(S, [enc_value(set, addr, Addr),Data])
+ of
+ true ->
+ receive
+ {inet_reply,S,Reply} ->
+ ?DBG_FORMAT(
+ "prim_inet:sendto() -> ~p~n", [Reply]),
+ Reply
+ end
+ catch
+ error:_ ->
+ ?DBG_FORMAT(
+ "prim_inet:sendto() -> {error,einval}~n", []),
+ {error,einval}
+ end;
+ false ->
+ ?DBG_FORMAT(
+ "prim_inet:sendto() -> {error,einval}~n", []),
+ {error,einval}
+ end;
+sendto(S, IP, Port, Data) ->
+ sendto(S, {IP, Port}, 0, Data).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
@@ -484,29 +538,37 @@ async_recv(S, Length, Time) ->
%% oriented: preserved here only for API compatibility.
%%
recvfrom(S, Length) ->
- recvfrom0(S, Length, -1).
+ recvfrom(S, Length, infinity).
-recvfrom(S, Length, infinity) ->
+recvfrom(S, Length, infinity) when is_port(S) ->
recvfrom0(S, Length, -1);
-recvfrom(S, Length, Time) when is_integer(Time), Time < 16#ffffffff ->
- recvfrom0(S, Length, Time);
-recvfrom(_, _, _) -> {error,einval}.
+recvfrom(S, Length, Time) when is_port(S) ->
+ if
+ is_integer(Time), 0 =< Time, Time < 16#ffffffff ->
+ recvfrom0(S, Length, Time);
+ true ->
+ {error, einval}
+ end.
recvfrom0(S, Length, Time)
- when is_port(S), is_integer(Length), Length >= 0, Length =< 16#ffffffff ->
+ when is_integer(Length), 0 =< Length, Length =< 16#ffffffff ->
case ctl_cmd(S, ?PACKET_REQ_RECV,[enc_time(Time),?int32(Length)]) of
{ok,[R1,R0]} ->
Ref = ?u16(R1,R0),
receive
% Success, UDP:
- {inet_async, S, Ref, {ok, [F,P1,P0 | AddrData]}} ->
- {IP,Data} = get_ip(F, AddrData),
- {ok, {IP, ?u16(P1,P0), Data}};
+ {inet_async, S, Ref, {ok, [F | AddrData]}} ->
+ case get_addr(F, AddrData) of
+ {{Family, _} = Addr, Data} when is_atom(Family) ->
+ {ok, {Addr, 0, Data}};
+ {{IP, Port}, Data} ->
+ {ok, {IP, Port, Data}}
+ end;
% Success, SCTP:
{inet_async, S, Ref, {ok, {[F,P1,P0 | Addr], AncData, DE}}} ->
- {IP, _} = get_ip(F, Addr),
- {ok, {IP, ?u16(P1,P0), AncData, DE}};
+ {IP, _} = get_ip(F, Addr),
+ {ok, {IP, ?u16(P1, P0), AncData, DE}};
% Back-end error:
{inet_async, S, Ref, Error={error, _}} ->
@@ -525,21 +587,26 @@ recvfrom0(_, _, _) -> {error,einval}.
peername(S) when is_port(S) ->
case ctl_cmd(S, ?INET_REQ_PEER, []) of
- {ok, [F, P1,P0 | Addr]} ->
- {IP, _} = get_ip(F, Addr),
- {ok, { IP, ?u16(P1, P0) }};
- {error,_}=Error -> Error
+ {ok, [F | Addr]} ->
+ {A, _} = get_addr(F, Addr),
+ {ok, A};
+ {error, _} = Error -> Error
end.
-setpeername(S, {IP,Port}) when is_port(S) ->
- case ctl_cmd(S, ?INET_REQ_SETPEER, [?int16(Port),ip_to_bytes(IP)]) of
- {ok,[]} -> ok;
- {error,_}=Error -> Error
- end;
setpeername(S, undefined) when is_port(S) ->
case ctl_cmd(S, ?INET_REQ_SETPEER, []) of
- {ok,[]} -> ok;
- {error,_}=Error -> Error
+ {ok, []} -> ok;
+ {error, _} = Error -> Error
+ end;
+setpeername(S, Addr) when is_port(S) ->
+ case type_value(set, addr, Addr) of
+ true ->
+ case ctl_cmd(S, ?INET_REQ_SETPEER, enc_value(set, addr, Addr)) of
+ {ok, []} -> ok;
+ {error, _} = Error -> Error
+ end;
+ false ->
+ {error, einval}
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -580,21 +647,28 @@ peernames(S, AssocId)
sockname(S) when is_port(S) ->
case ctl_cmd(S, ?INET_REQ_NAME, []) of
- {ok, [F, P1, P0 | Addr]} ->
- {IP, _} = get_ip(F, Addr),
- {ok, { IP, ?u16(P1, P0) }};
- {error,_}=Error -> Error
+ {ok, [F | Addr]} ->
+ {A, _} = get_addr(F, Addr),
+ {ok, A};
+ {error, _} = Error -> Error
end.
-setsockname(S, {IP,Port}) when is_port(S) ->
- case ctl_cmd(S, ?INET_REQ_SETNAME, [?int16(Port),ip_to_bytes(IP)]) of
- {ok,[]} -> ok;
- {error,_}=Error -> Error
- end;
setsockname(S, undefined) when is_port(S) ->
case ctl_cmd(S, ?INET_REQ_SETNAME, []) of
- {ok,[]} -> ok;
- {error,_}=Error -> Error
+ {ok, []} -> ok;
+ {error, _} = Error -> Error
+ end;
+setsockname(S, Addr) when is_port(S) ->
+ case type_value(set, addr, Addr) of
+ true ->
+ case
+ ctl_cmd(S, ?INET_REQ_SETNAME, enc_value(set, addr, Addr))
+ of
+ {ok, []} -> ok;
+ {error, _} = Error -> Error
+ end;
+ false ->
+ {error, einval}
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1496,14 +1570,49 @@ type_value_2(uint8, X) when X band 16#ff =:= X -> true;
type_value_2(time, infinity) -> true;
type_value_2(time, X) when is_integer(X), X >= 0 -> true;
type_value_2(ip,{A,B,C,D}) when ?ip(A,B,C,D) -> true;
+%%
type_value_2(addr, {any,Port}) ->
type_value_2(uint16, Port);
type_value_2(addr, {loopback,Port}) ->
type_value_2(uint16, Port);
-type_value_2(addr, {{A,B,C,D},Port}) when ?ip(A,B,C,D) ->
+type_value_2(addr, {IP,_} = Addr) when tuple_size(IP) =:= 4 ->
+ type_value_2(addr, {inet,Addr});
+type_value_2(addr, {IP,_} = Addr) when tuple_size(IP) =:= 8 ->
+ type_value_2(addr, {inet6,Addr});
+type_value_2(addr, {Local,_}) when is_list(Local); is_binary(Local) ->
+ type_value_2(addr, {local,Local});
+%%
+type_value_2(addr, {Family,{Tag,Port}})
+ when (Family =:= inet orelse Family =:= inet6) andalso
+ (Tag =:= any orelse Tag =:= loopback) ->
+ type_value_2(uint16, Port);
+type_value_2(addr, {inet,{{A,B,C,D},Port}})
+ when ?ip(A,B,C,D) ->
type_value_2(uint16, Port);
-type_value_2(addr, {{A,B,C,D,E,F,G,H},Port}) when ?ip6(A,B,C,D,E,F,G,H) ->
+type_value_2(addr, {inet6,{{A,B,C,D,E,F,G,H},Port}})
+ when ?ip6(A,B,C,D,E,F,G,H) ->
type_value_2(uint16, Port);
+type_value_2(addr, {local,Addr}) ->
+ if
+ is_binary(Addr) ->
+ byte_size(Addr) =< 255;
+ true ->
+ try
+ %% We either get a badarg from byte_size
+ %% or from characters_to_binary
+ byte_size(
+ unicode:characters_to_binary(
+ Addr, file:native_name_encoding()))
+ of
+ N when N =< 255 ->
+ true;
+ _ ->
+ false
+ catch error:badarg ->
+ false
+ end
+ end;
+%%
type_value_2(ether,[X1,X2,X3,X4,X5,X6])
when ?ether(X1,X2,X3,X4,X5,X6) -> true;
type_value_2({enum,List}, Enum) ->
@@ -1611,6 +1720,7 @@ enc_value_2(time, Val) -> ?int32(Val);
enc_value_2(ip,{A,B,C,D}) -> [A,B,C,D];
enc_value_2(ip, any) -> [0,0,0,0];
enc_value_2(ip, loopback) -> [127,0,0,1];
+%%
enc_value_2(addr, {any,Port}) ->
[?INET_AF_ANY|?int16(Port)];
enc_value_2(addr, {loopback,Port}) ->
@@ -1619,6 +1729,35 @@ enc_value_2(addr, {IP,Port}) when tuple_size(IP) =:= 4 ->
[?INET_AF_INET,?int16(Port)|ip4_to_bytes(IP)];
enc_value_2(addr, {IP,Port}) when tuple_size(IP) =:= 8 ->
[?INET_AF_INET6,?int16(Port)|ip6_to_bytes(IP)];
+enc_value_2(addr, {File,_}) when is_list(File); is_binary(File) ->
+ [?INET_AF_LOCAL,iolist_size(File)|File];
+%%
+enc_value_2(addr, {inet,{any,Port}}) ->
+ [?INET_AF_INET,?int16(Port),0,0,0,0];
+enc_value_2(addr, {inet,{loopback,Port}}) ->
+ [?INET_AF_INET,?int16(Port),127,0,0,1];
+enc_value_2(addr, {inet,{IP,Port}}) ->
+ [?INET_AF_INET,?int16(Port)|ip4_to_bytes(IP)];
+enc_value_2(addr, {inet6,{any,Port}}) ->
+ [?INET_AF_INET6,?int16(Port),0,0,0,0,0,0,0,0];
+enc_value_2(addr, {inet6,{loopback,Port}}) ->
+ [?INET_AF_INET6,?int16(Port),0,0,0,0,0,0,0,1];
+enc_value_2(addr, {inet6,{IP,Port}}) ->
+ [?INET_AF_INET6,?int16(Port)|ip6_to_bytes(IP)];
+enc_value_2(addr, {local,Addr}) ->
+ %% A binary is passed as is, but anything else will be
+ %% regarded as a filename and therefore encoded according to
+ %% the current system filename encoding mode.
+ Bin =
+ if
+ is_binary(Addr) ->
+ Addr;
+ true ->
+ unicode:characters_to_binary(
+ Addr, file:native_name_encoding())
+ end,
+ [?INET_AF_LOCAL,byte_size(Bin),Bin];
+%%
enc_value_2(ether, [_,_,_,_,_,_]=Xs) -> Xs;
enc_value_2(sockaddr, any) ->
[?INET_AF_ANY];
@@ -2249,9 +2388,6 @@ utf8_to_characters(Bs, U, 0) ->
utf8_to_characters([B|Bs], U, N) when ((B band 16#3F) bor 16#80) =:= B ->
utf8_to_characters(Bs, (U bsl 6) bor (B band 16#3F), N-1).
-ip_to_bytes(IP) when tuple_size(IP) =:= 4 -> ip4_to_bytes(IP);
-ip_to_bytes(IP) when tuple_size(IP) =:= 8 -> ip6_to_bytes(IP).
-
ip4_to_bytes({A,B,C,D}) ->
[A band 16#ff, B band 16#ff, C band 16#ff, D band 16#ff].
@@ -2261,18 +2397,32 @@ ip6_to_bytes({A,B,C,D,E,F,G,H}) ->
get_addrs([]) ->
[];
-get_addrs([F,P1,P0|Addr]) ->
- {IP,Addrs} = get_ip(F, Addr),
- [{IP,?u16(P1, P0)}|get_addrs(Addrs)].
-
-get_ip(?INET_AF_INET, Addr) -> get_ip4(Addr);
-get_ip(?INET_AF_INET6, Addr) -> get_ip6(Addr).
+get_addrs([F|Addrs]) ->
+ {Addr,Rest} = get_addr(F, Addrs),
+ [Addr|get_addrs(Rest)].
+
+get_addr(?INET_AF_LOCAL, [0]) ->
+ {{local,<<>>},[]};
+get_addr(?INET_AF_LOCAL, [N|Addr]) ->
+ {A,Rest} = lists:split(N, Addr),
+ {{local,iolist_to_binary(A)},Rest};
+get_addr(?INET_AF_UNDEFINED, Rest) ->
+ {{undefined,0},Rest};
+get_addr(Family, [P1,P0|Addr]) ->
+ {IP,Rest} = get_ip(Family, Addr),
+ {{IP,?u16(P1, P0)},Rest}.
+
+get_ip(?INET_AF_INET, Addr) ->
+ get_ip4(Addr);
+get_ip(?INET_AF_INET6, Addr) ->
+ get_ip6(Addr).
get_ip4([A,B,C,D | T]) -> {{A,B,C,D},T}.
get_ip6([X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14,X15,X16 | T]) ->
{ { ?u16(X1,X2),?u16(X3,X4),?u16(X5,X6),?u16(X7,X8),
- ?u16(X9,X10),?u16(X11,X12),?u16(X13,X14),?u16(X15,X16)}, T}.
+ ?u16(X9,X10),?u16(X11,X12),?u16(X13,X14),?u16(X15,X16)},
+ T }.
%% Control command
diff --git a/lib/common_test/src/test_server.erl b/lib/common_test/src/test_server.erl
index ac81842583..924086f2bd 100644
--- a/lib/common_test/src/test_server.erl
+++ b/lib/common_test/src/test_server.erl
@@ -21,7 +21,7 @@
-define(DEFAULT_TIMETRAP_SECS, 60).
%%% TEST_SERVER_CTRL INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--export([run_test_case_apply/1,init_target_info/0,init_purify/0]).
+-export([run_test_case_apply/1,init_target_info/0]).
-export([cover_compile/1,cover_analyse/2]).
%%% TEST_SERVER_SUP INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -49,10 +49,6 @@
-export([break/1,break/2,break/3,continue/0,continue/1]).
-%%% DEBUGGER INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--export([purify_new_leaks/0, purify_format/2, purify_new_fds_inuse/0,
- purify_is_running/0]).
-
%%% PRIVATE EXPORTED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-export([]).
@@ -73,10 +69,6 @@ init_target_info() ->
username=test_server_sup:get_username(),
cookie=atom_to_list(erlang:get_cookie())}.
-init_purify() ->
- purify_new_leaks().
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% cover_compile(#cover{app=App,incl=Include,excl=Exclude,cross=Cross}) ->
%% {ok,#cover{mods=AnalyseModules}} | {error,Reason}
@@ -100,7 +92,7 @@ cover_compile(CoverInfo=#cover{app=none,incl=Include,cross=Cross}) ->
case length(CompileMods) of
0 ->
io:fwrite("WARNING: No modules to cover compile!\n\n",[]),
- cover:start(), % start cover server anyway
+ {ok, _} = start_cover(), % start cover server anyway
{ok,CoverInfo#cover{mods=[]}};
N ->
io:fwrite("Cover compiling ~w modules - "
@@ -115,7 +107,7 @@ cover_compile(CoverInfo=#cover{app=App,excl=all,incl=Include,cross=Cross}) ->
case length(CompileMods) of
0 ->
io:fwrite("WARNING: No modules to cover compile!\n\n",[]),
- cover:start(), % start cover server anyway
+ {ok, _} = start_cover(), % start cover server anyway
{ok,CoverInfo#cover{mods=[]}};
N ->
io:fwrite("Cover compiling '~w' (~w files) - "
@@ -158,7 +150,7 @@ cover_compile(CoverInfo=#cover{app=App,excl=Exclude,
case length(CompileMods) of
0 ->
io:fwrite("WARNING: No modules to cover compile!\n\n",[]),
- cover:start(), % start cover server anyway
+ {ok, _} = start_cover(), % start cover server anyway
{ok,CoverInfo#cover{mods=[]}};
N ->
io:fwrite("Cover compiling '~w' (~w files) - "
@@ -175,11 +167,11 @@ module_names(Beams) ->
do_cover_compile(Modules) ->
- cover:start(),
+ {ok, _} = start_cover(),
Sticky = prepare_cover_compile(Modules,[]),
R = cover:compile_beam(Modules),
- [warn_compile(Error) || Error <- R,element(1,Error)=/=ok],
- [code:stick_mod(M) || M <- Sticky],
+ _ = [warn_compile(Error) || Error <- R,element(1,Error)=/=ok],
+ _ = [code:stick_mod(M) || M <- Sticky],
ok.
warn_compile({error,{Reason,Module}}) ->
@@ -366,9 +358,7 @@ stick_all_sticky(Node,Sticky) ->
%% compensate timetraps for runtime delays introduced by e.g. tools like
%% cover.
-run_test_case_apply({CaseNum,Mod,Func,Args,Name,
- RunInit,TimetrapData}) ->
- purify_format("Test case #~w ~w:~w/1", [CaseNum, Mod, Func]),
+run_test_case_apply({Mod,Func,Args,Name,RunInit,TimetrapData}) ->
case os:getenv("TS_RUN_VALGRIND") of
false ->
ok;
@@ -380,7 +370,6 @@ run_test_case_apply({CaseNum,Mod,Func,Args,Name,
Result = run_test_case_apply(Mod, Func, Args, Name, RunInit,
TimetrapData),
ProcAft = erlang:system_info(process_count),
- purify_new_leaks(),
DetFail = get(test_server_detected_fail),
{Result,DetFail,ProcBef,ProcAft}.
@@ -585,7 +574,8 @@ run_test_case_msgloop(#st{ref=Ref,pid=Pid,end_conf_pid=EndConfPid0}=St0) ->
{user_timetrap,Pid,_TrapTime,StartTime,E={user_timetrap_error,_},_} ->
case update_user_timetraps(Pid, StartTime) of
proceed ->
- self() ! {abort_current_testcase,E,Pid};
+ self() ! {abort_current_testcase,E,Pid},
+ ok;
ignore ->
ok
end,
@@ -600,7 +590,8 @@ run_test_case_msgloop(#st{ref=Ref,pid=Pid,end_conf_pid=EndConfPid0}=St0) ->
true ->
TrapTime
end,
- timetrap(TrapTime, TotalTime, Pid, Scale);
+ _ = timetrap(TrapTime, TotalTime, Pid, Scale),
+ ok;
ignore ->
ok
end,
@@ -724,7 +715,7 @@ do_call_end_conf(Starter,Mod,Func,Data,TCExitReason,Conf,TVal) ->
Supervisor = self(),
EndConfApply =
fun() ->
- timetrap(TVal),
+ _ = timetrap(TVal),
%% We can't handle fails or skips here
%% (neither input nor output). The error can
%% be read from Conf though (tc_status).
@@ -775,7 +766,8 @@ print_end_conf_result(Mod,Func,Conf,Cause,Error) ->
" ~s!\n\tReason: ~ts\n",
[Mod,Func,Conf,Cause,ErrorStr])
end,
- group_leader() ! {printout,12,Str2Print}.
+ group_leader() ! {printout,12,Str2Print},
+ ok.
spawn_fw_call(Mod,IPTC={init_per_testcase,Func},CurrConf,Pid,
@@ -1287,7 +1279,9 @@ user_callback({CBMod,CBFunc}, Mod, Func, InitOrEnd, Args) ->
init_per_testcase(Mod, Func, Args) ->
case code:is_loaded(Mod) of
- false -> code:load_file(Mod);
+ false ->
+ _ = code:load_file(Mod),
+ ok;
_ -> ok
end,
case erlang:function_exported(Mod, init_per_testcase, 2) of
@@ -1355,7 +1349,8 @@ print_init_conf_result(Line,Cause,Reason) ->
"\tLocation: ~ts\n\tReason: ~ts\n",
[Cause,FormattedLoc,ReasonStr])
end,
- group_leader() ! {printout,12,Str2Print}.
+ group_leader() ! {printout,12,Str2Print},
+ ok.
end_per_testcase(Mod, Func, Conf) ->
@@ -1426,7 +1421,8 @@ print_end_tc_warning(EndFunc,Reason,Cause,Loc) ->
"Reason: ~ts\nLine: ~ts\n",
[EndFunc,Cause,ReasonStr,FormattedLoc])
end,
- group_leader() ! {printout,12,Str2Print}.
+ group_leader() ! {printout,12,Str2Print},
+ ok.
get_loc() ->
get(test_server_loc).
@@ -1830,7 +1826,6 @@ timetrap_scale_factor() ->
timetrap_scale_factor([
{ 2, fun() -> has_lock_checking() end},
{ 3, fun() -> has_superfluous_schedulers() end},
- { 5, fun() -> purify_is_running() end},
{ 6, fun() -> is_debug() end},
{10, fun() -> is_cover() end}
]).
@@ -2130,7 +2125,8 @@ timetrap_cancel_all(TCPid, SendToServer) ->
ok;
Timers ->
[timetrap_cancel_one(Handle, false) ||
- {Handle,Pid,_} <- Timers, Pid == TCPid]
+ {Handle,Pid,_} <- Timers, Pid == TCPid],
+ ok
end,
case get(test_server_user_timetrap) of
undefined ->
@@ -2140,13 +2136,15 @@ timetrap_cancel_all(TCPid, SendToServer) ->
{UserTTSup,_StartTime} ->
remove_user_timetrap(UserTTSup),
put(test_server_user_timetrap,
- proplists:delete(TCPid, UserTTs));
+ proplists:delete(TCPid, UserTTs)),
+ ok;
undefined ->
ok
end
end,
if SendToServer == true ->
- group_leader() ! {timetrap_cancel_all,TCPid,self()};
+ group_leader() ! {timetrap_cancel_all,TCPid,self()},
+ ok;
true ->
ok
end,
@@ -2561,10 +2559,11 @@ run_on_shielded_node(Fun, CArgs) when is_function(Fun), is_list(CArgs) ->
-spec start_job_proxy_fun(_, _) -> fun(() -> no_return()).
start_job_proxy_fun(Master, Fun) ->
fun () ->
- start_job_proxy(),
+ _ = start_job_proxy(),
receive
Ref ->
- Master ! {Ref, Fun()}
+ Master ! {Ref, Fun()},
+ ok
end,
receive after infinity -> infinity end
end.
@@ -2730,64 +2729,25 @@ is_commercial() ->
_ -> true
end.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% DEBUGGER INTERFACE %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% purify_is_running() -> false|true
-%%
-%% Tests if Purify is currently running.
-
-purify_is_running() ->
- case catch erlang:system_info({error_checker, running}) of
- {'EXIT', _} -> false;
- Res -> Res
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% purify_new_leaks() -> false|BytesLeaked
-%% BytesLeaked = integer()
-%%
-%% Checks for new memory leaks if Purify is active.
-%% Returns the number of bytes leaked, or false if Purify
-%% is not running.
-purify_new_leaks() ->
- case catch erlang:system_info({error_checker, memory}) of
- {'EXIT', _} -> false;
- Leaked when is_integer(Leaked) -> Leaked
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% purify_new_fds_inuse() -> false|FdsInuse
-%% FdsInuse = integer()
-%%
-%% Checks for new file descriptors in use.
-%% Returns the number of new file descriptors in use, or false
-%% if Purify is not running.
-purify_new_fds_inuse() ->
- case catch erlang:system_info({error_checker, fd}) of
- {'EXIT', _} -> false;
- Inuse when is_integer(Inuse) -> Inuse
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% purify_format(Format, Args) -> ok
-%% Format = string()
-%% Args = lists()
-%%
-%% Outputs the formatted string to Purify's logfile,if Purify is active.
-purify_format(Format, Args) ->
- (catch erlang:system_info({error_checker, io_lib:format(Format, Args)})),
- ok.
-
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Apply given function and reply to caller or proxy.
%%
do_sync_apply(Proxy, From, {M,F,A}) ->
Result = apply(M, F, A),
- if is_pid(Proxy) -> Proxy ! {sync_result_proxy,From,Result};
- true -> From ! {sync_result,Result}
+ if is_pid(Proxy) ->
+ Proxy ! {sync_result_proxy,From,Result},
+ ok;
+ true ->
+ From ! {sync_result,Result},
+ ok
end.
+
+start_cover() ->
+ case cover:start() of
+ {error, {already_started, Pid}} ->
+ {ok, Pid};
+ Else ->
+ Else
+ end.
+
diff --git a/lib/common_test/src/test_server_ctrl.erl b/lib/common_test/src/test_server_ctrl.erl
index 6bd7122c65..b52e4bef9b 100644
--- a/lib/common_test/src/test_server_ctrl.erl
+++ b/lib/common_test/src/test_server_ctrl.erl
@@ -512,7 +512,7 @@ init([]) ->
TI = TI0#target_info{host=TargetHost,
naming=naming(),
master=TargetHost},
- ets:new(slave_tab, [named_table,set,public,{keypos,2}]),
+ _ = ets:new(slave_tab, [named_table,set,public,{keypos,2}]),
set_hosts([TI#target_info.host]),
{ok,State#state{target_info=TI}}.
@@ -867,7 +867,7 @@ handle_call({create_priv_dir,Value}, _From, State) ->
handle_call({testcase_callback,ModFunc}, _From, State) ->
case ModFunc of
{Mod,Func} ->
- case code:is_loaded(Mod) of
+ _ = case code:is_loaded(Mod) of
{file,_} ->
ok;
false ->
@@ -1079,8 +1079,8 @@ terminate(_Reason, State) ->
false -> ok;
Sock -> test_server_node:stop_tracer_node(Sock)
end,
- kill_all_jobs(State#state.jobs),
- test_server_node:kill_nodes(),
+ ok = kill_all_jobs(State#state.jobs),
+ _ = test_server_node:kill_nodes(),
ok.
kill_all_jobs([{_Name,JobPid}|Jobs]) ->
@@ -1125,7 +1125,7 @@ spawn_tester(Mod, Func, Args, Dir, Name, Levels, RejectIoReqs,
init_tester(Mod, Func, Args, Dir, Name, {_,_,MinLev}=Levels,
RejectIoReqs, CreatePrivDir, TCCallback, ExtraTools) ->
process_flag(trap_exit, true),
- test_server_io:start_link(),
+ _ = test_server_io:start_link(),
put(test_server_name, Name),
put(test_server_dir, Dir),
put(test_server_total_time, 0),
@@ -1199,8 +1199,7 @@ init_tester(Mod, Func, Args, Dir, Name, {_,_,MinLev}=Levels,
{UnexpectedIoName,UnexpectedIoFooter} = get(test_server_unexpected_footer),
{ok,UnexpectedIoFd} = open_html_file(UnexpectedIoName, [append]),
io:put_chars(UnexpectedIoFd, "\n</pre>\n"++UnexpectedIoFooter),
- file:close(UnexpectedIoFd),
- ok.
+ ok = file:close(UnexpectedIoFd).
report_severe_error(Reason) ->
test_server_sup:framework_call(report, [severe_error,Reason]).
@@ -1927,7 +1926,7 @@ html_convert_modules([Mod|Mods]) ->
Name = atom_to_list(Mod),
DestFile = filename:join(DestDir,
downcase(Name)++?src_listing_ext),
- html_possibly_convert(SrcFile1, SrcFileInfo, DestFile),
+ _ = html_possibly_convert(SrcFile1, SrcFileInfo, DestFile),
html_convert_modules(Mods)
end;
_Other ->
@@ -2066,7 +2065,7 @@ add_init_and_end_per_suite([], LastMod, LastRef, FwMod) ->
end.
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod) ->
- case code:is_loaded(Mod) of
+ _ = case code:is_loaded(Mod) of
false -> code:load_file(Mod);
_ -> ok
end,
@@ -2140,7 +2139,6 @@ do_add_end_per_suite_and_skip(LastMod, LastRef, Mod, FwMod) ->
%% Runs the specified tests, then displays/logs the summary.
run_test_cases(TestSpec, Config, TimetrapData) ->
- test_server:init_purify(),
case lists:member(no_src, get(test_server_logopts)) of
true ->
ok;
@@ -2323,7 +2321,7 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) when
((SkipTag==auto_skip_case) or (SkipTag==skip_case)) and
((Type==conf) or (Type==make)) ->
- file:set_cwd(filename:dirname(get(test_server_dir))),
+ ok = file:set_cwd(filename:dirname(get(test_server_dir))),
CurrIOHandler = get(test_server_common_io_handler),
ParentMode = tl(Mode),
@@ -2339,7 +2337,7 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases],
false ->
%% this is a skipped end conf for a top level parallel
%% group, buffered io can be flushed
- handle_test_case_io_and_status(),
+ _ = handle_test_case_io_and_status(),
set_io_buffering(undefined),
{Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment,
false, SkipMode),
@@ -2351,7 +2349,7 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases],
_ ->
%% this is a skipped end conf for a parallel group nested
%% under a parallel group (io buffering is active)
- wait_for_cases(Ref),
+ _ = wait_for_cases(Ref),
{Mod,Func} = skip_case(AutoOrUser, Ref, 0, Case, Comment,
true, SkipMode),
ConfData = {Mod,{Func,get_name(SkipMode)},Comment},
@@ -2459,7 +2457,7 @@ run_test_cases_loop([{auto_skip_case,{Case,Comment},SkipMode}|Cases],
run_test_cases_loop([{skip_case,{{Mod,all}=Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) ->
- skip_case(user, undefined, 0, Case, Comment, false, SkipMode),
+ _ = skip_case(user, undefined, 0, Case, Comment, false, SkipMode),
test_server_sup:framework_call(report, [tc_user_skip,
{Mod,{all,get_name(SkipMode)},
Comment}]),
@@ -2489,7 +2487,7 @@ run_test_cases_loop([{conf,Ref,Props,{Mod,Func}}|_Cases]=Cs0,
%% collect results from the test case processes
%% and calc total time
OkSkipFail = handle_test_case_io_and_status(),
- file:set_cwd(filename:dirname(get(test_server_dir))),
+ ok = file:set_cwd(filename:dirname(get(test_server_dir))),
After = ?now,
Before = get(test_server_parallel_start_time),
Elapsed = timer:now_diff(After, Before)/1000000,
@@ -3582,7 +3580,7 @@ handle_io_and_exit_loop([], [{undefined,CurrPid,CaseNum,Mod,Func}|Ps] = Cases, O
handle_io_and_exit_loop(Refs, [{Ref,CurrPid,CaseNum,Mod,Func}|Ps] = Cases, Ok,Skip,Fail) ->
receive
{started,_,CurrPid,CaseNum,Mod,Func} ->
- handle_io_and_exits(self(), CurrPid, CaseNum, Mod, Func, Cases),
+ _ = handle_io_and_exits(self(), CurrPid, CaseNum, Mod, Func, Cases),
Refs1 =
case Refs of
[Ref|Rs] -> % must be end conf case for subgroup
@@ -3658,7 +3656,7 @@ handle_io_and_exits(Main, CurrPid, CaseNum, Mod, Func, Cases) ->
%% about the execution time and the return value of the test case function.
run_test_case(Ref, Num, Mod, Func, Args, RunInit, TimetrapData) ->
- file:set_cwd(filename:dirname(get(test_server_dir))),
+ ok = file:set_cwd(filename:dirname(get(test_server_dir))),
run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
TimetrapData, [], self()).
@@ -3668,7 +3666,7 @@ run_test_case(Ref, Num, Mod, Func, Args, skip_init, TimetrapData, Mode) ->
TimetrapData, Mode, self());
run_test_case(Ref, Num, Mod, Func, Args, RunInit, TimetrapData, Mode) ->
- file:set_cwd(filename:dirname(get(test_server_dir))),
+ ok = file:set_cwd(filename:dirname(get(test_server_dir))),
Main = self(),
case check_prop(parallel, Mode) of
false ->
@@ -3682,7 +3680,7 @@ run_test_case(Ref, Num, Mod, Func, Args, RunInit, TimetrapData, Mode) ->
spawn_link(
fun() ->
process_flag(trap_exit, true),
- [put(Key, Val) || {Key,Val} <- Dictionary],
+ _ = [put(Key, Val) || {Key,Val} <- Dictionary],
set_io_buffering({tc,Main}),
run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
TimetrapData, Mode, Main)
@@ -3699,7 +3697,8 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
false -> ok;
true ->
test_server_io:start_transaction(),
- Main ! {started,Ref,self(),Num,Mod,Func}
+ Main ! {started,Ref,self(),Num,Mod,Func},
+ ok
end,
TSDir = get(test_server_dir),
@@ -3774,7 +3773,7 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
%% run the test case
{Result,DetectedFail,ProcsBefore,ProcsAfter} =
- run_test_case_apply(Num, Mod, Func, [UpdatedArgs], GrName,
+ run_test_case_apply(Mod, Func, [UpdatedArgs], GrName,
RunInit, TimetrapData),
{Time,RetVal,Loc,Opts,Comment} =
case Result of
@@ -3906,7 +3905,8 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
true ->
test_server_io:end_transaction(),
Main ! {finished,Ref,self(),Num,Mod,Func,
- ?mod_result(Status),{Time,RetVal,Opts}}
+ ?mod_result(Status),{Time,RetVal,Opts}},
+ ok
end,
{Time,RetVal,Opts}.
@@ -4329,7 +4329,7 @@ do_format_exception(Reason={Error,Stack}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% run_test_case_apply(CaseNum, Mod, Func, Args, Name, RunInit,
+%% run_test_case_apply(Mod, Func, Args, Name, RunInit,
%% TimetrapData) ->
%% {{Time,RetVal,Loc,Opts,Comment},DetectedFail,ProcessesBefore,ProcessesAfter} |
%% {{died,Reason,unknown,Comment},DetectedFail,ProcessesBefore,ProcessesAfter}
@@ -4343,9 +4343,9 @@ do_format_exception(Reason={Error,Stack}) ->
%% ProcessesBefore = ProcessesAfter = integer()
%%
-run_test_case_apply(CaseNum, Mod, Func, Args, Name, RunInit,
+run_test_case_apply(Mod, Func, Args, Name, RunInit,
TimetrapData) ->
- test_server:run_test_case_apply({CaseNum,Mod,Func,Args,Name,RunInit,
+ test_server:run_test_case_apply({Mod,Func,Args,Name,RunInit,
TimetrapData}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5276,7 +5276,8 @@ check_cross([]) ->
%% This per application analysis writes the file cover.html in the
%% application's run.<timestamp> directory.
stop_cover(#cover{}=CoverInfo, TestDir) ->
- cover_analyse(CoverInfo, TestDir);
+ cover_analyse(CoverInfo, TestDir),
+ ok;
stop_cover(_CoverInfo, _TestDir) ->
%% Cover is probably controlled by the framework
ok.
@@ -5315,7 +5316,7 @@ cover_analyse(CoverInfo, TestDir) ->
[?cross_coverlog_name]),
io:fwrite(CoverLog, "<p>CoverFile: <code>~tp</code>\n", [CoverFile]),
- write_cross_cover_info(TestDir,Cross),
+ ok = write_cross_cover_info(TestDir,Cross),
case length(cover:imported_modules()) of
Imps when Imps > 0 ->
@@ -5329,7 +5330,7 @@ cover_analyse(CoverInfo, TestDir) ->
io:fwrite(CoverLog, "<p>Excluded module(s): <code>~tp</code>\n", [Excluded]),
Coverage = test_server:cover_analyse(TestDir, CoverInfo),
- write_binary_file(filename:join(TestDir,?raw_coverlog_name),
+ ok = write_binary_file(filename:join(TestDir,?raw_coverlog_name),
term_to_binary(Coverage)),
case lists:filter(fun({_M,{_,_,_}}) -> false;
@@ -5344,8 +5345,8 @@ cover_analyse(CoverInfo, TestDir) ->
end,
TotPercent = write_cover_result_table(CoverLog, Coverage),
- write_binary_file(filename:join(TestDir, ?cover_total),
- term_to_binary(TotPercent)).
+ ok = write_binary_file(filename:join(TestDir, ?cover_total),
+ term_to_binary(TotPercent)).
%% Cover analysis - accumulated over multiple tests
%% This can be executed on any node after all tests are finished.
@@ -5395,7 +5396,7 @@ write_cross_cover_info(Dir,Cross) ->
write_cross_cover_logs([{Tag,Coverage}|T],TagDirMods) ->
case lists:keyfind(Tag,1,TagDirMods) of
{_,Dir,Mods} when Mods=/=[] ->
- write_binary_file(filename:join(Dir,?raw_cross_coverlog_name),
+ ok = write_binary_file(filename:join(Dir,?raw_cross_coverlog_name),
term_to_binary(Coverage)),
CoverLogName = filename:join(Dir,?cross_coverlog_name),
{ok,CoverLog} = open_html_file(CoverLogName),
diff --git a/lib/common_test/src/test_server_gl.erl b/lib/common_test/src/test_server_gl.erl
index 333c8fc06e..7d6fe64b92 100644
--- a/lib/common_test/src/test_server_gl.erl
+++ b/lib/common_test/src/test_server_gl.erl
@@ -185,7 +185,7 @@ handle_info({capture,Cap0}, St) ->
end,
{noreply,St#st{capture=Cap}};
handle_info({io_request,From,ReplyAs,Req}=IoReq, St) ->
- try io_req(Req, From, St) of
+ _ = try io_req(Req, From, St) of
passthrough ->
group_leader() ! IoReq;
{EscapeHtml,Data} ->
@@ -197,7 +197,8 @@ handle_info({io_request,From,ReplyAs,Req}=IoReq, St) ->
#st{capture=none} ->
ok;
#st{capture=CapturePid} ->
- CapturePid ! {captured,Data}
+ CapturePid ! {captured,Data},
+ ok
end,
case EscapeHtml andalso St#st.escape_chars of
true ->
diff --git a/lib/common_test/src/test_server_io.erl b/lib/common_test/src/test_server_io.erl
index 8c5c0aef35..3d5238052b 100644
--- a/lib/common_test/src/test_server_io.erl
+++ b/lib/common_test/src/test_server_io.erl
@@ -215,7 +215,7 @@ handle_call({set_fd,Tag,Fd}, _From, #st{fds=Fds0,tags=Tags0,
true ->
%% Fd ready, print anything buffered for associated Tag
lists:filtermap(fun({T,From,Str}) when T == Tag ->
- output(From, Tag, Str, St1),
+ _ = output(From, Tag, Str, St1),
false;
(_) ->
true
@@ -274,14 +274,15 @@ handle_call(reset_state, _From, #st{fds=Fds,tags=Tags,gls=Gls,
end
end, Tags),
GlList = gb_sets:to_list(Gls),
- [test_server_gl:stop(GL) || GL <- GlList],
+ _ = [test_server_gl:stop(GL) || GL <- GlList],
timer:sleep(100),
case lists:filter(fun(GlPid) -> is_process_alive(GlPid) end, GlList) of
[] ->
ok;
_ ->
timer:sleep(2000),
- [exit(GL, kill) || GL <- GlList]
+ [exit(GL, kill) || GL <- GlList],
+ ok
end,
Empty = gb_trees:empty(),
{ok,Shared} = test_server_gl:start_link(),
@@ -304,7 +305,7 @@ handle_call({stop,FdTags}, From, #st{fds=Fds0,tags=Tags0,
none ->
{Fds,Tags};
{value,Fd} ->
- file:close(Fd),
+ _ = file:close(Fd),
{gb_trees:delete(Tag, Fds),
lists:delete(Tag, Tags)}
end
@@ -333,7 +334,7 @@ handle_info({'EXIT',_Pid,Reason}, _St) ->
handle_info(stop_group_leaders, #st{gls=Gls}=St) ->
%% Stop the remaining group leaders.
GlPids = gb_sets:to_list(Gls),
- [test_server_gl:stop(GL) || GL <- GlPids],
+ _ = [test_server_gl:stop(GL) || GL <- GlPids],
timer:sleep(100),
Wait =
case lists:filter(fun(GlPid) -> is_process_alive(GlPid) end, GlPids) of
@@ -344,7 +345,7 @@ handle_info(stop_group_leaders, #st{gls=Gls}=St) ->
{noreply,St};
handle_info(kill_group_leaders, #st{gls=Gls,stopping=From,
pending_ops=Ops}=St) ->
- [exit(GL, kill) || GL <- gb_sets:to_list(Gls)],
+ _ = [exit(GL, kill) || GL <- gb_sets:to_list(Gls)],
if From /= undefined ->
gen_server:reply(From, ok);
true -> % reply has been sent already
@@ -434,7 +435,7 @@ do_print_buffered(Q0, St) ->
eot ->
Q;
{Tag,Str} ->
- do_output(Tag, Str, undefined, St),
+ _ = do_output(Tag, Str, undefined, St),
do_print_buffered(Q, St)
end.
@@ -448,5 +449,5 @@ gc(#st{gls=Gls0}) ->
InUse = ordsets:from_list(InUse0),
Gls = gb_sets:to_list(Gls0),
NotUsed = ordsets:subtract(Gls, InUse),
- [test_server_gl:stop(Pid) || Pid <- NotUsed],
+ _ = [test_server_gl:stop(Pid) || Pid <- NotUsed],
ok.
diff --git a/lib/common_test/src/test_server_node.erl b/lib/common_test/src/test_server_node.erl
index c64399e485..0b406c54cc 100644
--- a/lib/common_test/src/test_server_node.erl
+++ b/lib/common_test/src/test_server_node.erl
@@ -198,9 +198,9 @@ trc_loop(Sock,Patterns,Type) ->
gen_tcp:close(Sock)
end.
add_nodes(Nodes,Patterns,_Type) ->
- ttb:tracer(Nodes,[{file,{local, test_server}},
- {handler, {{?MODULE,handle_debug},initial}}]),
- ttb:p(all,[call,timestamp]),
+ {ok, _} = ttb:tracer(Nodes,[{file,{local, test_server}},
+ {handler, {{?MODULE,handle_debug},initial}}]),
+ {ok, _} = ttb:p(all,[call,timestamp]),
lists:foreach(fun({TP,M,F,A,Pat}) -> ttb:TP(M,F,A,Pat);
({CTP,M,F,A}) -> ttb:CTP(M,F,A)
end,
@@ -360,8 +360,8 @@ start_node_peer(SlaveName, OptList, From, TI) ->
-spec wait_for_node_started_fun(_, _, _, _, _) -> fun(() -> no_return()).
wait_for_node_started_fun(LSock, Tmo, Cleanup, TI, Self) ->
fun() ->
- wait_for_node_started(LSock,Tmo,undefined,
- Cleanup,TI,Self),
+ {{ok, _}, _} = wait_for_node_started(LSock,Tmo,undefined,
+ Cleanup,TI,Self),
receive after infinity -> ok end
end.
@@ -432,7 +432,7 @@ wait_for_node_started(LSock,Timeout,Client,Cleanup,TI,CtrlPid) ->
client=Client});
false -> ok
end,
- gen_tcp:controlling_process(Sock,CtrlPid),
+ ok = gen_tcp:controlling_process(Sock,CtrlPid),
test_server_ctrl:node_started(Nodename),
{{ok,Nodename},W}
end;
diff --git a/lib/common_test/src/test_server_sup.erl b/lib/common_test/src/test_server_sup.erl
index fa2bb33c2d..6922e01fcc 100644
--- a/lib/common_test/src/test_server_sup.erl
+++ b/lib/common_test/src/test_server_sup.erl
@@ -755,7 +755,7 @@ framework_call(FW,_Func,_Args,DefaultReturn)
DefaultReturn;
framework_call(Callback,Func,Args,DefaultReturn) ->
Mod = list_to_atom(Callback),
- case code:is_loaded(Mod) of
+ _ = case code:is_loaded(Mod) of
false -> code:load_file(Mod);
_ -> ok
end,
@@ -851,7 +851,8 @@ util_start() ->
spawn_link(fun() ->
register(?MODULE, self()),
util_loop(#util_state{starter=Starter})
- end);
+ end),
+ ok;
_Pid ->
ok
end.
diff --git a/lib/common_test/src/vts.erl b/lib/common_test/src/vts.erl
index e1c16fbda4..f1c5051164 100644
--- a/lib/common_test/src/vts.erl
+++ b/lib/common_test/src/vts.erl
@@ -64,7 +64,7 @@
%%%-----------------------------------------------------------------
%%% User API
start() ->
- ct_webtool:start(),
+ {ok, _} = ct_webtool:start(),
ct_webtool:start_tools([],"app=vts").
init_data(ConfigFiles,EvHandlers,LogDir,LogOpts,Tests) ->
@@ -169,7 +169,7 @@ loop(State) ->
NewState = State#state{config=Config,event_handler=EvHandlers,
current_log_dir=LogDir,
logopts=LogOpts,tests=Tests},
- ct_install(NewState),
+ _ = ct_install(NewState),
return(From,ok),
loop(NewState);
{start_page,From} ->
@@ -192,12 +192,12 @@ loop(State) ->
loop(State);
{{add_config_file,Input},From} ->
{Return,State1} = add_config_file1(Input,State),
- ct_install(State1),
+ _ = ct_install(State1),
return(From,Return),
loop(State1);
{{remove_config_file,Input},From} ->
{Return,State1} = remove_config_file1(Input,State),
- ct_install(State1),
+ _ = ct_install(State1),
return(From,Return),
loop(State1);
{run_frame,From} ->
@@ -233,7 +233,7 @@ loop(State) ->
return(From,result_summary_frame1(State)),
loop(State);
stop_reload_results ->
- file:set_cwd(State#state.start_dir),
+ ok = file:set_cwd(State#state.start_dir),
loop(State#state{reload_results=false});
{no_result_log_frame,From} ->
return(From,no_result_log_frame1()),
@@ -277,8 +277,8 @@ call(Msg) ->
end.
return({To,Ref},Result) ->
- To ! {Ref, Result}.
-
+ To ! {Ref, Result},
+ ok.
run_test1(State=#state{tests=Tests,current_log_dir=LogDir,
logopts=LogOpts}) ->
@@ -311,7 +311,6 @@ run_test1(State=#state{tests=Tests,current_log_dir=LogDir,
ct_install(#state{config=Config,event_handler=EvHandlers,
current_log_dir=LogDir}) ->
ct_run:install([{config,Config},{event_handler,EvHandlers}],LogDir).
-
%%%-----------------------------------------------------------------
%%% HTML
start_page1() ->
@@ -549,7 +548,7 @@ case_select(Dir,Suite,Case,N) ->
end,
case MakeResult of
ok ->
- code:add_pathz(Dir),
+ true = code:add_pathz(Dir),
case catch apply(Suite,all,[]) of
{'EXIT',Reason} ->
io:format("\n~p\n",[Reason]),
@@ -755,7 +754,7 @@ report1(tests_start,{TestName,_N},State) ->
end,
State#state{testruns=TestRuns};
report1(tests_done,{_Ok,_Fail,_Skip},State) ->
- timer:send_after(5000, self(),stop_reload_results),
+ {ok, _} = timer:send_after(5000, self(),stop_reload_results),
State#state{running=State#state.running-1,reload_results=true};
report1(tc_start,{_Suite,_Case},State) ->
State;
diff --git a/lib/common_test/test/Makefile b/lib/common_test/test/Makefile
index 1532b6c1f7..b1eddfedd7 100644
--- a/lib/common_test/test/Makefile
+++ b/lib/common_test/test/Makefile
@@ -69,7 +69,8 @@ MODULES= \
erl2html2_SUITE \
test_server_SUITE \
test_server_test_lib \
- ct_release_test_SUITE
+ ct_release_test_SUITE \
+ ct_log_SUITE
ERL_FILES= $(MODULES:%=%.erl)
HRL_FILES= test_server_test_lib.hrl
diff --git a/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl b/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl
index c64774cd4f..0b3f834732 100644
--- a/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl
+++ b/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl
@@ -74,7 +74,7 @@ test_get_known_variable(_)->
test_localtime_update(_)->
Seconds = 5,
LT1 = ct:get_config(localtime),
- ct:sleep(Seconds*1000),
+ timer:sleep(Seconds*1000), % don't want scaling of this timer
LT2 = ct:reload_config(localtime),
case is_diff_ok(LT1, LT2, Seconds) of
{false, Actual, Exp}->
diff --git a/lib/common_test/test/ct_log_SUITE.erl b/lib/common_test/test/ct_log_SUITE.erl
new file mode 100644
index 0000000000..9bdd44cbdf
--- /dev/null
+++ b/lib/common_test/test/ct_log_SUITE.erl
@@ -0,0 +1,328 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009-2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%%-------------------------------------------------------------------
+%%% File: ct_log_SUITE
+%%%
+%%% Description: Test that ct:log, ct:pal and io:format print to
+%%% the test case log file as expected, with or without special HTML
+%%% characters being escaped.
+%%%
+%%%-------------------------------------------------------------------
+-module(ct_log_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("common_test/include/ct_event.hrl").
+
+-define(eh, ct_test_support_eh).
+
+%%--------------------------------------------------------------------
+%% TEST SERVER CALLBACK FUNCTIONS
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_testcase(_TestCase, Config) ->
+ Config.
+
+end_per_testcase(_TestCase, _Config) ->
+ ok.
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [{group,print_and_verify}].
+
+groups() ->
+ [{print_and_verify,[sequence],[print,verify]}].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% TEST CASES
+%%--------------------------------------------------------------------
+
+%%%-----------------------------------------------------------------
+%%%
+print(Config) ->
+ TcLogFile = proplists:get_value(tc_logfile, Config),
+ Pid = self(),
+ String = atom_to_list(?MODULE),
+
+ %% START mark
+ io:format("LOGGING START~n"),
+
+ %% io:format
+ io:format("1. Printing nothing~n", []),
+ io:format("2. Printing a string: ~s~n", [String]),
+ io:format("3. Printing a string: ~p~n", [String]),
+ io:format("4. Printing a tuple: ~w~n", [{module,?MODULE}]),
+ io:format("5. Printing a pid: ~w~n", [Pid]),
+ io:format("6. Printing HTML: <pre>~s</pre>~n", [String]),
+
+ %% --- API ---
+ %% pal(Format) ->
+ %% = ct:pal(default, 50, Format, []).
+ %% pal(X1, X2) -> ok
+ %% X1 = Category | Importance | Format
+ %% X2 = Format | FormatArgs
+ %% pal(X1, X2, X3) -> ok
+ %% X1 = Category | Importance
+ %% X2 = Importance | Format
+ %% X3 = Format | FormatArgs
+ %% pal(Category, Importance, Format, FormatArgs) -> ok
+ %% ------
+ ct:pal("1. Printing nothing"),
+ ct:pal("2. Printing nothing", []),
+ ct:pal("3. Printing a string: ~s", [String]),
+ ct:pal("4. Printing a string: ~p", [String]),
+ ct:pal("5. Printing a tuple: ~w", [{module,?MODULE}]),
+ ct:pal("6. Printing a pid: ~w", [Pid]),
+ ct:pal("7. Printing HTML: <pre>~s</pre>", [String]),
+ ct:pal(ct_internal, "8. Printing with category"),
+ ct:pal(ct_internal, "9. Printing with ~s", ["category"]),
+ ct:pal(50, "10. Printing with importance"),
+ ct:pal(50, "11. Printing with ~s", ["importance"]),
+ ct:pal(ct_internal, 50, "12. Printing with ~s", ["category and importance"]),
+
+ %% --- API ---
+ %% log(Format) -> ok
+ %% = ct:log(default, 50, Format, [], []).
+ %% log(X1, X2) -> ok
+ %% X1 = Category | Importance | Format
+ %% X2 = Format | FormatArgs
+ %% log(X1, X2, X3) -> ok
+ %% X1 = Category | Importance
+ %% X2 = Importance | Format
+ %% X3 = Format | FormatArgs | Opts
+ %% log(X1, X2, X3, X4) -> ok
+ %% X1 = Category | Importance
+ %% X2 = Importance | Format
+ %% X3 = Format | FormatArgs
+ %% X4 = FormatArgs | Opts
+ %% log(Category, Importance, Format, FormatArgs, Opts) -> ok
+ %% ------
+ ct:log("1. Printing nothing"),
+ ct:log("2. Printing nothing", []),
+ ct:log("3. Printing a string: ~s", [String]),
+ ct:log("4. Printing a string: ~p", [String]),
+ ct:log("5. Printing a tuple: ~w", [{module,?MODULE}]),
+ ct:log("6. Printing a pid: ~w", [Pid]),
+ ct:log("7. Printing HTML: <pre>~s</pre>", [String]),
+ ct:log("8. Printing a pid escaped: ~w", [Pid], [esc_chars]),
+ ct:log("9. Printing a string escaped: ~p", [String], [esc_chars]),
+ ct:log("10. Printing HTML escaped: <pre>~s</pre>", [String], [esc_chars]),
+ ct:log("11. Printing a string, no css: ~s", [String], [no_css]),
+ ct:log("12. Printing a pid escaped, no css: ~w", [Pid],
+ [esc_chars, no_css]),
+ ct:log(ct_internal, "13. Printing with category"),
+ ct:log(ct_internal, "14. Printing with ~s", ["category"]),
+ ct:log(ct_internal, "15. Printing with ~s, no_css", ["category"],
+ [no_css]),
+ ct:log(50, "16. Printing with importance"),
+ ct:log(50, "17. Printing with ~s", ["importance"]),
+ ct:log(50, "18. Printing with ~s, no_css", ["importance"], [no_css]),
+ ct:log(ct_internal, 50, "19. Printing with category and importance"),
+ ct:log(ct_internal, 50, "20. Printing with ~s", ["category and importance"]),
+ ct:log(ct_internal, 50, "21. Printing a pid escaped with ~s, no_css: ~w",
+ ["category and importance",Pid], [esc_chars,no_css]),
+
+ %% END mark
+ ct:log("LOGGING END", [], [no_css]),
+ {save_config,[{the_logfile,TcLogFile},{the_pid,Pid},{the_string,String}]}.
+
+
+verify(Config) ->
+ {print,SavedCfg} = proplists:get_value(saved_config, Config),
+ TcLogFile = proplists:get_value(the_logfile, SavedCfg),
+ Pid = proplists:get_value(the_pid, SavedCfg),
+ StrPid = lists:flatten(io_lib:format("~p",[Pid])),
+ EscPid = "&lt;" ++ string:substr(StrPid, 2, length(StrPid)-2) ++ "&gt;",
+ String = proplists:get_value(the_string, SavedCfg),
+ ct:log("Read from prev testcase: ~p & ~p", [TcLogFile,Pid]),
+ {ok,Dev} = file:open(TcLogFile, [read]),
+ ok = read_until(Dev, "LOGGING START\n"),
+
+ %% io:format
+ match_line(Dev, "1. Printing nothing", []),
+ read_nl(Dev),
+ match_line(Dev, "2. Printing a string: ~s", [String]),
+ read_nl(Dev),
+ match_line(Dev, "3. Printing a string: ~p", [String]),
+ read_nl(Dev),
+ match_line(Dev, "4. Printing a tuple: ~w", [{module,?MODULE}]),
+ read_nl(Dev),
+ match_line(Dev, "5. Printing a pid: ~s", [EscPid]),
+ read_nl(Dev),
+ match_line(Dev, "6. Printing HTML: &lt;pre&gt;~s&lt;/pre&gt;", [String]),
+ read_nl(Dev),
+ %% ct:pal
+ read_header(Dev),
+ match_line(Dev, "1. Printing nothing", []),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "2. Printing nothing", []),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "3. Printing a string: ~s", [String]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "4. Printing a string: ~p", [String]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "5. Printing a tuple: ~w", [{module,?MODULE}]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "6. Printing a pid: ~s", [EscPid]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "7. Printing HTML: &lt;pre&gt;~s&lt;/pre&gt;", [String]),
+ read_footer(Dev),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "8. Printing with category", []),
+ read_footer(Dev),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "9. Printing with ~s", ["category"]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "10. Printing with importance", []),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "11. Printing with ~s", ["importance"]),
+ read_footer(Dev),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "12. Printing with ~s", ["category and importance"]),
+ read_footer(Dev),
+ %% ct:log
+ read_header(Dev),
+ match_line(Dev, "1. Printing nothing", []),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "2. Printing nothing", []),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "3. Printing a string: ~s", [String]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "4. Printing a string: ~p", [String]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "5. Printing a tuple: ~w", [{module,?MODULE}]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "6. Printing a pid: ~w", [Pid]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "7. Printing HTML: <pre>~s</pre>", [String]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "8. Printing a pid escaped: ~s", [EscPid]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "9. Printing a string escaped: ~p", [String]),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "10. Printing HTML escaped: &lt;pre&gt;~s&lt;/pre&gt;",
+ [String]),
+ read_footer(Dev),
+ match_line(Dev, "11. Printing a string, no css: ~s", [String]),
+ match_line(Dev, "12. Printing a pid escaped, no css: ~s", [EscPid]),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "13. Printing with category", []),
+ read_footer(Dev),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "14. Printing with ~s", ["category"]),
+ read_footer(Dev),
+ match_line(Dev, "15. Printing with ~s, no_css", ["category"]),
+ read_header(Dev),
+ match_line(Dev, "16. Printing with importance", []),
+ read_footer(Dev),
+ read_header(Dev),
+ match_line(Dev, "17. Printing with ~s", ["importance"]),
+ read_footer(Dev),
+ match_line(Dev, "18. Printing with ~s, no_css", ["importance"]),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "19. Printing with category and importance", []),
+ read_footer(Dev),
+ read_header(Dev, "\"ct_internal\""),
+ match_line(Dev, "20. Printing with ~s", ["category and importance"]),
+ read_footer(Dev),
+ match_line(Dev, "21. Printing a pid escaped with ~s, no_css: ~s",
+ ["category and importance",EscPid]),
+
+ file:close(Dev),
+ ok.
+
+%%%-----------------------------------------------------------------
+%%% HELP FUNCTIONS
+%%%-----------------------------------------------------------------
+
+read_until(Dev, Pat) ->
+ case file:read_line(Dev) of
+ {ok,Pat} ->
+ file:read_line(Dev), % \n
+ ok;
+ eof ->
+ file:close(Dev),
+ {error,{not_found,Pat}};
+ _ ->
+ read_until(Dev, Pat)
+ end.
+
+match_line(Dev, Format, Args) ->
+ Pat = lists:flatten(io_lib:format(Format, Args)),
+ Line = element(2, file:read_line(Dev)),
+ case re:run(Line, Pat) of
+ {match,_} ->
+ ok;
+ nomatch ->
+ ct:pal("ERROR! No match for ~p.\nLine = ~p", [Pat,Line]),
+ file:close(Dev),
+ ct:fail({mismatch,Pat,Line})
+ end.
+
+read_header(Dev) ->
+ read_header(Dev, "\"default\"").
+
+read_header(Dev, Cat) ->
+ file:read_line(Dev), % \n
+ "</pre>\n" = element(2, file:read_line(Dev)),
+ {match,_} =
+ re:run(element(2, file:read_line(Dev)), "<div class="++Cat++"><pre><b>"
+ "\\*\\*\\* User \\d{4}-\\d{2}-\\d{2} "
+ "\\d{2}:\\d{2}:\\d{2}.\\d{1,} \\*\\*\\*</b>").
+
+read_footer(Dev) ->
+ "</pre></div>\n" = element(2, file:read_line(Dev)),
+ "<pre>\n" = element(2, file:read_line(Dev)).
+
+read_nl(Dev) ->
+ file:read_line(Dev).
+
+
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl
index 065639dd36..f34969683c 100644
--- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl
@@ -123,41 +123,37 @@ init_per_testcase(_Case, Config) ->
end_per_testcase(_Case, _Config) ->
ok.
-init_per_suite() ->
- [{timetrap,2*?default_timeout}]. % making dsa files can be slow
init_per_suite(Config) ->
case catch ssh:start() of
Ok when Ok==ok; Ok=={error,{already_started,ssh}} ->
ct:log("ssh started",[]),
- {ok, _} = netconfc_test_lib:get_id_keys(Config),
- netconfc_test_lib:make_dsa_files(Config),
- ct:log("dsa files created",[]),
- Server = ?NS:start(?config(data_dir,Config)),
+ SshDir = filename:join(filename:dirname(code:which(?MODULE)),
+ "ssh_dir"),
+ Server = ?NS:start(SshDir),
ct:log("netconf server started",[]),
- [{server,Server}|Config];
+ [{netconf_server,Server},{ssh_dir,SshDir}|Config];
Other ->
ct:log("could not start ssh: ~p",[Other]),
{skip, "SSH could not be started!"}
end.
end_per_suite(Config) ->
- ?NS:stop(?config(server,Config)),
+ ?NS:stop(?config(netconf_server,Config)),
ssh:stop(),
crypto:stop(),
- netconfc_test_lib:remove_id_keys(Config),
Config.
hello(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
ok.
hello_from_server_first(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:hello(1),
- {ok,Client} = ct_netconfc:only_open(?DEFAULT_SSH_OPTS(DataDir)),
+ {ok,Client} = ct_netconfc:only_open(?DEFAULT_SSH_OPTS(SshDir)),
ct:sleep(500),
?NS:expect(hello),
?ok = ct_netconfc:hello(Client, [{capability, ["urn:com:ericsson:ebase:1.1.0"]}], infinity),
@@ -166,8 +162,8 @@ hello_from_server_first(Config) ->
ok.
hello_named(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(any_name,DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(any_name,SshDir),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
ok.
@@ -175,8 +171,8 @@ hello_named(Config) ->
hello_configured() ->
[{require, netconf1}].
hello_configured(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_configured_success(netconf1,DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_configured_success(netconf1,SshDir),
?NS:expect_do_reply('close-session',close,ok),
{error, {no_such_name,netconf1}} = ct_netconfc:close_session(netconf1),
?ok = ct_netconfc:close_session(Client),
@@ -185,10 +181,10 @@ hello_configured(Config) ->
hello_configured_extraopts() ->
[{require, netconf1}].
hello_configured_extraopts(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
%% Test that the cofiguration overwrites the ExtraOpts parameter
%% to ct_netconfc:open/2.
- {ok,Client} = open_configured_success(netconf1,DataDir,[{password,"faulty"}]),
+ {ok,Client} = open_configured_success(netconf1,SshDir,[{password,"faulty"}]),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
ok.
@@ -196,8 +192,8 @@ hello_configured_extraopts(Config) ->
hello_required() ->
[{require, my_named_connection, netconf1}].
hello_required(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,_Client} = open_configured_success(my_named_connection,DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,_Client} = open_configured_success(my_named_connection,SshDir),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(my_named_connection),
ok.
@@ -205,69 +201,69 @@ hello_required(Config) ->
hello_required_exists() ->
[{require, my_named_connection, netconf1}].
hello_required_exists(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,_Client1} = open_configured_success(my_named_connection,DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,_Client1} = open_configured_success(my_named_connection,SshDir),
%% Check that same name can not be used twice
{error,{connection_exists,_Client1}} =
- ct_netconfc:open(my_named_connection,[{user_dir,DataDir}]),
+ ct_netconfc:open(my_named_connection,[{user_dir,SshDir}]),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(my_named_connection),
ct:sleep(500),
%% Then check that it can be used again after the first is closed
- {ok,_Client2} = open_configured_success(my_named_connection,DataDir),
+ {ok,_Client2} = open_configured_success(my_named_connection,SshDir),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(my_named_connection),
ok.
hello_global_pwd(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir,[{user,"any-user"},
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir,[{user,"any-user"},
{password,"global-xxx"}]),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
ok.
hello_no_session_id(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:hello(no_session_id),
?NS:expect(no_session_id,hello),
- {error,{incorrect_hello,no_session_id_found}} = open(DataDir),
+ {error,{incorrect_hello,no_session_id_found}} = open(SshDir),
ok.
hello_incomp_base_vsn(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:hello(1,{base,"1.1"}),
?NS:expect(hello),
- {error,{incompatible_base_capability_vsn,"1.1"}} = open(DataDir),
+ {error,{incompatible_base_capability_vsn,"1.1"}} = open(SshDir),
ok.
hello_no_base_cap(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:hello(1,no_base),
?NS:expect(hello),
- {error,{incorrect_hello,no_base_capability_found}} = open(DataDir),
+ {error,{incorrect_hello,no_base_capability_found}} = open(SshDir),
ok.
hello_no_caps(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:hello(1,no_caps),
?NS:expect(hello),
- {error,{incorrect_hello,capabilities_not_found}} = open(DataDir),
+ {error,{incorrect_hello,capabilities_not_found}} = open(SshDir),
ok.
no_server_hello(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:expect(undefined,hello),
- {error,{hello_session_failed,timeout}} = open(DataDir,[{timeout,2000}]),
+ {error,{hello_session_failed,timeout}} = open(SshDir,[{timeout,2000}]),
ok.
no_client_hello(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
?NS:hello(1),
- {ok,Client} = ct_netconfc:only_open(?DEFAULT_SSH_OPTS(DataDir)),
+ {ok,Client} = ct_netconfc:only_open(?DEFAULT_SSH_OPTS(SshDir)),
%% Allow server hello to arrive
ct:sleep(500),
@@ -280,8 +276,8 @@ no_client_hello(Config) ->
ok.
get_session_id(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
1 = ct_netconfc:get_session_id(Client),
@@ -290,8 +286,8 @@ get_session_id(Config) ->
ok.
get_capabilities(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Caps = ct_netconfc:get_capabilities(Client),
BaseCap = ?NETCONF_BASE_CAP ++ ?NETCONF_BASE_CAP_VSN,
@@ -302,49 +298,49 @@ get_capabilities(Config) ->
ok.
faulty_user(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
{error,{ssh,could_not_connect_to_server,
"Unable to connect using the available authentication methods"}} =
- open(DataDir,[{user,"yyy"}]),
+ open(SshDir,[{user,"yyy"}]),
ok.
faulty_passwd(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
{error,{ssh,could_not_connect_to_server,
"Unable to connect using the available authentication methods"}} =
- open(DataDir,[{password,"yyy"}]),
+ open(SshDir,[{password,"yyy"}]),
ok.
faulty_port(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
{error,{ssh,could_not_connect_to_server,econnrefused}} =
- open(DataDir,[{port,2062}]),
+ open(SshDir,[{port,2062}]),
ok.
no_host(Config) ->
- DataDir = ?config(data_dir,Config),
- Opts = lists:keydelete(ssh,1,?DEFAULT_SSH_OPTS(DataDir)),
+ SshDir = ?config(ssh_dir,Config),
+ Opts = lists:keydelete(ssh,1,?DEFAULT_SSH_OPTS(SshDir)),
{error,no_host_address} = ct_netconfc:open(Opts),
ok.
no_port(Config) ->
- DataDir = ?config(data_dir,Config),
- Opts = lists:keydelete(port,1,?DEFAULT_SSH_OPTS(DataDir)),
+ SshDir = ?config(ssh_dir,Config),
+ Opts = lists:keydelete(port,1,?DEFAULT_SSH_OPTS(SshDir)),
{error,no_port} = ct_netconfc:open(Opts),
ok.
invalid_opt(Config) ->
- DataDir = ?config(data_dir,Config),
- Opts1 = ?DEFAULT_SSH_OPTS(DataDir) ++ [{timeout,invalidvalue}],
+ SshDir = ?config(ssh_dir,Config),
+ Opts1 = ?DEFAULT_SSH_OPTS(SshDir) ++ [{timeout,invalidvalue}],
{error,{invalid_option,{timeout,invalidvalue}}} = ct_netconfc:open(Opts1),
- Opts2 = ?DEFAULT_SSH_OPTS(DataDir) ++ [{some_other_opt,true}],
+ Opts2 = ?DEFAULT_SSH_OPTS(SshDir) ++ [{some_other_opt,true}],
{error,{ssh,could_not_connect_to_server,{options,_}}} =
ct_netconfc:open(Opts2),
ok.
timeout_close_session(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect('close-session'),
true = erlang:is_process_alive(Client),
{error,timeout} = ct_netconfc:close_session(Client,1000),
@@ -352,8 +348,8 @@ timeout_close_session(Config) ->
ok.
get(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
?NS:expect_reply('get',{data,Data}),
{ok,Data} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]}),
@@ -362,8 +358,8 @@ get(Config) ->
ok.
get_a_lot(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Descr = lists:append(lists:duplicate(1000,"Description of myserver! ")),
Server = {server,[{xmlns,"myns"}],[{name,[],["myserver"]},
{description,[],[Descr]}]},
@@ -375,8 +371,8 @@ get_a_lot(Config) ->
ok.
timeout_get(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect('get'),
{error,timeout} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]},1000),
?NS:expect_do_reply('close-session',close,ok),
@@ -392,8 +388,8 @@ timeout_get(Config) ->
%% Note that we can only hope that the test case triggers the problem
%% every now and then, as it is very timing dependent...
flush_timeout_get(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
?NS:expect_reply('get',{data,Data}),
timer:sleep(1000),
@@ -406,8 +402,8 @@ flush_timeout_get(Config) ->
ok.
get_xpath(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
?NS:expect_reply({'get',xpath},{data,Data}),
{ok,Data} = ct_netconfc:get(Client,{xpath,"/server"}),
@@ -416,8 +412,8 @@ get_xpath(Config) ->
ok.
get_config(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
?NS:expect_reply('get-config',{data,Data}),
{ok,Data} = ct_netconfc:get_config(Client,running,
@@ -427,8 +423,8 @@ get_config(Config) ->
ok.
get_config_xpath(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
?NS:expect_reply({'get-config',xpath},{data,Data}),
{ok,Data} = ct_netconfc:get_config(Client,running,{xpath,"/server"}),
@@ -437,8 +433,8 @@ get_config_xpath(Config) ->
ok.
edit_config(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply('edit-config',ok),
?ok = ct_netconfc:edit_config(Client,running,
{server,[{xmlns,"myns"}],
@@ -448,8 +444,8 @@ edit_config(Config) ->
ok.
edit_config_opt_params(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply({'edit-config',{'default-operation',"none"}},ok),
?ok = ct_netconfc:edit_config(Client,running,
{server,[{xmlns,"myns"}],
@@ -460,8 +456,8 @@ edit_config_opt_params(Config) ->
ok.
copy_config(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply('copy-config',ok),
?ok = ct_netconfc:copy_config(Client,startup,running),
?NS:expect_do_reply('close-session',close,ok),
@@ -469,8 +465,8 @@ copy_config(Config) ->
ok.
delete_config(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply('delete-config',ok),
?ok = ct_netconfc:delete_config(Client,startup),
?NS:expect_do_reply('close-session',close,ok),
@@ -478,8 +474,8 @@ delete_config(Config) ->
ok.
lock(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply('lock',ok),
?ok = ct_netconfc:lock(Client,running),
?NS:expect_do_reply('close-session',close,ok),
@@ -487,8 +483,8 @@ lock(Config) ->
ok.
unlock(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply('unlock',ok),
?ok = ct_netconfc:unlock(Client,running),
?NS:expect_do_reply('close-session',close,ok),
@@ -496,12 +492,12 @@ unlock(Config) ->
ok.
kill_session(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:hello(2),
?NS:expect(2,hello),
- {ok,_OtherClient} = open(DataDir),
+ {ok,_OtherClient} = open(SshDir),
?NS:expect_do_reply('kill-session',{kill,2},ok),
?ok = ct_netconfc:kill_session(Client,2),
@@ -512,8 +508,8 @@ kill_session(Config) ->
ok.
get_no_such_client(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client),
@@ -529,8 +525,8 @@ get_no_such_client(Config) ->
ok.
action(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{myactionreturn,[{xmlns,"myns"}],["value"]}],
%% test either to receive {data,Data} or {ok,Data},
%% both need to be handled
@@ -549,8 +545,8 @@ action(Config) ->
ok.
send_any_rpc(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
GetConf = {'get-config',
[{source,["running"]},
@@ -571,8 +567,8 @@ send_any_rpc(Config) ->
ok.
send_any(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
%% Correct get-config rpc
Data = [{server,[{xmlns,"myns"}],[{name,[],["myserver"]}]}],
@@ -604,8 +600,8 @@ send_any(Config) ->
ok.
hide_password(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
Password = "my_very_secret_password",
Data = [{passwords,[{xmlns,"myns"}],
[{password,[{xmlns,"pwdns"}],[Password]},
@@ -633,8 +629,8 @@ hide_password(Config) ->
ok.
not_proper_xml(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
NS = list_to_binary(?NETCONF_NAMESPACE),
NotProper = <<"<rpc-reply message-id=\"1\" xmlns=\"",
NS/binary,"\"><data></rpc-reply>">>,
@@ -646,8 +642,8 @@ not_proper_xml(Config) ->
ok.
prefixed_namespace(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
NS = list_to_binary(?NETCONF_NAMESPACE),
%% Test that data element can be properly decoded and that
@@ -679,8 +675,8 @@ prefixed_namespace(Config) ->
%% i.e. when the complete rpc-reply is not contained in one single ssh
%% data message.
receive_chunked_data(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
%% Construct the data to return from netconf server
Data = [{servers,[{xmlns,"myns"}],
@@ -727,8 +723,8 @@ receive_chunked_data(Config) ->
%% Same as receive_chunked_data, but timeout waiting for last part.
timeout_receive_chunked_data(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
%% Construct the data to return from netconf server
Data = [{servers,[{xmlns,"myns"}],
@@ -773,8 +769,8 @@ timeout_receive_chunked_data(Config) ->
%% Same as receive_chunked_data, but close while waiting for last part.
close_while_waiting_for_chunked_data(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
%% Construct the data to return from netconf server
Data = [{servers,[{xmlns,"myns"}],
@@ -816,8 +812,8 @@ close_while_waiting_for_chunked_data(Config) ->
ok.
connection_crash(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
%% Test that if the test survives killing the connection
%% process. Earlier this caused ct_util_server to terminate, and
@@ -828,8 +824,8 @@ connection_crash(Config) ->
ok.
get_event_streams(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
StreamNames = ["NETCONF","stream1","stream2"],
Streams = [{N,[{description,"descr of " ++ N}]} || N <- StreamNames],
StreamsXml = [{stream,[{name,[N]}|[{Tag,[Value]} || {Tag,Value} <- Data]]}
@@ -849,31 +845,31 @@ get_event_streams(Config) ->
ok.
create_subscription(Config) ->
- DataDir = ?config(data_dir,Config),
+ SshDir = ?config(ssh_dir,Config),
%% All defaults
- {ok,Client1} = open_success(DataDir),
+ {ok,Client1} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
?ok = ct_netconfc:create_subscription(Client1),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client1),
%% All defaults with timeout
- {ok,Client1a} = open_success(DataDir),
+ {ok,Client1a} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
?ok = ct_netconfc:create_subscription(Client1a,5000),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client1a),
%% All defaults timing out
- {ok,Client1b} = open_success(DataDir),
+ {ok,Client1b} = open_success(SshDir),
?NS:expect({'create-subscription',[stream]}),
{error,timeout} = ct_netconfc:create_subscription(Client1b,100),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client1b),
%% Stream
- {ok,Client2} = open_success(DataDir),
+ {ok,Client2} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
Stream = "some_stream",
?ok = ct_netconfc:create_subscription(Client2,Stream),
@@ -881,7 +877,7 @@ create_subscription(Config) ->
?ok = ct_netconfc:close_session(Client2),
%% Filter
- {ok,Client3} = open_success(DataDir),
+ {ok,Client3} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,filter]},ok),
Filter = {notification,?NETMOD_NOTIF_NAMESPACE_ATTR,
[eventTime]},
@@ -890,28 +886,28 @@ create_subscription(Config) ->
?ok = ct_netconfc:close_session(Client3),
%% Filter with timeout
- {ok,Client3a} = open_success(DataDir),
+ {ok,Client3a} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,filter]},ok),
?ok = ct_netconfc:create_subscription(Client3a,Filter,5000),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client3a),
%% Filter timing out
- {ok,Client3b} = open_success(DataDir),
+ {ok,Client3b} = open_success(SshDir),
?NS:expect({'create-subscription',[stream,filter]}),
{error,timeout}=ct_netconfc:create_subscription(Client3b,Filter,100),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client3b),
%% Stream and filter
- {ok,Client4} = open_success(DataDir),
+ {ok,Client4} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,filter]},ok),
?ok = ct_netconfc:create_subscription(Client4,Stream,Filter),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client4),
%% Start/stop time
- {ok,Client5} = open_success(DataDir),
+ {ok,Client5} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,startTime,stopTime]},ok),
StartTime = xs_datetime({D,{H,M,S}}= calendar:local_time()),
StopTime = xs_datetime({D,{H+2,M,S}}),
@@ -920,14 +916,14 @@ create_subscription(Config) ->
?ok = ct_netconfc:close_session(Client5),
%% Start/stop time with timeout
- {ok,Client5a} = open_success(DataDir),
+ {ok,Client5a} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,startTime,stopTime]},ok),
?ok = ct_netconfc:create_subscription(Client5a,StartTime,StopTime,5000),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client5a),
%% Start/stop time timing out
- {ok,Client5b} = open_success(DataDir),
+ {ok,Client5b} = open_success(SshDir),
?NS:expect({'create-subscription',[stream,startTime,stopTime]}),
{error,timeout} =
ct_netconfc:create_subscription(Client5b,StartTime,StopTime,100),
@@ -935,14 +931,14 @@ create_subscription(Config) ->
?ok = ct_netconfc:close_session(Client5b),
%% Stream and start/stop time
- {ok,Client6} = open_success(DataDir),
+ {ok,Client6} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,startTime,stopTime]},ok),
?ok = ct_netconfc:create_subscription(Client6,Stream,StartTime,StopTime),
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(Client6),
%% Filter and start/stop time
- {ok,Client7} = open_success(DataDir),
+ {ok,Client7} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,filter,startTime,stopTime]},
ok),
?ok = ct_netconfc:create_subscription(Client7,Filter,
@@ -951,7 +947,7 @@ create_subscription(Config) ->
?ok = ct_netconfc:close_session(Client7),
%% Stream, filter and start/stop time
- {ok,Client8} = open_success(DataDir),
+ {ok,Client8} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,filter,startTime,stopTime]},
ok),
?ok = ct_netconfc:create_subscription(Client8,Stream,Filter,
@@ -960,7 +956,7 @@ create_subscription(Config) ->
?ok = ct_netconfc:close_session(Client8),
%% Multiple filters
- {ok,Client9} = open_success(DataDir),
+ {ok,Client9} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream,filter]},ok),
MultiFilters = [{event,[{xmlns,"http://my.namespaces.com/event"}],
[{eventClass,["fault"]},
@@ -975,8 +971,8 @@ create_subscription(Config) ->
ok.
receive_one_event(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
?ok = ct_netconfc:create_subscription(Client),
@@ -1002,8 +998,8 @@ receive_one_event(Config) ->
ok.
receive_multiple_events(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
?ok = ct_netconfc:create_subscription(Client),
@@ -1043,8 +1039,8 @@ receive_multiple_events(Config) ->
ok.
receive_event_and_rpc(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
?ok = ct_netconfc:create_subscription(Client),
@@ -1103,8 +1099,8 @@ receive_event_and_rpc(Config) ->
receive_event_and_rpc_in_chunks(Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(DataDir),
+ SshDir = ?config(ssh_dir,Config),
+ {ok,Client} = open_success(SshDir),
?NS:expect_reply({'create-subscription',[stream]},ok),
?ok = ct_netconfc:create_subscription(Client),
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl
index 04bfe75187..0a49cdabbb 100644
--- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl
@@ -51,7 +51,7 @@ init_per_testcase(Case, Config) ->
stop_node(Case),
Config.
-end_per_testcase(Case, Config) ->
+end_per_testcase(Case, _Config) ->
stop_node(Case),
ok.
@@ -61,16 +61,13 @@ stop_node(Case) ->
rpc:call(Node,erlang,halt,[]).
-init_per_suite() ->
- [{timetrap,2*?default_timeout}]. % making dsa files can be slow
init_per_suite(Config) ->
case ssh:start() of
Ok when Ok==ok; Ok=={error,{already_started,ssh}} ->
ct:log("SSH started locally",[]),
- {ok, _} = netconfc_test_lib:get_id_keys(Config),
- netconfc_test_lib:make_dsa_files(Config),
- ct:log("dsa files created",[]),
- Config;
+ SshDir = filename:join(filename:dirname(code:which(?MODULE)),
+ "ssh_dir"),
+ [{ssh_dir,SshDir}|Config];
Other ->
ct:log("could not start ssh locally: ~p",[Other]),
{skip, "SSH could not be started locally!"}
@@ -79,7 +76,6 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
ssh:stop(),
crypto:stop(),
- netconfc_test_lib:remove_id_keys(Config),
Config.
%% This test case is related to seq12645
@@ -93,7 +89,7 @@ remote_crash(Config) ->
case rpc:call(Node,ssh,start,[]) of
Ok when Ok==ok; Ok=={error,{already_started,ssh}} ->
ct:log("SSH started remote",[]),
- Server = rpc:call(Node,?NS,start,[?config(data_dir,Config)]),
+ ns(Node,start,[?config(ssh_dir,Config)]),
ct:log("netconf server started remote",[]),
remote_crash(Node,Config);
Other ->
@@ -102,8 +98,7 @@ remote_crash(Config) ->
end.
remote_crash(Node,Config) ->
- DataDir = ?config(data_dir,Config),
- {ok,Client} = open_success(Node,DataDir),
+ {ok,Client} = open_success(Node,?config(ssh_dir,Config)),
ns(Node,expect_reply,[{'create-subscription',[stream]},ok]),
?ok = ct_netconfc:create_subscription(Client),
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_test_lib.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_test_lib.erl
deleted file mode 100644
index e058bc7600..0000000000
--- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_test_lib.erl
+++ /dev/null
@@ -1,166 +0,0 @@
--module(netconfc_test_lib).
-
--export([get_id_keys/1, remove_id_keys/1, make_dsa_files/1]).
--include_lib("common_test/include/ct.hrl").
--include_lib("public_key/include/public_key.hrl").
-
-%%%-----------------------------------------------------------------
-%%% BEGIN SSH key management
-%% copy private keys to given dir from ~/.ssh
-get_id_keys(Config) ->
- DstDir = ?config(priv_dir, Config),
- SrcDir = filename:join(os:getenv("HOME"), ".ssh"),
- RsaOk = copyfile(SrcDir, DstDir, "id_rsa"),
- DsaOk = copyfile(SrcDir, DstDir, "id_dsa"),
- case {RsaOk, DsaOk} of
- {{ok, _}, {ok, _}} -> {ok, both};
- {{ok, _}, _} -> {ok, rsa};
- {_, {ok, _}} -> {ok, dsa};
- {Error, _} -> Error
- end.
-
-%% Remove later on. Use make_dsa_files instead.
-remove_id_keys(Config) ->
- Dir = ?config(priv_dir, Config),
- file:delete(filename:join(Dir, "id_rsa")),
- file:delete(filename:join(Dir, "id_dsa")).
-
-
-make_dsa_files(Config) ->
- make_dsa_files(Config, rfc4716_public_key).
-make_dsa_files(Config, Type) ->
- {DSA, EncodedKey} = gen_dsa(128, 20),
- PKey = DSA#'DSAPrivateKey'.y,
- P = DSA#'DSAPrivateKey'.p,
- Q = DSA#'DSAPrivateKey'.q,
- G = DSA#'DSAPrivateKey'.g,
- Dss = #'Dss-Parms'{p=P, q=Q, g=G},
- {ok, Hostname} = inet:gethostname(),
- {ok, {A, B, C, D}} = inet:getaddr(Hostname, inet),
- IP = lists:concat([A, ".", B, ".", C, ".", D]),
- Attributes = [], % Could be [{comment,"user@" ++ Hostname}],
- HostNames = [{hostnames,[IP, IP]}],
- PublicKey = [{{PKey, Dss}, Attributes}],
- KnownHosts = [{{PKey, Dss}, HostNames}],
-
- KnownHostsEnc = public_key:ssh_encode(KnownHosts, known_hosts),
- KnownHosts = public_key:ssh_decode(KnownHostsEnc, known_hosts),
-
- PublicKeyEnc = public_key:ssh_encode(PublicKey, Type),
-
- SystemTmpDir = ?config(data_dir, Config),
- filelib:ensure_dir(SystemTmpDir),
- file:make_dir(SystemTmpDir),
-
- DSAFile = filename:join(SystemTmpDir, "ssh_host_dsa_key.pub"),
- file:delete(DSAFile),
-
- DSAPrivateFile = filename:join(SystemTmpDir, "ssh_host_dsa_key"),
- file:delete(DSAPrivateFile),
-
- KHFile = filename:join(SystemTmpDir, "known_hosts"),
- file:delete(KHFile),
-
- PemBin = public_key:pem_encode([EncodedKey]),
-
- file:write_file(DSAFile, PublicKeyEnc),
- file:write_file(KHFile, KnownHostsEnc),
- file:write_file(DSAPrivateFile, PemBin),
- ok.
-
-
-%%--------------------------------------------------------------------
-%% @doc Creates a dsa key (OBS: for testing only)
-%% the sizes are in bytes
-%% @spec (::integer()) -> {::atom(), ::binary(), ::opaque()}
-%% @end
-%%--------------------------------------------------------------------
-gen_dsa(LSize,NSize) when is_integer(LSize), is_integer(NSize) ->
- Key = gen_dsa2(LSize, NSize),
- {Key, encode_key(Key)}.
-
-encode_key(Key = #'DSAPrivateKey'{}) ->
- Der = public_key:der_encode('DSAPrivateKey', Key),
- {'DSAPrivateKey', Der, not_encrypted}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% DSA key generation (OBS: for testing only)
-%% See http://en.wikipedia.org/wiki/Digital_Signature_Algorithm
-%% and the fips_186-3.pdf
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-gen_dsa2(LSize, NSize) ->
- Q = prime(NSize), %% Choose N-bit prime Q
- X0 = prime(LSize),
- P0 = prime((LSize div 2) +1),
-
- %% Choose L-bit prime modulus P such that p-1 is a multiple of q.
- case dsa_search(X0 div (2*Q*P0), P0, Q, 1000) of
- error ->
- gen_dsa2(LSize, NSize);
- P ->
- G = crypto:mod_pow(2, (P-1) div Q, P), % Choose G a number whose multiplicative order modulo p is q.
- %% such that This may be done by setting g = h^(p-1)/q mod p, commonly h=2 is used.
-
- X = prime(20), %% Choose x by some random method, where 0 < x < q.
- Y = crypto:mod_pow(G, X, P), %% Calculate y = g^x mod p.
-
- #'DSAPrivateKey'{version=0, p = P, q = Q,
- g = crypto:bytes_to_integer(G), y = crypto:bytes_to_integer(Y), x = X}
- end.
-
-%% See fips_186-3.pdf
-dsa_search(T, P0, Q, Iter) when Iter > 0 ->
- P = 2*T*Q*P0 + 1,
- case is_prime(P, 50) of
- true -> P;
- false -> dsa_search(T+1, P0, Q, Iter-1)
- end;
-dsa_search(_,_,_,_) ->
- error.
-
-
-%%%%%%% Crypto Math %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-prime(ByteSize) ->
- Rand = odd_rand(ByteSize),
- prime_odd(Rand, 0).
-
-prime_odd(Rand, N) ->
- case is_prime(Rand, 50) of
- true ->
- Rand;
- false ->
- prime_odd(Rand+2, N+1)
- end.
-
-%% see http://en.wikipedia.org/wiki/Fermat_primality_test
-is_prime(_, 0) -> true;
-is_prime(Candidate, Test) ->
- CoPrime = odd_rand(10000, Candidate),
- Result = crypto:mod_pow(CoPrime, Candidate, Candidate) ,
- is_prime(CoPrime, crypto:bytes_to_integer(Result), Candidate, Test).
-
-is_prime(CoPrime, CoPrime, Candidate, Test) ->
- is_prime(Candidate, Test-1);
-is_prime(_,_,_,_) ->
- false.
-
-odd_rand(Size) ->
- Min = 1 bsl (Size*8-1),
- Max = (1 bsl (Size*8))-1,
- odd_rand(Min, Max).
-
-odd_rand(Min,Max) ->
- Rand = crypto:rand_uniform(Min,Max),
- case Rand rem 2 of
- 0 ->
- Rand + 1;
- _ ->
- Rand
- end.
-
-copyfile(SrcDir, DstDir, Fn) ->
- file:copy(filename:join(SrcDir, Fn),
- filename:join(DstDir, Fn)).
-
-%%% END SSH key management
-%%%-----------------------------------------------------------------
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key b/lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key
new file mode 100644
index 0000000000..4ee0b8657e
--- /dev/null
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key
@@ -0,0 +1,13 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvQIBAAKBgQDuGhXsDoUC/x98Q1KEgdf+pQjzBXFu0gMf6C2P47FILALVjvzt
+HvpXarT8Y0XZb4/i5XndcKazmRArEVmPzRT0Pp7gSJpOclY/f1YrplvtMjeQaZ/Y
+eD5JoQFpgIUduiifdRRt0r5gXYejCfACa+ZSFiXTvI+ZXpHC7rH+qRCRdwIVAL6Z
+VUd15Rm/C4NrLD/nIL8tnnE3AoGBAOo9qlMBtN1MdmvJZ+Pa/x8O5+VxQvAVNysb
+DDIZQtT58ko5r3sRA783zHtUft80FA8pUAhkrnRKnqn+bK42Xrm/IMXJd8Wi9LBy
+pN5Pg37B/k6pXs2qzLDYnCCBEW9EBBUn6fyZMK7DDs/BTU7Rf0dCh1/YsxRrm0yJ
+reFOd+1gAoGBAJTq0lPrrUB62NXllTbVNAusIQX870BHBHuo3K3OFYGYD85z1gwy
+e495snKyYOT9QfkBiuH/VGxP2BgIQH+cr5hTWsFZ/09mdhEC5sj/bVDrhwexklVx
+ZeHxpIVmpB97jXomdXVR2ZoP92Gco+qU8tXcBdopQQcybk5j4fUxa+KQAhUAmGWZ
+bHhbiRb/ip5oN6edhUe47TU=
+-----END DSA PRIVATE KEY-----
+
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key.pub b/lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key.pub
new file mode 100644
index 0000000000..bca37299b0
--- /dev/null
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/ssh_dir/ssh_host_dsa_key.pub
@@ -0,0 +1,11 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+AAAAB3NzaC1kc3MAAACBAO4aFewOhQL/H3xDUoSB1/6lCPMFcW7SAx/oLY/jsUgsAtWO
+/O0e+ldqtPxjRdlvj+Lled1wprOZECsRWY/NFPQ+nuBImk5yVj9/ViumW+0yN5Bpn9h4
+PkmhAWmAhR26KJ91FG3SvmBdh6MJ8AJr5lIWJdO8j5lekcLusf6pEJF3AAAAFQC+mVVH
+deUZvwuDayw/5yC/LZ5xNwAAAIEA6j2qUwG03Ux2a8ln49r/Hw7n5XFC8BU3KxsMMhlC
+1PnySjmvexEDvzfMe1R+3zQUDylQCGSudEqeqf5srjZeub8gxcl3xaL0sHKk3k+DfsH+
+TqlezarMsNicIIERb0QEFSfp/JkwrsMOz8FNTtF/R0KHX9izFGubTImt4U537WAAAACB
+AJTq0lPrrUB62NXllTbVNAusIQX870BHBHuo3K3OFYGYD85z1gwye495snKyYOT9QfkB
+iuH/VGxP2BgIQH+cr5hTWsFZ/09mdhEC5sj/bVDrhwexklVxZeHxpIVmpB97jXomdXVR
+2ZoP92Gco+qU8tXcBdopQQcybk5j4fUxa+KQ
+---- END SSH2 PUBLIC KEY ----
diff --git a/lib/common_test/test/ct_repeat_testrun_SUITE.erl b/lib/common_test/test/ct_repeat_testrun_SUITE.erl
index 632597c214..f8b6a379f6 100644
--- a/lib/common_test/test/ct_repeat_testrun_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_testrun_SUITE.erl
@@ -66,25 +66,47 @@
%% there will be clashes with logging processes etc).
%%--------------------------------------------------------------------
init_per_suite(Config0) ->
- Config = ct_test_support:init_per_suite(Config0),
- DataDir = ?config(data_dir, Config),
- Suite1 = filename:join([DataDir,"a_test","r1_SUITE"]),
- Suite2 = filename:join([DataDir,"b_test","r2_SUITE"]),
- Opts0 = ct_test_support:get_opts(Config),
- Opts1 = Opts0 ++ [{suite,Suite1},{testcase,tc2},{label,timing1}],
- Opts2 = Opts0 ++ [{suite,Suite2},{testcase,tc2},{label,timing2}],
-
- %% Make sure both suites are compiled
- {1,0,{0,0}} = ct_test_support:run(ct,run_test,[Opts1],Config),
- {1,0,{0,0}} = ct_test_support:run(ct,run_test,[Opts2],Config),
-
- %% Time the shortest testcase to use for offset
- {_T0,{1,0,{0,0}}} = timer:tc(ct_test_support,run,[ct,run_test,[Opts1],Config]),
-
- %% -2 is to ensure we hit inside the target test case and not after
-% T = round(T0/1000000)-2,
- T=0,
- [{offset,T}|Config].
+ TTInfo = {_T,{_Scaled,ScaleVal}} = ct:get_timetrap_info(),
+ ct:pal("Timetrap info = ~w", [TTInfo]),
+ if ScaleVal > 1 ->
+ {skip,"Skip on systems running e.g. cover or debug!"};
+ ScaleVal =< 1 ->
+ Config = ct_test_support:init_per_suite(Config0),
+ DataDir = ?config(data_dir, Config),
+ Suite1 = filename:join([DataDir,"a_test","r1_SUITE"]),
+ Suite2 = filename:join([DataDir,"b_test","r2_SUITE"]),
+ Opts0 = ct_test_support:get_opts(Config),
+ Opts1 = Opts0 ++ [{suite,Suite1},{testcase,tc2},{label,timing1}],
+ Opts2 = Opts0 ++ [{suite,Suite2},{testcase,tc2},{label,timing2}],
+
+ %% Make sure both suites are compiled
+ {1,0,{0,0}} = ct_test_support:run(ct,run_test,[Opts1],Config),
+ {1,0,{0,0}} = ct_test_support:run(ct,run_test,[Opts2],Config),
+
+ %% Check if file i/o is too slow for correct measurements
+ Opts3 = Opts0 ++ [{suite,Suite1},{testcase,tc1},{label,timing3}],
+ {T,_} =
+ timer:tc(
+ fun() ->
+ {1,0,{0,0}} = ct_test_support:run(ct,run_test,
+ [Opts3],Config),
+ {1,0,{0,0}} = ct_test_support:run(ct,run_test,
+ [Opts3],Config)
+ end),
+ %% The time to compare with here must match the timeout value
+ %% in the test suite. Accept 30% logging overhead (26 sec total).
+ if T > 26000000 ->
+ ct:pal("Timing test took ~w sec (< 27 sec expected). "
+ "Skipping the suite!",
+ [trunc(T/1000000)]),
+ ct_test_support:end_per_suite(Config),
+ {skip,"File I/O too slow for this suite"};
+ true ->
+ ct:pal("Timing test took ~w sec. Proceeding...",
+ [trunc(T/1000000)]),
+ [{offset,0}|Config]
+ end
+ end.
end_per_suite(Config) ->
ct_test_support:end_per_suite(Config).
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
index 9dc9095f47..985fa40ad2 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
@@ -308,8 +308,19 @@ large_string(_) ->
VerifyStr = [C || C <- lists:flatten(Data1), C/=$ , C/=$\r, C/=$\n, C/=$>],
ok = ct_telnet:send(Handle, "echo_sep "++BigString),
- ct:sleep(50),
- {ok,Data2} = ct_telnet:get_data(Handle),
+ %% On some slow machines, 50 ms might not be enough to get the
+ %% first packet of data. We will therefore keep trying for a
+ %% second before we give up this...
+ F = fun RepeatUntilData(N) ->
+ ct:sleep(50),
+ case ct_telnet:get_data(Handle) of
+ {ok,[]} when N>1 ->
+ RepeatUntilData(N-1);
+ Other ->
+ Other
+ end
+ end,
+ {ok,Data2} = F(20),
ct:log("[GET DATA #2] Received ~w chars: ~s", [length(lists:flatten(Data2)),Data2]),
VerifyStr = [C || C <- lists:flatten(Data2), C/=$ , C/=$\r, C/=$\n, C/=$>],
diff --git a/lib/common_test/test/telnet_server.erl b/lib/common_test/test/telnet_server.erl
index 107d98d72c..2c33cb268a 100644
--- a/lib/common_test/test/telnet_server.erl
+++ b/lib/common_test/test/telnet_server.erl
@@ -59,7 +59,7 @@ init(Opts) ->
accept(State),
ok = gen_tcp:close(LSock),
dbg("telnet_server closed the listen socket ~p\n", [LSock]),
- ct:sleep(1000),
+ timer:sleep(1000),
ok.
listen(0, _Port, _Opts) ->
@@ -68,7 +68,7 @@ listen(Retries, Port, Opts) ->
case gen_tcp:listen(Port, Opts) of
{error,eaddrinuse} ->
dbg("Listen port not released, trying again..."),
- ct:sleep(5000),
+ timer:sleep(5000),
listen(Retries-1, Port, Opts);
Ok = {ok,_LSock} ->
Ok;
@@ -193,6 +193,9 @@ handle_cmd([?AYT|T],State) ->
%% Used when testing 'newline' option in ct_telnet:send and ct_telnet:cmd.
send("yes\r\n> ",State),
handle_data(T,State);
+handle_cmd([?NOP|T],State) ->
+ %% Used for 'keep alive'
+ handle_data(T,State);
handle_cmd([_H|T],State) ->
%% Not responding to this command
handle_cmd(T,State);
@@ -203,6 +206,9 @@ handle_break_cmd([$q|T],State) ->
%% Dummy cmd allowed in break mode - quit break mode
send("\r\n> ",State),
handle_data(T,State#state{break=false});
+handle_break_cmd([_H|T],State) ->
+ %% Unknown command i break mode - ignore
+ handle_break_cmd(T,State);
handle_break_cmd([],State) ->
{ok,State}.
@@ -220,7 +226,7 @@ do_handle_data("echo_sep " ++ Data,State) ->
Msgs = string:tokens(Data," "),
lists:foreach(fun(Msg) ->
send(Msg,State),
- ct:sleep(10)
+ timer:sleep(10)
end, Msgs),
send("\r\n> ",State),
{ok,State};
@@ -245,7 +251,7 @@ do_handle_data("echo_loop " ++ Data,State) ->
do_handle_data("echo_delayed_prompt "++Data,State) ->
[MsStr|EchoData] = string:tokens(Data, " "),
send(string:join(EchoData,"\n"),State),
- ct:sleep(list_to_integer(MsStr)),
+ timer:sleep(list_to_integer(MsStr)),
send("\r\n> ",State),
{ok,State};
do_handle_data("disconnect_after " ++WaitStr,State) ->
@@ -298,7 +304,7 @@ send_loop(T0,T,Data,State) ->
ok;
true ->
send(Data,State),
- ct:sleep(500),
+ timer:sleep(500),
send_loop(T0,T,Data,State)
end.
diff --git a/lib/common_test/test_server/ts_install.erl b/lib/common_test/test_server/ts_install.erl
index b906eb21f5..5734bd0787 100644
--- a/lib/common_test/test_server/ts_install.erl
+++ b/lib/common_test/test_server/ts_install.erl
@@ -332,11 +332,12 @@ platform(Vars) ->
LC = lock_checking(),
MT = modified_timing(),
AsyncThreads = async_threads(),
+ OffHeapMsgQ = off_heap_msgq(),
Debug = debug(),
CpuBits = word_size(),
Common = lists:concat([Hostname,"/",OsType,"/",CpuType,CpuBits,LinuxDist,
Schedulers,BindType,KP,IOTHR,LC,MT,AsyncThreads,
- Debug,ExtraLabel]),
+ OffHeapMsgQ,Debug,ExtraLabel]),
PlatformId = lists:concat([ErlType, " ", Version, Common]),
PlatformLabel = ErlType ++ Common,
PlatformFilename = platform_as_filename(PlatformId),
@@ -400,6 +401,12 @@ async_threads() ->
_ -> ""
end.
+off_heap_msgq() ->
+ case catch erlang:system_info(message_queue_data) of
+ off_heap -> "/OffHeapMsgQ";
+ _ -> ""
+ end.
+
schedulers() ->
case catch erlang:system_info(smp_support) of
true ->
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index 954750fcdd..61e214294e 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.xml
@@ -40,6 +40,19 @@
<funcs>
<func>
+ <name>env_compiler_options()</name>
+ <fsummary>
+ Compiler options defined via the environment variable
+ <c>ERL_COMPILER_OPTIONS</c>
+ </fsummary>
+ <desc>
+ <p>Return compiler options given via the environment variable
+ <c>ERL_COMPILER_OPTIONS</c>. If the value is a list, it is
+ returned as is. If it is not a list, it is put into a list.
+ </p>
+ </desc>
+ </func>
+ <func>
<name>file(File)</name>
<fsummary>Compiles a file.</fsummary>
<desc>
@@ -768,6 +781,9 @@ module.beam: module.erl \
if you do not want the environment variable to be consulted,
for example, if you are calling the compiler recursively from
inside a parse transform.</p>
+
+ <p>The list can be retrieved with
+ <seealso marker="#env_compiler_options/0">env_compiler_options/0</seealso>.</p>
</section>
<section>
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl
index a8cfdffdf3..85d332c56e 100644
--- a/lib/compiler/src/beam_block.erl
+++ b/lib/compiler/src/beam_block.erl
@@ -262,12 +262,17 @@ opt_move_1(R, [{set,[D],[R],move}|Is0], Acc) ->
{yes,Is} -> opt_move_rev(D, Acc, Is);
no -> not_possible
end;
-opt_move_1({x,_}, [{set,_,_,{alloc,_,_}}|_], _) ->
- %% The optimization is not possible. If the X register is not
- %% killed by allocation, the optimization would not be safe.
- %% If the X register is killed, it means that there cannot
- %% follow a 'move' instruction with this X register as the
- %% source.
+opt_move_1(_R, [{set,_,_,{alloc,_,_}}|_], _) ->
+ %% The optimization is either not possible or not safe.
+ %%
+ %% If R is an X register killed by allocation, the optimization is
+ %% not safe. On the other hand, if the X register is killed, there
+ %% will not follow a 'move' instruction with this X register as
+ %% the source.
+ %%
+ %% If R is a Y register, the optimization is still not safe
+ %% because the new target register is an X register that cannot
+ %% safely pass the alloc instruction.
not_possible;
opt_move_1(R, [{set,_,_,_}=I|Is], Acc) ->
%% If the source register is either killed or used by this
diff --git a/lib/compiler/src/beam_dead.erl b/lib/compiler/src/beam_dead.erl
index dd42add433..b01f58f683 100644
--- a/lib/compiler/src/beam_dead.erl
+++ b/lib/compiler/src/beam_dead.erl
@@ -262,7 +262,7 @@ backward([{select,select_val,Reg,{f,Fail0},List0}|Is], D, Acc) ->
backward([{jump,{f,To0}},{move,Src,Reg}=Move|Is], D, Acc) ->
To = shortcut_select_label(To0, Reg, Src, D),
Jump = {jump,{f,To}},
- case beam_utils:is_killed_at(Reg, To, D) of
+ case is_killed_at(Reg, To, D) of
false -> backward([Move|Is], D, [Jump|Acc]);
true -> backward([Jump|Is], D, Acc)
end;
@@ -420,7 +420,7 @@ comp_op_find_shortcut(To0, Reg, Val, D) ->
To0 ->
not_possible();
To ->
- case beam_utils:is_killed_at(Reg, To, D) of
+ case is_killed_at(Reg, To, D) of
false -> not_possible();
true -> To
end
@@ -863,3 +863,17 @@ get_literal(nil) ->
get_literal({literal,_}=Lit) ->
Lit;
get_literal({_,_}) -> error.
+
+
+%%%
+%%% Removing stores to Y registers is not always safe
+%%% if there is an instruction that causes an exception
+%%% within a catch. In practice, there are few or no
+%%% opportunities for removing stores to Y registers anyway
+%%% if sys_core_fold has been run.
+%%%
+
+is_killed_at({x,_}=Reg, Lbl, D) ->
+ beam_utils:is_killed_at(Reg, Lbl, D);
+is_killed_at({y,_}, _, _) ->
+ false.
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl
index 5badcce696..c699672db1 100644
--- a/lib/compiler/src/beam_disasm.erl
+++ b/lib/compiler/src/beam_disasm.erl
@@ -314,10 +314,7 @@ get_funs({LsR0,[{func_info,[{atom,M}=AtomM,{atom,F}=AtomF,ArityArg]}|Code0]})
when is_atom(M), is_atom(F) ->
Arity = resolve_arg_unsigned(ArityArg),
{LsR,Code,RestCode} = get_fun(Code0, []),
- Entry = case Code of
- [{label,[{u,E}]}|_] -> E;
- _ -> undefined
- end,
+ [{label,[{u,Entry}]}|_] = Code,
[#function{name=F,
arity=Arity,
entry=Entry,
diff --git a/lib/compiler/src/beam_disasm.hrl b/lib/compiler/src/beam_disasm.hrl
index e18214644f..d968cd9587 100644
--- a/lib/compiler/src/beam_disasm.hrl
+++ b/lib/compiler/src/beam_disasm.hrl
@@ -22,7 +22,9 @@
%% the system (e.g. in the translation from Beam to Icode).
%%
-%% XXX: THE FOLLOWING TYPE DECLARATION DOES NOT BELONG HERE...
+%% XXX: THE FOLLOWING TYPE DECLARATION DOES NOT BELONG HERE.
+%% IT SHOULD BE MOVED TO A FILE THAT DEFINES (AND EXPORTS)
+%% PROPER TYPES FOR THE SET OF BEAM INSTRUCTIONS.
%%
-type beam_instr() :: 'bs_init_writable' | 'fclearerror' | 'if_end'
| 'remove_message' | 'return' | 'send' | 'timeout'
@@ -34,7 +36,7 @@
-record(function, {name :: atom(),
arity :: byte(),
- entry, %% unused ??
+ entry :: beam_lib:label(), %% unnecessary ?
code = [] :: [beam_instr()]}).
-record(beam_file, {module :: module(),
diff --git a/lib/compiler/src/beam_except.erl b/lib/compiler/src/beam_except.erl
index cb3a6b79de..4a181c1923 100644
--- a/lib/compiler/src/beam_except.erl
+++ b/lib/compiler/src/beam_except.erl
@@ -133,10 +133,12 @@ translate_exception(_, _, _, _) -> no.
fix_block(Is, 0) ->
reverse(Is);
fix_block(Is, Words) ->
- fix_block_1(reverse(Is), Words).
+ reverse(fix_block_1(Is, Words)).
-fix_block_1([{set,[],[],{alloc,Live,{F1,F2,Needed,F3}}}|Is], Words) ->
- [{set,[],[],{alloc,Live,{F1,F2,Needed-Words,F3}}}|Is];
+fix_block_1([{set,[],[],{alloc,Live,{F1,F2,Needed0,F3}}}|Is], Words) ->
+ Needed = Needed0 - Words,
+ true = Needed >= 0, %Assertion.
+ [{set,[],[],{alloc,Live,{F1,F2,Needed,F3}}}|Is];
fix_block_1([I|Is], Words) ->
[I|fix_block_1(Is, Words)].
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl
index 359248c6af..09cd3aa2d4 100644
--- a/lib/compiler/src/beam_jump.erl
+++ b/lib/compiler/src/beam_jump.erl
@@ -266,17 +266,17 @@ extract_seq_1(_, _) -> no.
%%% (3) (4) (5) (6) Jump and unreachable code optimizations.
%%%
--record(st, {fc, %Label for function class errors.
- entry, %Entry label (must not be moved).
- mlbl, %Moved labels.
- labels :: cerl_sets:set() %Set of referenced labels.
- }).
-
-opt([{label,Fc}|_]=Is0, CLabel) ->
- Lbls = initial_labels(Is0),
+-record(st,
+ {
+ entry, %Entry label (must not be moved).
+ mlbl, %Moved labels.
+ labels :: cerl_sets:set() %Set of referenced labels.
+ }).
+
+opt(Is0, CLabel) ->
find_fixpoint(fun(Is) ->
- St = #st{fc=Fc,entry=CLabel,mlbl=#{},
- labels=Lbls},
+ Lbls = initial_labels(Is),
+ St = #st{entry=CLabel,mlbl=#{},labels=Lbls},
opt(Is, [], St)
end, Is0).
@@ -327,7 +327,8 @@ opt([{label,Lbl}=I|Is], Acc, #st{mlbl=Mlbl}=St0) ->
%% since we will rescan the inserted labels. We MUST rescan.
St = St0#st{mlbl=maps:remove(Lbl, Mlbl)},
insert_labels([Lbl|Lbls], Is, Acc, St);
- error -> opt(Is, [I|Acc], St0)
+ error ->
+ opt(Is, [I|Acc], St0)
end;
opt([{jump,{f,_}=X}|[{label,_},{jump,X}|_]=Is], Acc, St) ->
opt(Is, Acc, St);
@@ -362,12 +363,19 @@ opt([I|Is], Acc, #st{labels=Used0}=St0) ->
true -> skip_unreachable(Is, [I|Acc], St);
false -> opt(Is, [I|Acc], St)
end;
-opt([], Acc, #st{fc=Fc,mlbl=Mlbl}) ->
+opt([], Acc, #st{mlbl=Mlbl}) ->
Code = reverse(Acc),
- case maps:find(Fc, Mlbl) of
- {ok,Lbls} -> insert_fc_labels(Lbls, Mlbl, Code);
- error -> Code
- end.
+ insert_fc_labels(Code, Mlbl).
+
+insert_fc_labels([{label,L}=I|Is0], Mlbl) ->
+ case maps:find(L, Mlbl) of
+ error ->
+ [I|insert_fc_labels(Is0, Mlbl)];
+ {ok,Lbls} ->
+ Is = [{label,Lb} || Lb <- Lbls] ++ Is0,
+ [I|insert_fc_labels(Is, maps:remove(L, Mlbl))]
+ end;
+insert_fc_labels([_|_]=Is, _) -> Is.
maps_append_list(K,Vs,M) ->
case M of
@@ -375,16 +383,6 @@ maps_append_list(K,Vs,M) ->
_ -> M#{K => Vs}
end.
-insert_fc_labels([L|Ls], Mlbl, Acc0) ->
- Acc = [{label,L}|Acc0],
- case maps:find(L, Mlbl) of
- error ->
- insert_fc_labels(Ls, Mlbl, Acc);
- {ok,Lbls} ->
- insert_fc_labels(Lbls++Ls, Mlbl, Acc)
- end;
-insert_fc_labels([], _, Acc) -> Acc.
-
collect_labels(Is, #st{entry=Entry}) ->
collect_labels_1(Is, Entry, []).
diff --git a/lib/compiler/src/beam_receive.erl b/lib/compiler/src/beam_receive.erl
index c593184746..89cafe27ce 100644
--- a/lib/compiler/src/beam_receive.erl
+++ b/lib/compiler/src/beam_receive.erl
@@ -177,7 +177,8 @@ opt_recv([I|Is], D, R0, L0, Acc) ->
no;
false ->
opt_recv(Is, D, R, L, [I|Acc])
- end.
+ end;
+opt_recv([], _, _, _, _) -> no.
opt_update_regs({block,Bl}, R, L) ->
{opt_update_regs_bl(Bl, R),L};
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index 47703b4aa3..a15ecf633e 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -167,8 +167,7 @@ bif_to_test(is_record, [_,_,_]=Ops, Fail) -> {test,is_record,Fail,Ops}.
%% is_pure_test({test,Op,Fail,Ops}) -> true|false.
%% Return 'true' if the test instruction does not modify any
-%% registers and/or bit syntax matching state, nor modifies
-%% any bit syntax matching state.
+%% registers and/or bit syntax matching state.
%%
is_pure_test({test,is_eq,_,[_,_]}) -> true;
is_pure_test({test,is_ne,_,[_,_]}) -> true;
@@ -180,6 +179,8 @@ is_pure_test({test,is_nil,_,[_]}) -> true;
is_pure_test({test,is_nonempty_list,_,[_]}) -> true;
is_pure_test({test,test_arity,_,[_,_]}) -> true;
is_pure_test({test,has_map_fields,_,[_|_]}) -> true;
+is_pure_test({test,is_bitstr,_,[_]}) -> true;
+is_pure_test({test,is_function2,_,[_,_]}) -> true;
is_pure_test({test,Op,_,Ops}) ->
erl_internal:new_type_test(Op, length(Ops)).
@@ -324,8 +325,11 @@ check_liveness(R, [{deallocate,_}|Is], St) ->
{y,_} -> {killed,St};
_ -> check_liveness(R, Is, St)
end;
-check_liveness(R, [return|_], St) ->
- check_liveness_live_ret(R, 1, St);
+check_liveness({x,_}=R, [return|_], St) ->
+ case R of
+ {x,0} -> {used,St};
+ {x,_} -> {killed,St}
+ end;
check_liveness(R, [{call,Live,_}|Is], St) ->
case R of
{x,X} when X < Live -> {used,St};
@@ -534,14 +538,6 @@ check_liveness_at(R, Lbl, #live{lbl=Ll,res=ResMemorized}=St0) ->
check_liveness_ret(R, R, St) -> {used,St};
check_liveness_ret(_, _, St) -> {killed,St}.
-check_liveness_live_ret({x,R}, Live, St) ->
- if
- R < Live -> {used,St};
- true -> {killed,St}
- end;
-check_liveness_live_ret({y,_}, _, St) ->
- {killed,St}.
-
check_liveness_fail(_, _, _, 0, St) ->
{killed,St};
check_liveness_fail(R, Op, Args, Fail, St) ->
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index faff9940ec..4c0cb6780a 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -161,6 +161,13 @@ validate_0(Module, [{function,Name,Ar,Entry,Code}|Fs], Ft) ->
% in the module (those that start with bs_start_match2).
}).
+%% Match context type.
+-record(ms,
+ {id=make_ref() :: reference(), %Unique ID.
+ valid=0 :: non_neg_integer(), %Valid slots
+ slots=0 :: non_neg_integer() %Number of slots
+ }).
+
validate_1(Is, Name, Arity, Entry, Ft) ->
validate_2(labels(Is), Name, Arity, Entry, Ft).
@@ -274,7 +281,7 @@ valfun_1({bs_context_to_binary,Ctx}, #vst{current=#st{x=Xs}}=Vst) ->
case Ctx of
{Tag,X} when Tag =:= x; Tag =:= y ->
Type = case gb_trees:lookup(X, Xs) of
- {value,{match_context,_,_}} -> term;
+ {value,#ms{}} -> term;
_ -> get_term_type(Ctx, Vst)
end,
set_type_reg(Type, Ctx, Vst);
@@ -575,7 +582,7 @@ valfun_4({test,bs_start_match2,{f,Fail},Live,[Ctx,NeedSlots],Ctx}, Vst0) ->
verify_live(Live, Vst0),
Vst1 = prune_x_regs(Live, Vst0),
BranchVst = case CtxType of
- {match_context,_,_} ->
+ #ms{} ->
%% The failure branch will never be taken when Ctx
%% is a match context. Therefore, the type for Ctx
%% at the failure label must not be match_context
@@ -651,8 +658,10 @@ valfun_4({test,is_map,{f,Lbl},[Src]}, Vst0) ->
case Src of
{Tag,_} when Tag =:= x; Tag =:= y ->
set_type_reg(map, Src, Vst);
+ {literal,Map} when is_map(Map) ->
+ Vst;
_ ->
- Vst
+ kill_state(Vst)
end;
valfun_4({test,_Op,{f,Lbl},Src}, Vst) ->
validate_src(Src, Vst),
@@ -828,7 +837,7 @@ kill_state_1(Vst) ->
%% The stackframe must be initialized.
%% The instruction will return to the instruction following the call.
call(Name, Live, #vst{current=St}=Vst) ->
- verify_live(Live, Vst),
+ verify_call_args(Name, Live, Vst),
verify_y_init(Vst),
case return_type(Name, Vst) of
Type when Type =/= exception ->
@@ -840,44 +849,74 @@ call(Name, Live, #vst{current=St}=Vst) ->
%% Tail call.
%% The stackframe must have a known size and be initialized.
%% Does not return to the instruction following the call.
-tail_call(Name, Live, Vst) ->
+tail_call(Name, Live, Vst0) ->
+ verify_y_init(Vst0),
+ Vst = deallocate(Vst0),
verify_call_args(Name, Live, Vst),
- verify_y_init(Vst),
verify_no_ct(Vst),
kill_state(Vst).
verify_call_args(_, 0, #vst{}) ->
ok;
verify_call_args({f,Lbl}, Live, Vst) when is_integer(Live)->
- Verify = fun(R) ->
- case get_move_term_type(R, Vst) of
- {match_context,_,_} ->
- verify_call_match_context(Lbl, Vst);
- _ ->
- ok
- end
- end,
- verify_call_args_1(Live, Verify, Vst);
+ verify_local_call(Lbl, Live, Vst);
verify_call_args(_, Live, Vst) when is_integer(Live)->
- Verify = fun(R) -> get_term_type(R, Vst) end,
- verify_call_args_1(Live, Verify, Vst);
+ verify_call_args_1(Live, Vst);
verify_call_args(_, Live, _) ->
error({bad_number_of_live_regs,Live}).
-verify_call_args_1(0, _, _) -> ok;
-verify_call_args_1(N, Verify, Vst) ->
+verify_call_args_1(0, _) -> ok;
+verify_call_args_1(N, Vst) ->
X = N - 1,
- Verify({x,X}),
- verify_call_args_1(X, Verify, Vst).
+ get_term_type({x,X}, Vst),
+ verify_call_args_1(X, Vst).
+
+verify_local_call(Lbl, Live, Vst) ->
+ case all_ms_in_x_regs(Live, Vst) of
+ [{R,Ctx}] ->
+ %% Verify that there is a suitable bs_start_match2 instruction.
+ verify_call_match_context(Lbl, R, Vst),
+
+ %% Since the callee has consumed the match context,
+ %% there must be no additional copies in Y registers.
+ #ms{id=Id} = Ctx,
+ case ms_in_y_regs(Id, Vst) of
+ [] ->
+ ok;
+ [_|_]=Ys ->
+ error({multiple_match_contexts,[R|Ys]})
+ end;
+ [_,_|_]=Xs0 ->
+ Xs = [R || {R,_} <- Xs0],
+ error({multiple_match_contexts,Xs});
+ [] ->
+ ok
+ end.
+
+all_ms_in_x_regs(0, _Vst) ->
+ [];
+all_ms_in_x_regs(Live0, Vst) ->
+ Live = Live0 - 1,
+ R = {x,Live},
+ case get_move_term_type(R, Vst) of
+ #ms{}=M ->
+ [{R,M}|all_ms_in_x_regs(Live, Vst)];
+ _ ->
+ all_ms_in_x_regs(Live, Vst)
+ end.
+
+ms_in_y_regs(Id, #vst{current=#st{y=Ys0}}) ->
+ Ys = gb_trees:to_list(Ys0),
+ [Y || {Y,#ms{id=OtherId}} <- Ys, OtherId =:= Id].
-verify_call_match_context(Lbl, #vst{ft=Ft}) ->
+verify_call_match_context(Lbl, Ctx, #vst{ft=Ft}) ->
case gb_trees:lookup(Lbl, Ft) of
none ->
error(no_bs_start_match2);
{value,[{test,bs_start_match2,_,_,[Ctx,_],Ctx}|_]} ->
ok;
- {value,[{test,bs_start_match2,_,_,[Bin,_,_],Ctx}|_]} ->
- error({binary_and_context_regs_different,Bin,Ctx})
+ {value,[{test,bs_start_match2,_,_,_,_}=I|_]} ->
+ error({unsuitable_bs_start_match2,I})
end.
allocate(Zero, Stk, Heap, Live, #vst{current=#st{numy=none}=St}=Vst0) ->
@@ -1009,7 +1048,7 @@ assert_unique_map_keys([_,_|_]=Ls) ->
%%%
bsm_match_state(Slots) ->
- {match_context,0,Slots}.
+ #ms{slots=Slots}.
bsm_validate_context(Reg, Vst) ->
_ = bsm_get_context(Reg, Vst),
@@ -1017,7 +1056,7 @@ bsm_validate_context(Reg, Vst) ->
bsm_get_context({x,X}=Reg, #vst{current=#st{x=Xs}}=_Vst) when is_integer(X) ->
case gb_trees:lookup(X, Xs) of
- {value,{match_context,_,_}=Ctx} -> Ctx;
+ {value,#ms{}=Ctx} -> Ctx;
_ -> error({no_bsm_context,Reg})
end;
bsm_get_context(Reg, _) -> error({bad_source,Reg}).
@@ -1029,8 +1068,8 @@ bsm_save(Reg, {atom,start}, Vst) ->
Vst;
bsm_save(Reg, SavePoint, Vst) ->
case bsm_get_context(Reg, Vst) of
- {match_context,Bits,Slots} when SavePoint < Slots ->
- Ctx = {match_context,Bits bor (1 bsl SavePoint),Slots},
+ #ms{valid=Bits,slots=Slots}=Ctxt0 when SavePoint < Slots ->
+ Ctx = Ctxt0#ms{valid=Bits bor (1 bsl SavePoint),slots=Slots},
set_type_reg(Ctx, Reg, Vst);
_ -> error({illegal_save,SavePoint})
end.
@@ -1042,7 +1081,7 @@ bsm_restore(Reg, {atom,start}, Vst) ->
Vst;
bsm_restore(Reg, SavePoint, Vst) ->
case bsm_get_context(Reg, Vst) of
- {match_context,Bits,Slots} when SavePoint < Slots ->
+ #ms{valid=Bits,slots=Slots} when SavePoint < Slots ->
case Bits band (1 bsl SavePoint) of
0 -> error({illegal_restore,SavePoint,not_set});
_ -> Vst
@@ -1123,7 +1162,7 @@ assert_term(Src, Vst) ->
%% Thus 'exception' is never stored as type descriptor
%% for a register.
%%
-%% {match_context,_,_} A matching context for bit syntax matching. We do allow
+%% #ms{} A match context for bit syntax matching. We do allow
%% it to moved/to from stack, but otherwise it must only
%% be accessed by bit syntax matching instructions.
%%
@@ -1230,7 +1269,7 @@ get_term_type(Src, Vst) ->
initialized -> error({unassigned,Src});
{catchtag,_} -> error({catchtag,Src});
{trytag,_} -> error({trytag,Src});
- {match_context,_,_} -> error({match_context,Src});
+ #ms{} -> error({match_context,Src});
Type -> Type
end.
@@ -1382,11 +1421,12 @@ merge_types(bool, {atom,A}) ->
merge_bool(A);
merge_types({atom,A}, bool) ->
merge_bool(A);
-merge_types({match_context,B0,Slots},{match_context,B1,Slots}) ->
- {match_context,B0 bor B1,Slots};
-merge_types({match_context,_,_}=M, _) ->
+merge_types(#ms{id=Id,valid=B0,slots=Slots}=M,
+ #ms{id=Id,valid=B1,slots=Slots}) ->
+ M#ms{valid=B0 bor B1,slots=Slots};
+merge_types(#ms{}=M, _) ->
M;
-merge_types(_, {match_context,_,_}=M) ->
+merge_types(_, #ms{}=M) ->
M;
merge_types(T1, T2) when T1 =/= T2 ->
%% Too different. All we know is that the type is a 'term'.
@@ -1510,7 +1550,6 @@ bif_type(node, [_], _) -> {atom,[]};
bif_type(hd, [_], _) -> term;
bif_type(tl, [_], _) -> term;
bif_type(get, [_], _) -> term;
-bif_type(raise, [_,_], _) -> exception;
bif_type(Bif, _, _) when is_atom(Bif) -> term.
is_bif_safe('/=', 2) -> true;
@@ -1524,6 +1563,7 @@ is_bif_safe('>=', 2) -> true;
is_bif_safe(is_atom, 1) -> true;
is_bif_safe(is_boolean, 1) -> true;
is_bif_safe(is_binary, 1) -> true;
+is_bif_safe(is_bitstring, 1) -> true;
is_bif_safe(is_float, 1) -> true;
is_bif_safe(is_function, 1) -> true;
is_bif_safe(is_integer, 1) -> true;
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 149086152a..82ff8a95f3 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -26,6 +26,7 @@
-export([forms/1,forms/2,noenv_forms/2]).
-export([output_generated/1,noenv_output_generated/1]).
-export([options/0]).
+-export([env_compiler_options/0]).
%% Erlc interface.
-export([compile/3,compile_beam/3,compile_asm/3,compile_core/3]).
@@ -131,6 +132,14 @@ noenv_output_generated(Opts) ->
end, Passes).
%%
+%% Retrieve ERL_COMPILER_OPTIONS as a list of terms
+%%
+
+-spec env_compiler_options() -> [term()].
+
+env_compiler_options() -> env_default_opts().
+
+%%
%% Local functions
%%
diff --git a/lib/compiler/src/rec_env.erl b/lib/compiler/src/rec_env.erl
index 936c5f6106..cdc513e57c 100644
--- a/lib/compiler/src/rec_env.erl
+++ b/lib/compiler/src/rec_env.erl
@@ -22,8 +22,7 @@
%% @doc Abstract environments, supporting self-referential bindings and
%% automatic new-key generation.
-%% The current implementation is based on Erlang standard library
-%% dictionaries.
+%% The current implementation is based on Erlang standard library maps.
%%% -define(DEBUG, true).
@@ -62,7 +61,7 @@ test_0(Type, N) ->
io:fwrite("\ncalls: ~w.\n", [get(new_key_calls)]),
io:fwrite("\nretries: ~w.\n", [get(new_key_retries)]),
io:fwrite("\nmax: ~w.\n", [get(new_key_max)]),
- dict:to_list(element(1,Env)).
+ maps:to_list(element(1,Env)).
test_1(integer = Type, N, Env) when is_integer(N), N > 0 ->
Key = new_key(Env),
@@ -80,14 +79,13 @@ test_1(_,0, Env) ->
%%
%% environment() = [Mapping]
%%
-%% Mapping = {map, Dict} | {rec, Dict, Dict}
-%% Dict = dict:dictionary()
+%% Mapping = {map, map()} | {rec, map(), map()}
%%
-%% An empty environment is a list containing a single `{map, Dict}'
+%% An empty environment is a list containing a single `{map, map()}'
%% element - empty lists are not valid environments. To find a key in an
%% environment, it is searched for in each mapping in the list, in
%% order, until it the key is found in some mapping, or the end of the
-%% list is reached. In a 'rec' mapping, we keep the original dictionary
+%% list is reached. In a 'rec' mapping, we keep the original map
%% together with a version where entries may have been deleted - this
%% makes it possible to garbage collect the entire 'rec' mapping when
%% all its entries are unused (for example, by being shadowed by later
@@ -97,7 +95,7 @@ test_1(_,0, Env) ->
%% =====================================================================
%% @type environment(). An abstract environment.
--type mapping() :: {'map', dict:dict()} | {'rec', dict:dict(), dict:dict()}.
+-type mapping() :: {'map', map()} | {'rec', map(), map()}.
-type environment() :: [mapping(),...].
%% =====================================================================
@@ -108,7 +106,7 @@ test_1(_,0, Env) ->
-spec empty() -> environment().
empty() ->
- [{map, dict:new()}].
+ [{map, #{}}].
%% =====================================================================
@@ -119,14 +117,14 @@ empty() ->
-spec is_empty(environment()) -> boolean().
-is_empty([{map, Dict} | Es]) ->
- N = dict:size(Dict),
+is_empty([{map, Map} | Es]) ->
+ N = map_size(Map),
if N =/= 0 -> false;
Es =:= [] -> true;
true -> is_empty(Es)
end;
-is_empty([{rec, Dict, _} | Es]) ->
- N = dict:size(Dict),
+is_empty([{rec, Map, _} | Es]) ->
+ N = map_size(Map),
if N =/= 0 -> false;
Es =:= [] -> true;
true -> is_empty(Es)
@@ -146,12 +144,12 @@ is_empty([{rec, Dict, _} | Es]) ->
size(Env) ->
env_size(Env).
-env_size([{map, Dict}]) ->
- dict:size(Dict);
-env_size([{map, Dict} | Env]) ->
- dict:size(Dict) + env_size(Env);
-env_size([{rec, Dict, _Dict0} | Env]) ->
- dict:size(Dict) + env_size(Env).
+env_size([{map, Map}]) ->
+ map_size(Map);
+env_size([{map, Map} | Env]) ->
+ map_size(Map) + env_size(Env);
+env_size([{rec, Map, _Map0} | Env]) ->
+ map_size(Map) + env_size(Env).
%% =====================================================================
@@ -165,8 +163,8 @@ env_size([{rec, Dict, _Dict0} | Env]) ->
-spec is_defined(term(), environment()) -> boolean().
-is_defined(Key, [{map, Dict} | Env]) ->
- case dict:is_key(Key, Dict) of
+is_defined(Key, [{map, Map} | Env]) ->
+ case maps:is_key(Key, Map) of
true ->
true;
false when Env =:= [] ->
@@ -174,8 +172,8 @@ is_defined(Key, [{map, Dict} | Env]) ->
false ->
is_defined(Key, Env)
end;
-is_defined(Key, [{rec, Dict, _Dict0} | Env]) ->
- dict:is_key(Key, Dict) orelse is_defined(Key, Env).
+is_defined(Key, [{rec, Map, _Map0} | Env]) ->
+ maps:is_key(Key, Map) orelse is_defined(Key, Env).
%% =====================================================================
@@ -188,12 +186,12 @@ is_defined(Key, [{rec, Dict, _Dict0} | Env]) ->
keys(Env) ->
lists:sort(keys(Env, [])).
-keys([{map, Dict}], S) ->
- dict:fetch_keys(Dict) ++ S;
-keys([{map, Dict} | Env], S) ->
- keys(Env, dict:fetch_keys(Dict) ++ S);
-keys([{rec, Dict, _Dict0} | Env], S) ->
- keys(Env, dict:fetch_keys(Dict) ++ S).
+keys([{map, Map}], S) ->
+ maps:keys(Map) ++ S;
+keys([{map, Map} | Env], S) ->
+ keys(Env, maps:keys(Map) ++ S);
+keys([{rec, Map, _Map0} | Env], S) ->
+ keys(Env, maps:keys(Map) ++ S).
%% =====================================================================
@@ -212,12 +210,12 @@ keys([{rec, Dict, _Dict0} | Env], S) ->
to_list(Env) ->
lists:sort(to_list(Env, [])).
-to_list([{map, Dict}], S) ->
- dict:to_list(Dict) ++ S;
-to_list([{map, Dict} | Env], S) ->
- to_list(Env, dict:to_list(Dict) ++ S);
-to_list([{rec, Dict, _Dict0} | Env], S) ->
- to_list(Env, dict:to_list(Dict) ++ S).
+to_list([{map, Map}], S) ->
+ maps:to_list(Map) ++ S;
+to_list([{map, Map} | Env], S) ->
+ to_list(Env, maps:to_list(Map) ++ S);
+to_list([{rec, Map, _Map0} | Env], S) ->
+ to_list(Env, maps:to_list(Map) ++ S).
%% =====================================================================
@@ -236,12 +234,12 @@ to_list([{rec, Dict, _Dict0} | Env], S) ->
-spec bind(term(), term(), environment()) -> environment().
-bind(Key, Value, [{map, Dict}]) ->
- [{map, dict:store(Key, Value, Dict)}];
-bind(Key, Value, [{map, Dict} | Env]) ->
- [{map, dict:store(Key, Value, Dict)} | delete_any(Key, Env)];
+bind(Key, Value, [{map, Map}]) ->
+ [{map, maps:put(Key, Value, Map)}];
+bind(Key, Value, [{map, Map} | Env]) ->
+ [{map, maps:put(Key, Value, Map)} | delete_any(Key, Env)];
bind(Key, Value, Env) ->
- [{map, dict:store(Key, Value, dict:new())} | delete_any(Key, Env)].
+ [{map, maps:put(Key, Value, #{})} | delete_any(Key, Env)].
%% =====================================================================
@@ -259,17 +257,17 @@ bind(Key, Value, Env) ->
-spec bind_list([term()], [term()], environment()) -> environment().
-bind_list(Ks, Vs, [{map, Dict}]) ->
- [{map, store_list(Ks, Vs, Dict)}];
-bind_list(Ks, Vs, [{map, Dict} | Env]) ->
- [{map, store_list(Ks, Vs, Dict)} | delete_list(Ks, Env)];
+bind_list(Ks, Vs, [{map, Map}]) ->
+ [{map, store_list(Ks, Vs, Map)}];
+bind_list(Ks, Vs, [{map, Map} | Env]) ->
+ [{map, store_list(Ks, Vs, Map)} | delete_list(Ks, Env)];
bind_list(Ks, Vs, Env) ->
- [{map, store_list(Ks, Vs, dict:new())} | delete_list(Ks, Env)].
+ [{map, store_list(Ks, Vs, #{})} | delete_list(Ks, Env)].
-store_list([K | Ks], [V | Vs], Dict) ->
- store_list(Ks, Vs, dict:store(K, V, Dict));
-store_list([], _, Dict) ->
- Dict.
+store_list([K | Ks], [V | Vs], Map) ->
+ store_list(Ks, Vs, maps:put(K, V, Map));
+store_list([], _, Map) ->
+ Map.
delete_list([K | Ks], Env) ->
delete_list(Ks, delete_any(K, Env));
@@ -298,48 +296,40 @@ delete_any(Key, Env) ->
-spec delete(term(), environment()) -> environment().
-delete(Key, [{map, Dict} = E | Env]) ->
- case dict:is_key(Key, Dict) of
- true ->
- [{map, dict:erase(Key, Dict)} | Env];
- false ->
+delete(Key, [{map, Map} = E | Env]) ->
+ case maps:take(Key, Map) of
+ {_, Map1} ->
+ [{map, Map1} | Env];
+ error ->
delete_1(Key, Env, E)
end;
-delete(Key, [{rec, Dict, Dict0} = E | Env]) ->
- case dict:is_key(Key, Dict) of
- true ->
- %% The Dict0 component must be preserved as it is until all
- %% keys in Dict have been deleted.
- Dict1 = dict:erase(Key, Dict),
- case dict:size(Dict1) of
- 0 ->
- Env; % the whole {rec,...} is now garbage
- _ ->
- [{rec, Dict1, Dict0} | Env]
- end;
- false ->
+delete(Key, [{rec, Map, Map0} = E | Env]) ->
+ case maps:take(Key, Map) of
+ {_, Map1} when map_size(Map1) =:= 0 ->
+ Env; % the whole {rec,...} is now garbage
+ %% The Map0 component must be preserved as it is until all
+ %% keys in Map have been deleted.
+ {_, Map1} ->
+ [{rec, Map1, Map0} | Env];
+ error ->
[E | delete(Key, Env)]
end.
%% This is just like above, except we pass on the preceding 'map'
%% mapping in the list to enable merging when removing 'rec' mappings.
-delete_1(Key, [{rec, Dict, Dict0} = E | Env], E1) ->
- case dict:is_key(Key, Dict) of
- true ->
- Dict1 = dict:erase(Key, Dict),
- case dict:size(Dict1) of
- 0 ->
- concat(E1, Env);
- _ ->
- [E1, {rec, Dict1, Dict0} | Env]
- end;
- false ->
+delete_1(Key, [{rec, Map, Map0} = E | Env], E1) ->
+ case maps:take(Key, Map) of
+ {_, Map1} when map_size(Map1) =:= 0 ->
+ concat(E1, Env);
+ {_, Map1} ->
+ [E1, {rec, Map1, Map0} | Env];
+ error ->
[E1, E | delete(Key, Env)]
end.
-concat({map, D1}, [{map, D2} | Env]) ->
- [dict:merge(fun (_K, V1, _V2) -> V1 end, D1, D2) | Env];
+concat({map, M1}, [{map, M2} | Env]) ->
+ [maps:merge(M2, M1) | Env];
concat(E1, Env) ->
[E1 | Env].
@@ -392,15 +382,15 @@ bind_recursive([], [], _, Env) ->
Env;
bind_recursive(Ks, Vs, F, Env) ->
F1 = fun (V) ->
- fun (Dict) -> F(V, [{rec, Dict, Dict} | Env]) end
+ fun (Map) -> F(V, [{rec, Map, Map} | Env]) end
end,
- Dict = bind_recursive_1(Ks, Vs, F1, dict:new()),
- [{rec, Dict, Dict} | Env].
+ Map = bind_recursive_1(Ks, Vs, F1, #{}),
+ [{rec, Map, Map} | Env].
-bind_recursive_1([K | Ks], [V | Vs], F, Dict) ->
- bind_recursive_1(Ks, Vs, F, dict:store(K, F(V), Dict));
-bind_recursive_1([], [], _, Dict) ->
- Dict.
+bind_recursive_1([K | Ks], [V | Vs], F, Map) ->
+ bind_recursive_1(Ks, Vs, F, maps:put(K, F(V), Map));
+bind_recursive_1([], [], _, Map) ->
+ Map.
%% =====================================================================
@@ -416,8 +406,8 @@ bind_recursive_1([], [], _, Dict) ->
-spec lookup(term(), environment()) -> 'error' | {'ok', term()}.
-lookup(Key, [{map, Dict} | Env]) ->
- case dict:find(Key, Dict) of
+lookup(Key, [{map, Map} | Env]) ->
+ case maps:find(Key, Map) of
{ok, _}=Value ->
Value;
error when Env =:= [] ->
@@ -425,10 +415,10 @@ lookup(Key, [{map, Dict} | Env]) ->
error ->
lookup(Key, Env)
end;
-lookup(Key, [{rec, Dict, Dict0} | Env]) ->
- case dict:find(Key, Dict) of
+lookup(Key, [{rec, Map, Map0} | Env]) ->
+ case maps:find(Key, Map) of
{ok, F} ->
- {ok, F(Dict0)};
+ {ok, F(Map0)};
error ->
lookup(Key, Env)
end.
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index dbc27db377..e0de50f3ae 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -786,7 +786,7 @@ fold_lit_args(Call, Module, Name, Args0) ->
Val ->
case cerl:is_literal_term(Val) of
true ->
- cerl:abstract(Val);
+ cerl:ann_abstract(cerl:get_ann(Call), Val);
false ->
%% Successful evaluation, but it was not possible
%% to express the computed value as a literal.
@@ -2176,24 +2176,22 @@ opt_not_in_let_1(V, Call, Body) ->
#c_call{module=#c_literal{val=erlang},
name=#c_literal{val='not'},
args=[#c_var{name=V}]} ->
- opt_not_in_let_2(Body);
+ opt_not_in_let_2(Body, Call);
_ ->
no
end.
-opt_not_in_let_2(#c_case{clauses=Cs0}=Case) ->
+opt_not_in_let_2(#c_case{clauses=Cs0}=Case, NotCall) ->
Vars = make_vars([], 1),
- Body = #c_call{module=#c_literal{val=erlang},
- name=#c_literal{val='not'},
- args=Vars},
+ Body = NotCall#c_call{args=Vars},
Cs = [begin
Let = #c_let{vars=Vars,arg=B,body=Body},
C#c_clause{body=opt_not_in_let(Let)}
end || #c_clause{body=B}=C <- Cs0],
{yes,Case#c_case{clauses=Cs}};
-opt_not_in_let_2(#c_call{}=Call0) ->
+opt_not_in_let_2(#c_call{}=Call0, _NotCall) ->
invert_call(Call0);
-opt_not_in_let_2(_) -> no.
+opt_not_in_let_2(_, _) -> no.
invert_call(#c_call{module=#c_literal{val=erlang},
name=#c_literal{val=Name0},
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index f531056591..4df1aadd0a 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -1089,6 +1089,23 @@ protected_cg(Ts, Rs, _Fail, I, Vdb, Bef, St0) ->
%% test_cg(TestName, Args, Fail, I, Vdb, Bef, St) -> {[Ainstr],Aft,St}.
%% Generate test instruction. Use explicit fail label here.
+test_cg(is_map, [A], Fail, I, Vdb, Bef, St) ->
+ %% We must avoid creating code like this:
+ %%
+ %% move x(0) y(0)
+ %% is_map Fail [x(0)]
+ %% make_fun => x(0) %% Overwrite x(0)
+ %% put_map_assoc y(0) ...
+ %%
+ %% The code is safe, but beam_validator does not understand that.
+ %% Extending beam_validator to handle such (rare) code as the
+ %% above would make it slower for all programs. Instead, change
+ %% the code generator to always prefer the Y register for is_map()
+ %% and put_map_assoc() instructions, ensuring that they use the
+ %% same register.
+ Arg = cg_reg_arg_prefer_y(A, Bef),
+ Aft = clear_dead(Bef, I, Vdb),
+ {[{test,is_map,{f,Fail},[Arg]}],Aft,St};
test_cg(Test, As, Fail, I, Vdb, Bef, St) ->
Args = cg_reg_args(As, Bef),
Aft = clear_dead(Bef, I, Vdb),
@@ -1155,19 +1172,15 @@ call_cg(Func, As, Rs, Le, Vdb, Bef, St0) ->
%% Inside a guard. The only allowed function call is to
%% erlang:error/1,2. We will generate the following code:
%%
- %% jump FailureLabel
%% move {atom,ok} DestReg
- %%
- %% The 'move' instruction will never be executed, but we
- %% generate it anyway in case the beam_validator is run
- %% on unoptimized code.
+ %% jump FailureLabel
{remote,{atom,erlang},{atom,error}} = Func, %Assertion.
[{var,DestVar}] = Rs,
Int0 = clear_dead(Bef, Le#l.i, Vdb),
Reg = put_reg(DestVar, Int0#sr.reg),
Int = Int0#sr{reg=Reg},
Dst = fetch_reg(DestVar, Reg),
- {[{jump,{f,Fail}},{move,{atom,ok},Dst}],
+ {[{move,{atom,ok},Dst},{jump,{f,Fail}}],
clear_dead(Int, Le#l.i, Vdb),St0};
#cg{} ->
%% Ordinary function call in a function body.
@@ -1538,14 +1551,12 @@ set_cg([{var,R}], {binary,Segs}, Le, Vdb, Bef, #cg{bfail=Bfail}=St) ->
%% Now generate the complete code for constructing the binary.
Code = cg_binary(PutCode, Target, Temp, Fail, MaxRegs, Le#l.a),
{Sis++Code,Aft,St};
-% Map single variable key
-set_cg([{var,R}], {map,Op,Map,[{map_pair,{var,_}=K,V}]}, Le, Vdb, Bef,
- #cg{bfail=Bfail}=St) ->
- Fail = {f,Bfail},
- {Sis,Int0} = maybe_adjust_stack(Bef, Le#l.i, Le#l.i+1, Vdb, St),
+%% Map: single variable key.
+set_cg([{var,R}], {map,Op,Map,[{map_pair,{var,_}=K,V}]}, Le, Vdb, Bef, St0) ->
+ {Sis,Int0} = maybe_adjust_stack(Bef, Le#l.i, Le#l.i+1, Vdb, St0),
- SrcReg = cg_reg_arg(Map,Int0),
+ SrcReg = cg_reg_arg_prefer_y(Map, Int0),
Line = line(Le#l.a),
List = [cg_reg_arg(K,Int0),cg_reg_arg(V,Int0)],
@@ -1557,22 +1568,17 @@ set_cg([{var,R}], {map,Op,Map,[{map_pair,{var,_}=K,V}]}, Le, Vdb, Bef,
Aft = Aft0#sr{reg=put_reg(R, Aft0#sr.reg)},
Target = fetch_reg(R, Aft#sr.reg),
- I = case Op of
- assoc -> put_map_assoc;
- exact -> put_map_exact
- end,
- {Sis++[Line]++[{I,Fail,SrcReg,Target,Live,{list,List}}],Aft,St};
+ {Is,St1} = set_cg_map(Line, Op, SrcReg, Target, Live, List, St0),
+ {Sis++Is,Aft,St1};
-% Map (possibly) multiple literal keys
-set_cg([{var,R}], {map,Op,Map,Es}, Le, Vdb, Bef,
- #cg{bfail=Bfail}=St) ->
+%% Map: (possibly) multiple literal keys.
+set_cg([{var,R}], {map,Op,Map,Es}, Le, Vdb, Bef, St0) ->
%% assert key literals
[] = [Var||{map_pair,{var,_}=Var,_} <- Es],
- Fail = {f,Bfail},
- {Sis,Int0} = maybe_adjust_stack(Bef, Le#l.i, Le#l.i+1, Vdb, St),
- SrcReg = cg_reg_arg(Map,Int0),
+ {Sis,Int0} = maybe_adjust_stack(Bef, Le#l.i, Le#l.i+1, Vdb, St0),
+ SrcReg = cg_reg_arg_prefer_y(Map, Int0),
Line = line(Le#l.a),
%% fetch registers for values to be put into the map
@@ -1586,11 +1592,10 @@ set_cg([{var,R}], {map,Op,Map,Es}, Le, Vdb, Bef,
Aft = Aft0#sr{reg=put_reg(R, Aft0#sr.reg)},
Target = fetch_reg(R, Aft#sr.reg),
- I = case Op of
- assoc -> put_map_assoc;
- exact -> put_map_exact
- end,
- {Sis++[Line]++[{I,Fail,SrcReg,Target,Live,{list,List}}],Aft,St};
+ {Is,St1} = set_cg_map(Line, Op, SrcReg, Target, Live, List, St0),
+ {Sis++Is,Aft,St1};
+
+%% Everything else.
set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
%% Find a place for the return register first.
Int = Bef#sr{reg=put_reg(R, Bef#sr.reg)},
@@ -1603,6 +1608,34 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
end,
{Ais,clear_dead(Int, Le#l.i, Vdb),St}.
+
+set_cg_map(Line, Op0, SrcReg, Target, Live, List, St0) ->
+ Bfail = St0#cg.bfail,
+ Fail = {f,St0#cg.bfail},
+ Op = case Op0 of
+ assoc -> put_map_assoc;
+ exact -> put_map_exact
+ end,
+ {OkLbl,St1} = new_label(St0),
+ {BadLbl,St2} = new_label(St1),
+ Is = if
+ Bfail =:= 0 orelse Op =:= put_map_assoc ->
+ [Line,{Op,{f,0},SrcReg,Target,Live,{list,List}}];
+ true ->
+ %% Ensure that Target is always set, even if
+ %% the map update operation fails. That is necessary
+ %% because Target may be included in a test_heap
+ %% instruction.
+ [Line,
+ {Op,{f,BadLbl},SrcReg,Target,Live,{list,List}},
+ {jump,{f,OkLbl}},
+ {label,BadLbl},
+ {move,{atom,ok},Target},
+ {jump,Fail},
+ {label,OkLbl}]
+ end,
+ {Is,St2}.
+
%%%
%%% Code generation for constructing binaries.
%%%
@@ -1845,6 +1878,9 @@ cg_reg_args(As, Bef) -> [cg_reg_arg(A, Bef) || A <- As].
cg_reg_arg({var,V}, Bef) -> fetch_var(V, Bef);
cg_reg_arg(Literal, _) -> Literal.
+cg_reg_arg_prefer_y({var,V}, Bef) -> fetch_var_prefer_y(V, Bef);
+cg_reg_arg_prefer_y(Literal, _) -> Literal.
+
%% cg_setup_call([Arg], Bef, Cur, Vdb) -> {[Instr],Aft}.
%% Do the complete setup for a call/enter.
@@ -2086,6 +2122,12 @@ fetch_var(V, Sr) ->
error -> fetch_stack(V, Sr#sr.stk)
end.
+fetch_var_prefer_y(V, #sr{reg=Reg,stk=Stk}) ->
+ case find_stack(V, Stk) of
+ {ok,R} -> R;
+ error -> fetch_reg(V, Reg)
+ end.
+
load_vars(Vs, Regs) ->
foldl(fun ({var,V}, Rs) -> put_reg(V, Rs) end, Regs, Vs).
@@ -2159,11 +2201,11 @@ fetch_stack(Var, Stk) -> fetch_stack(Var, Stk, 0).
fetch_stack(V, [{V}|_], I) -> {yy,I};
fetch_stack(V, [_|Stk], I) -> fetch_stack(V, Stk, I+1).
-% find_stack(Var, Stk) -> find_stack(Var, Stk, 0).
+find_stack(Var, Stk) -> find_stack(Var, Stk, 0).
-% find_stack(V, [{V}|Stk], I) -> {ok,{yy,I}};
-% find_stack(V, [O|Stk], I) -> find_stack(V, Stk, I+1);
-% find_stack(V, [], I) -> error.
+find_stack(V, [{V}|_], I) -> {ok,{yy,I}};
+find_stack(V, [_|Stk], I) -> find_stack(V, Stk, I+1);
+find_stack(_, [], _) -> error.
on_stack(V, Stk) -> keymember(V, 1, Stk).
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index a3b0236134..d71411de80 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -868,12 +868,16 @@ try_exception(Ecs0, St0) ->
{Evs,St1} = new_vars(3, St0), % Tag, Value, Info
{Ecs1,Ceps,St2} = clauses(Ecs0, St1),
[_,Value,Info] = Evs,
- Ec = #iclause{anno=#a{anno=[compiler_generated]},
+ LA = case Ecs1 of
+ [] -> [];
+ [C|_] -> get_lineno_anno(C)
+ end,
+ Ec = #iclause{anno=#a{anno=[compiler_generated|LA]},
pats=[c_tuple(Evs)],guard=[#c_literal{val=true}],
body=[#iprimop{anno=#a{}, %Must have an #a{}
name=#c_literal{val=raise},
args=[Info,Value]}]},
- Hs = [#icase{anno=#a{},args=[c_tuple(Evs)],clauses=Ecs1,fc=Ec}],
+ Hs = [#icase{anno=#a{anno=LA},args=[c_tuple(Evs)],clauses=Ecs1,fc=Ec}],
{Evs,Ceps++Hs,St2}.
try_after(As, St0) ->
@@ -2098,7 +2102,8 @@ upattern(#c_var{name=V}=Var, Ks, St0) ->
true ->
{N,St1} = new_var_name(St0),
New = #c_var{name=N},
- Test = #icall{anno=#a{us=add_element(N, [V])},
+ LA = get_lineno_anno(Var),
+ Test = #icall{anno=#a{anno=LA,us=add_element(N, [V])},
module=#c_literal{val=erlang},
name=#c_literal{val='=:='},
args=[New,Var]},
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl
index 402e3c4912..b4bbc5e739 100644
--- a/lib/compiler/src/v3_kernel.erl
+++ b/lib/compiler/src/v3_kernel.erl
@@ -242,7 +242,7 @@ gexpr_test_add(Ke, St0) ->
expr(#c_var{anno=A,name={_Name,Arity}}=Fname, Sub, St) ->
%% A local in an expression.
%% For now, these are wrapped into a fun by reverse
- %% etha-conversion, but really, there should be exactly one
+ %% eta-conversion, but really, there should be exactly one
%% such "lambda function" for each escaping local name,
%% instead of one for each occurrence as done now.
Vs = [#c_var{name=list_to_atom("V" ++ integer_to_list(V))} ||
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index 203a50db55..f0185acbc7 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -13,9 +13,11 @@ MODULES= \
beam_validator_SUITE \
beam_disasm_SUITE \
beam_except_SUITE \
+ beam_jump_SUITE \
beam_reorder_SUITE \
beam_type_SUITE \
beam_utils_SUITE \
+ bif_SUITE \
bs_bincomp_SUITE \
bs_bit_binaries_SUITE \
bs_construct_SUITE \
@@ -49,9 +51,11 @@ NO_OPT= \
beam_block \
beam_bool \
beam_except \
+ beam_jump \
beam_reorder \
beam_type \
beam_utils \
+ bif \
bs_construct \
bs_match \
bs_utf \
diff --git a/lib/compiler/test/beam_block_SUITE.erl b/lib/compiler/test/beam_block_SUITE.erl
index d343e26737..4bcb252833 100644
--- a/lib/compiler/test/beam_block_SUITE.erl
+++ b/lib/compiler/test/beam_block_SUITE.erl
@@ -21,7 +21,7 @@
-export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1,
init_per_group/2,end_per_group/2,
- get_map_elements/1,otp_7345/1]).
+ get_map_elements/1,otp_7345/1,move_opt_across_gc_bif/1]).
%% The only test for the following functions is that
%% the code compiles and is accepted by beam_validator.
@@ -36,7 +36,8 @@ all() ->
groups() ->
[{p,[parallel],
[get_map_elements,
- otp_7345
+ otp_7345,
+ move_opt_across_gc_bif
]}].
init_per_suite(Config) ->
@@ -118,6 +119,22 @@ otp_7345(ObjRef, _RdEnv, Args) ->
10},
id(LlUnitdataReq).
+
+%% Doing move optimizations across GC bifs are in general not safe.
+move_opt_across_gc_bif(_Config) ->
+ [0,true,1] = positive(speaking),
+ ok.
+
+positive(speaking) ->
+ try
+ Positive = 0,
+ [+Positive, case Positive of _ -> true end, paris([], Positive)]
+ after
+ mailing
+ end.
+
+paris([], P) -> P + 1.
+
%%%
%%% The only test of the following code is that it compiles.
%%%
diff --git a/lib/compiler/test/beam_except_SUITE.erl b/lib/compiler/test/beam_except_SUITE.erl
index 8746e62fb9..47367d6eab 100644
--- a/lib/compiler/test/beam_except_SUITE.erl
+++ b/lib/compiler/test/beam_except_SUITE.erl
@@ -21,15 +21,18 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
- coverage/1]).
+ multiple_allocs/1,coverage/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [coverage].
+ test_lib:recompile(?MODULE),
+ [{group,p}].
groups() ->
- [].
+ [{p,[parallel],
+ [multiple_allocs,
+ coverage]}].
init_per_suite(Config) ->
Config.
@@ -43,6 +46,23 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+multiple_allocs(_Config) ->
+ {'EXIT',{{badmatch,#{true:=[p]}},_}} =
+ (catch could(pda, 0.0, {false,true}, {p})),
+ {'EXIT',{function_clause,_}} = (catch place(lee)),
+ {'EXIT',{{badmatch,wanted},_}} = (catch conditions()),
+
+ ok.
+
+could(Coupons = pda, Favorite = _pleasure = 0.0, {_, true}, {Presents}) ->
+ (0 = true) = #{true => [Presents]}.
+
+place(lee) ->
+ (pregnancy = presentations) = [hours | [purchase || _ <- 0]] + wine.
+
+conditions() ->
+ (talking = going) = storage + [large = wanted].
+
coverage(_) ->
File = {file,"fake.erl"},
ok = fc(a),
diff --git a/lib/compiler/test/beam_jump_SUITE.erl b/lib/compiler/test/beam_jump_SUITE.erl
new file mode 100644
index 0000000000..0b13adaff2
--- /dev/null
+++ b/lib/compiler/test/beam_jump_SUITE.erl
@@ -0,0 +1,59 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(beam_jump_SUITE).
+
+-export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1,
+ init_per_group/2,end_per_group/2,
+ undefined_label/1]).
+
+suite() ->
+ [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ test_lib:recompile(?MODULE),
+ [{group,p}].
+
+groups() ->
+ [{p,[parallel],
+ [undefined_label
+ ]}].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+undefined_label(_Config) ->
+ {'EXIT',{function_clause,_}} = (catch flights(0, [], [])),
+ ok.
+
+%% Would lose a label when compiled with no_copt.
+
+flights(0, [], []) when [], 0; 0.0, [], false ->
+ clark;
+flights(_, Reproduction, introduction) when false, Reproduction ->
+ responsible.
diff --git a/lib/compiler/test/beam_utils_SUITE.erl b/lib/compiler/test/beam_utils_SUITE.erl
index ae813d563b..f6d4a311bb 100644
--- a/lib/compiler/test/beam_utils_SUITE.erl
+++ b/lib/compiler/test/beam_utils_SUITE.erl
@@ -23,7 +23,8 @@
init_per_group/2,end_per_group/2,
apply_fun/1,apply_mf/1,bs_init/1,bs_save/1,
is_not_killed/1,is_not_used_at/1,
- select/1,y_catch/1,otp_8949_b/1,liveopt/1,coverage/1]).
+ select/1,y_catch/1,otp_8949_b/1,liveopt/1,coverage/1,
+ y_registers/1]).
-export([id/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -44,7 +45,8 @@ groups() ->
y_catch,
otp_8949_b,
liveopt,
- coverage
+ coverage,
+ y_registers
]}].
init_per_suite(Config) ->
@@ -311,6 +313,45 @@ clinic(Damage) ->
end,
carefully.
+y_registers(_Config) ->
+ {'EXIT',{{badfun,0},_}} = (catch economic(0.0, jim)),
+ {'EXIT',{{badmatch,apartments},_}} = (catch louisiana()),
+ {a,b} = (boxes(true))({a,b}),
+ {'EXIT',{{case_clause,webmaster},_}} = (catch yellow(true)),
+ ok.
+
+economic(0.0 = Serves, Existence) ->
+ case Serves of
+ Serves -> 0
+ end,
+ Existence = jim,
+ 0(),
+ Serves,
+ Existence.
+
+louisiana() ->
+ {catch necessarily,
+ try
+ [] == reg,
+ true = apartments
+ catch [] -> barbara
+ end}.
+
+boxes(Call) ->
+ case Call of
+ Call -> approval
+ end,
+ Call,
+ fun id/1.
+
+yellow(Hill) ->
+ case webmaster of
+ station -> eyes; Hill ->
+ "under"
+ end,
+ Hill,
+ id(42).
+
%% The identity function.
id(I) -> I.
diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl
index 7c4e88ca3e..263fd2ca7e 100644
--- a/lib/compiler/test/beam_validator_SUITE.erl
+++ b/lib/compiler/test/beam_validator_SUITE.erl
@@ -32,7 +32,7 @@
bad_bin_match/1,bad_dsetel/1,
state_after_fault_in_catch/1,no_exception_in_catch/1,
undef_label/1,illegal_instruction/1,failing_gc_guard_bif/1,
- map_field_lists/1]).
+ map_field_lists/1,cover_bin_opt/1]).
-include_lib("common_test/include/ct.hrl").
@@ -60,7 +60,7 @@ groups() ->
freg_state,bad_bin_match,bad_dsetel,
state_after_fault_in_catch,no_exception_in_catch,
undef_label,illegal_instruction,failing_gc_guard_bif,
- map_field_lists]}].
+ map_field_lists,cover_bin_opt]}].
init_per_suite(Config) ->
Config.
@@ -406,8 +406,124 @@ map_field_lists(Config) ->
empty_field_list}}
] = Errors.
+%% Coverage and smoke test of beam_validator.
+cover_bin_opt(_Config) ->
+ Ms = [beam_utils_SUITE,
+ bs_match_SUITE,
+ bs_bincomp_SUITE,
+ bs_bit_binaries_SUITE,
+ bs_utf_SUITE],
+ test_lib:p_run(fun try_bin_opt/1, Ms),
+ ok.
+
+try_bin_opt(Mod) ->
+ try
+ do_bin_opt(Mod)
+ catch
+ Class:Error ->
+ io:format("~p: ~p ~p\n~p\n",
+ [Mod,Class,Error,erlang:get_stacktrace()]),
+ error
+ end.
+
+do_bin_opt(Mod) ->
+ Beam = code:which(Mod),
+ {ok,{Mod,[{abstract_code,
+ {raw_abstract_v1,Abstr}}]}} =
+ beam_lib:chunks(Beam, [abstract_code]),
+ {ok,Mod,Asm} = compile:forms(Abstr, ['S']),
+ do_bin_opt(Mod, Asm).
+
+do_bin_opt(Mod, Asm) ->
+ do_bin_opt(fun enable_bin_opt/1, Mod, Asm),
+ do_bin_opt(fun remove_bs_start_match/1, Mod, Asm),
+ do_bin_opt(fun remove_bs_save/1, Mod, Asm),
+ do_bin_opt(fun destroy_ctxt/1, Mod, Asm),
+ do_bin_opt(fun destroy_save_point/1, Mod, Asm),
+ ok.
+
+do_bin_opt(Transform, Mod, Asm0) ->
+ Asm = Transform(Asm0),
+ case compile:forms(Asm, [from_asm,no_postopt,return]) of
+ {ok,[],Code,_Warnings} when is_binary(Code) ->
+ ok;
+ {error,Errors0,_} ->
+ %% beam_validator must return errors, not simply crash,
+ %% when illegal code is found.
+ ModString = atom_to_list(Mod),
+ [{ModString,Errors}] = Errors0,
+ _ = [verify_bin_opt_error(E) || E <- Errors],
+ ok
+ end.
+
+verify_bin_opt_error({beam_validator,_}) ->
+ ok.
+
+enable_bin_opt(Module) ->
+ transform_is(fun enable_bin_opt_body/1, Module).
+
+enable_bin_opt_body([_,{'%',{no_bin_opt,_Reason,_Anno}}|Is]) ->
+ enable_bin_opt_body(Is);
+enable_bin_opt_body([I|Is]) ->
+ [I|enable_bin_opt_body(Is)];
+enable_bin_opt_body([]) ->
+ [].
+
+remove_bs_start_match(Module) ->
+ transform_remove(fun({test,bs_start_match2,_,_,_,_}) -> true;
+ (_) -> false
+ end, Module).
+
+remove_bs_save(Module) ->
+ transform_remove(fun({bs_save2,_,_}) -> true;
+ (_) -> false
+ end, Module).
+
+destroy_save_point(Module) ->
+ transform_i(fun do_destroy_save_point/1, Module).
+
+do_destroy_save_point({I,Ctx,_Point})
+ when I =:= bs_save2; I =:= bs_restore2 ->
+ {I,Ctx,42};
+do_destroy_save_point(I) ->
+ I.
+
+destroy_ctxt(Module) ->
+ transform_i(fun do_destroy_ctxt/1, Module).
+
+do_destroy_ctxt({bs_save2=I,Ctx,Point}) ->
+ {I,destroy_reg(Ctx),Point};
+do_destroy_ctxt({bs_restore2=I,Ctx,Point}) ->
+ {I,destroy_reg(Ctx),Point};
+do_destroy_ctxt({bs_context_to_binary=I,Ctx}) ->
+ {I,destroy_reg(Ctx)};
+do_destroy_ctxt(I) ->
+ I.
+
+destroy_reg({Tag,N}) ->
+ case rand:uniform() of
+ R when R < 0.6 ->
+ {Tag,N+1};
+ _ ->
+ {y,N+1}
+ end.
+
%%%-------------------------------------------------------------------------
+transform_remove(Remove, Module) ->
+ transform_is(fun(Is) -> [I || I <- Is, not Remove(I)] end, Module).
+
+transform_i(Transform, Module) ->
+ transform_is(fun(Is) -> [Transform(I) || I <- Is] end, Module).
+
+transform_is(Transform, {Mod,Exp,Imp,Fs0,Lc}) ->
+ Fs = [transform_is_1(Transform, F) || F <- Fs0],
+ {Mod,Exp,Imp,Fs,Lc}.
+
+transform_is_1(Transform, {function,N,A,E,Is0}) ->
+ Is = Transform(Is0),
+ {function,N,A,E,Is}.
+
do_val(Mod, Config) ->
Data = proplists:get_value(data_dir, Config),
Base = atom_to_list(Mod),
diff --git a/lib/compiler/test/bif_SUITE.erl b/lib/compiler/test/bif_SUITE.erl
new file mode 100644
index 0000000000..51bc71da81
--- /dev/null
+++ b/lib/compiler/test/bif_SUITE.erl
@@ -0,0 +1,65 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(bif_SUITE).
+
+-export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1,
+ init_per_group/2,end_per_group/2,
+ beam_validator/1]).
+
+suite() ->
+ [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ test_lib:recompile(?MODULE),
+ [{group,p}].
+
+groups() ->
+ [{p,[parallel],
+ [beam_validator
+ ]}].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+%% Cover code in beam_validator.
+
+beam_validator(Config) ->
+ [false,Config] = food(Config),
+
+ true = is_number(42.0),
+ false = is_port(Config),
+
+ ok.
+
+food(Curriculum) ->
+ [try
+ is_bitstring(functions)
+ catch _ ->
+ 0
+ end, Curriculum].
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index a15efc2a00..b0148f7103 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -34,7 +34,7 @@
cover/1, env/1, core/1,
core_roundtrip/1, asm/1,
sys_pre_attributes/1, dialyzer/1,
- warnings/1, pre_load_check/1
+ warnings/1, pre_load_check/1, env_compiler_options/1
]).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -50,7 +50,8 @@ all() ->
other_output, encrypted_abstr,
strict_record,
cover, env, core, core_roundtrip, asm,
- sys_pre_attributes, dialyzer, warnings, pre_load_check].
+ sys_pre_attributes, dialyzer, warnings, pre_load_check,
+ env_compiler_options].
groups() ->
[].
@@ -1092,6 +1093,23 @@ compiler_modules() ->
FN = filename,
[list_to_atom(FN:rootname(FN:basename(M), ".beam")) || M <- Ms].
+%% Test that ERL_COMPILER_OPTIONS are correctly retrieved
+%% by env_compiler_options/0
+
+env_compiler_options(_Config) ->
+ Cases = [
+ {"bin_opt_info", [bin_opt_info]},
+ {"'S'", ['S']},
+ {"{source, \"test.erl\"}", [{source, "test.erl"}]},
+ {"[{d,macro_one,1},{d,macro_two}]", [{d, macro_one, 1}, {d, macro_two}]},
+ {"[warn_export_all, warn_export_vars]", [warn_export_all, warn_export_vars]}
+ ],
+ F = fun({Env, Expected}) ->
+ true = os:putenv("ERL_COMPILER_OPTIONS", Env),
+ Expected = compile:env_compiler_options()
+ end,
+ lists:foreach(F, Cases).
+
%%%
%%% Utilities.
%%%
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index 442b2d424c..376d2c8e9a 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -25,7 +25,8 @@
eq/1,nested_call_in_case/1,guard_try_catch/1,coverage/1,
unused_multiple_values_error/1,unused_multiple_values/1,
multiple_aliases/1,redundant_boolean_clauses/1,
- mixed_matching_clauses/1,unnecessary_building/1]).
+ mixed_matching_clauses/1,unnecessary_building/1,
+ no_no_file/1]).
-export([foo/0,foo/1,foo/2,foo/3]).
@@ -43,7 +44,8 @@ groups() ->
eq,nested_call_in_case,guard_try_catch,coverage,
unused_multiple_values_error,unused_multiple_values,
multiple_aliases,redundant_boolean_clauses,
- mixed_matching_clauses,unnecessary_building]}].
+ mixed_matching_clauses,unnecessary_building,
+ no_no_file]}].
init_per_suite(Config) ->
@@ -454,4 +456,47 @@ do_unnecessary_building_2({a,_,_}=T) ->
[_,_] = [T,none],
x}.
+%% This test tests that v3_core has provided annotations and that
+%% sys_core_fold retains them, so that warnings produced by
+%% sys_core_fold will have proper filenames and line numbers. Thus, no
+%% "no_file" warnings.
+no_no_file(_Config) ->
+ {'EXIT',{{case_clause,0},_}} = (catch source(true, any)),
+ surgery = (tim(#{reduction => any}))(),
+
+ false = soul(#{[] => true}),
+ {'EXIT',{{case_clause,true},_}} = (catch soul(#{[] => false})),
+
+ ok = experiment(),
+ ok.
+
+source(true, Activities) ->
+ case 0 of
+ Activities when [] ->
+ Activities
+ end.
+
+tim(#{reduction := Emergency}) ->
+ try
+ fun() -> surgery end
+ catch
+ _ when [] ->
+ planet
+ end.
+
+soul(#{[] := Properly}) ->
+ not case true of
+ Properly -> true;
+ Properly -> 0
+ end.
+
+experiment() ->
+ case kingdom of
+ _ ->
+ +case "map" of
+ _ -> 0.0
+ end
+ end,
+ ok.
+
id(I) -> I.
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl
index 83298e546e..6302f82f29 100644
--- a/lib/compiler/test/guard_SUITE.erl
+++ b/lib/compiler/test/guard_SUITE.erl
@@ -1835,6 +1835,8 @@ bad_guards(Config) when is_list(Config) ->
fc(catch bad_guards_3(not_a_map, [x])),
fc(catch bad_guards_3(42, [x])),
+ fc(catch bad_guards_4()),
+
ok.
%% beam_bool used to produce GC BIF instructions whose
@@ -1852,6 +1854,12 @@ bad_guards_2(M, [_]) when M#{a := 0, b => 0}, map_size(M) ->
bad_guards_3(M, [_]) when is_map(M) andalso M#{a := 0, b => 0}, length(M) ->
ok.
+%% v3_codegen would generate a jump to the failure label, but
+%% without initializing x(0). The code at the failure label expected
+%% x(0) to be initialized.
+
+bad_guards_4() when not (error#{}); {not 0.0} -> freedom.
+
%% Building maps in a guard in a 'catch' would crash v3_codegen.
guard_in_catch(_Config) ->
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
index 14d175b92c..36e82c1459 100644
--- a/lib/compiler/test/map_SUITE.erl
+++ b/lib/compiler/test/map_SUITE.erl
@@ -66,7 +66,9 @@
t_export/1,
%% errors in 18
- t_register_corruption/1
+ t_register_corruption/1,
+ t_bad_update/1
+
]).
suite() -> [].
@@ -117,7 +119,8 @@ all() ->
t_export,
%% errors in 18
- t_register_corruption
+ t_register_corruption,
+ t_bad_update
].
groups() -> [].
@@ -1284,6 +1287,7 @@ t_guard_update(Config) when is_list(Config) ->
first = map_guard_update(#{}, #{x=>first}),
second = map_guard_update(#{y=>old}, #{x=>second,y=>old}),
third = map_guard_update(#{x=>old,y=>old}, #{x=>third,y=>old}),
+ bad_map_guard_update(),
ok.
t_guard_update_large(Config) when is_list(Config) ->
@@ -1350,6 +1354,29 @@ map_guard_update(M1, M2) when M1#{x=>second} =:= M2 -> second;
map_guard_update(M1, M2) when M1#{x:=third} =:= M2 -> third;
map_guard_update(_, _) -> error.
+bad_map_guard_update() ->
+ do_bad_map_guard_update(fun burns/1),
+ do_bad_map_guard_update(fun turns/1),
+ ok.
+
+do_bad_map_guard_update(Fun) ->
+ do_bad_map_guard_update_1(Fun, #{}),
+ do_bad_map_guard_update_1(Fun, #{true=>1}),
+ ok.
+
+do_bad_map_guard_update_1(Fun, Value) ->
+ %% Note: The business with the seemingly redundant fun
+ %% disables inlining, which would otherwise change the
+ %% EXIT reason.
+ {'EXIT',{function_clause,_}} = (catch Fun(Value)),
+ ok.
+
+burns(Richmond) when not (Richmond#{true := 0}); [Richmond] ->
+ specification.
+
+turns(Richmond) when not (Richmond#{true => 0}); [Richmond] ->
+ specification.
+
t_guard_receive(Config) when is_list(Config) ->
M0 = #{ id => 0 },
Pid = spawn_link(fun() -> guard_receive_loop() end),
@@ -1922,6 +1949,19 @@ validate_frequency([{T,C}|Fs],Tf) ->
validate_frequency([], _) -> ok.
+t_bad_update(_Config) ->
+ {#{0.0:=Id},#{}} = properly(#{}),
+ 42 = Id(42),
+ {'EXIT',{{badmap,_},_}} = (catch increase(0)),
+ ok.
+
+properly(Item) ->
+ {Item#{0.0 => fun id/1},Item}.
+
+increase(Allows) ->
+ catch fun() -> Allows end#{[] => +Allows, "warranty" => fun id/1}.
+
+
%% aux
rand_terms(0) -> [];
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl
index f05fe6c943..f543f0d4de 100644
--- a/lib/compiler/test/misc_SUITE.erl
+++ b/lib/compiler/test/misc_SUITE.erl
@@ -256,12 +256,15 @@ silly_coverage(Config) when is_list(Config) ->
{jump,{f,42}}]}],99},
expect_error(fun() -> beam_clean:module(CleanInput, []) end),
- %% beam_peep
+ %% beam_peep. This is tricky. Use a select instruction with
+ %% an odd number of elements in the list to crash
+ %% prune_redundant_values/2 but not beam_clean:clean_labels/1.
PeepInput = {?MODULE,[{foo,0}],[],
[{function,foo,0,2,
[{label,1},
{func_info,{atom,?MODULE},{atom,foo},0},
- {label,2}|non_proper_list]}],99},
+ {label,2},{select,op,r,{f,2},[{f,2}]}]}],
+ 2},
expect_error(fun() -> beam_peep:module(PeepInput, []) end),
%% beam_bsm. This is tricky. Our function must be sane enough to not crash
diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl
index 3c397561fc..8304672558 100644
--- a/lib/compiler/test/receive_SUITE.erl
+++ b/lib/compiler/test/receive_SUITE.erl
@@ -118,8 +118,14 @@ coverage(Config) when is_list(Config) ->
59 = tuple_to_values(infinity, x),
61 = tuple_to_values(999999, x),
0 = tuple_to_values(1, x),
+
+ {'EXIT',{{badmap,[]},_}} = (catch monitor_plus_badmap(self())),
+
ok.
+monitor_plus_badmap(Pid) ->
+ monitor(process, Pid) + []#{}.
+
receive_all() ->
receive
Any ->
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 067e220863..7183c395ae 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -55,51 +55,69 @@
#include <openssl/evp.h>
#include <openssl/hmac.h>
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+
+/* Helper macro to construct a OPENSSL_VERSION_NUMBER.
+ * See openssl/opensslv.h
+ */
+#define OpenSSL_version(MAJ, MIN, FIX, P) \
+ ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf)
+
+#define OpenSSL_version_plain(MAJ, MIN, FIX) \
+ OpenSSL_version(MAJ,MIN,FIX,('a'-1))
+
+
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
#include <openssl/modes.h>
#endif
#include "crypto_callback.h"
-#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_SHA224) && defined(NID_sha224)\
- && !defined(OPENSSL_NO_SHA256) /* disabled like this in my sha.h (?) */
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
+ && !defined(OPENSSL_NO_SHA224) && defined(NID_sha224) \
+ && !defined(OPENSSL_NO_SHA256) /* disabled like this in my sha.h (?) */
# define HAVE_SHA224
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_SHA256) && defined(NID_sha256)
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
+ && !defined(OPENSSL_NO_SHA256) && defined(NID_sha256)
# define HAVE_SHA256
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_SHA384) && defined(NID_sha384)\
- && !defined(OPENSSL_NO_SHA512) /* disabled like this in my sha.h (?) */
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
+ && !defined(OPENSSL_NO_SHA384) && defined(NID_sha384)\
+ && !defined(OPENSSL_NO_SHA512) /* disabled like this in my sha.h (?) */
# define HAVE_SHA384
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_SHA512) && defined(NID_sha512)
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
+ && !defined(OPENSSL_NO_SHA512) && defined(NID_sha512)
# define HAVE_SHA512
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x0090705FL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,7,'e')
# define HAVE_DES_ede3_cfb_encrypt
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x009080ffL \
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,8,'o') \
&& !defined(OPENSSL_NO_EC) \
&& !defined(OPENSSL_NO_ECDH) \
&& !defined(OPENSSL_NO_ECDSA)
# define HAVE_EC
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x0090803fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,8,'c')
# define HAVE_AES_IGE
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,1)
# define HAVE_EVP_AES_CTR
# define HAVE_GCM
+# if OPENSSL_VERSION_NUMBER < OpenSSL_version(1,0,1,'d')
+# define HAVE_GCM_EVP_DECRYPT_BUG
+# endif
#endif
#if defined(NID_chacha20) && !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
# define HAVE_CHACHA20_POLY1305
#endif
-#if OPENSSL_VERSION_NUMBER <= 0x009080cfL
+#if OPENSSL_VERSION_NUMBER <= OpenSSL_version(0,9,8,'l')
# define HAVE_ECB_IVEC_BUG
#endif
@@ -244,6 +262,9 @@ static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+#ifdef HAVE_GCM_EVP_DECRYPT_BUG
+static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+#endif
static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
@@ -479,7 +500,7 @@ static struct cipher_type_t* get_cipher_type(ERL_NIF_TERM type, size_t key_len);
#define PRINTF_ERR1(FMT,A1)
#define PRINTF_ERR2(FMT,A1,A2)
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
/* Define resource types for OpenSSL context structures. */
static ErlNifResourceType* evp_md_ctx_rtype;
static void evp_md_ctx_dtor(ErlNifEnv* env, EVP_MD_CTX* ctx) {
@@ -578,7 +599,7 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info)
PRINTF_ERR0("CRYPTO: Could not open resource type 'hmac_context'");
return 0;
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
evp_md_ctx_rtype = enif_open_resource_type(env, NULL, "EVP_MD_CTX",
(ErlNifResourceDtor*) evp_md_ctx_dtor,
ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER,
@@ -877,7 +898,7 @@ static ERL_NIF_TERM hash_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
return ret;
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
static ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Type) */
@@ -1253,7 +1274,7 @@ static ERL_NIF_TERM hmac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
obj = enif_alloc_resource(hmac_context_rtype, sizeof(struct hmac_context));
obj->mtx = enif_mutex_create("crypto.hmac");
obj->alive = 1;
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
// Check the return value of HMAC_Init: it may fail in FIPS mode
// for disabled algorithms
if (!HMAC_Init(&obj->ctx, key.data, key.size, digp->md.p)) {
@@ -1710,7 +1731,9 @@ out_err:
static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Key,Iv,AAD,In,Tag) */
-#if defined(HAVE_GCM)
+#if defined(HAVE_GCM_EVP_DECRYPT_BUG)
+ return aes_gcm_decrypt_NO_EVP(env, argc, argv);
+#elif defined(HAVE_GCM)
EVP_CIPHER_CTX ctx;
const EVP_CIPHER *cipher = NULL;
ErlNifBinary key, iv, aad, in, tag;
@@ -1763,12 +1786,58 @@ static ERL_NIF_TERM aes_gcm_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM
out_err:
EVP_CIPHER_CTX_cleanup(&ctx);
return atom_error;
-
#else
return enif_raise_exception(env, atom_notsup);
#endif
}
+#ifdef HAVE_GCM_EVP_DECRYPT_BUG
+static ERL_NIF_TERM aes_gcm_decrypt_NO_EVP(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ GCM128_CONTEXT *ctx;
+ ErlNifBinary key, iv, aad, in, tag;
+ AES_KEY aes_key;
+ unsigned char *outp;
+ ERL_NIF_TERM out;
+
+ if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
+ || AES_set_encrypt_key(key.data, key.size*8, &aes_key) != 0
+ || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0
+ || !enif_inspect_iolist_as_binary(env, argv[2], &aad)
+ || !enif_inspect_iolist_as_binary(env, argv[3], &in)
+ || !enif_inspect_iolist_as_binary(env, argv[4], &tag)) {
+ return enif_make_badarg(env);
+ }
+
+ if (!(ctx = CRYPTO_gcm128_new(&aes_key, (block128_f)AES_encrypt)))
+ return atom_error;
+
+ CRYPTO_gcm128_setiv(ctx, iv.data, iv.size);
+
+ if (CRYPTO_gcm128_aad(ctx, aad.data, aad.size))
+ goto out_err;
+
+ outp = enif_make_new_binary(env, in.size, &out);
+
+ /* decrypt */
+ if (CRYPTO_gcm128_decrypt(ctx, in.data, outp, in.size))
+ goto out_err;
+
+ /* calculate and check the tag */
+ if (CRYPTO_gcm128_finish(ctx, tag.data, tag.size))
+ goto out_err;
+
+ CRYPTO_gcm128_release(ctx);
+ CONSUME_REDS(env, in);
+
+ return out;
+
+out_err:
+ CRYPTO_gcm128_release(ctx);
+ return atom_error;
+}
+#endif /* HAVE_GCM_EVP_DECRYPT_BUG */
+
#if defined(HAVE_CHACHA20_POLY1305)
static void
poly1305_update_with_length(poly1305_state *poly1305,
@@ -2157,7 +2226,7 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ERL_NIF_TERM head, tail, ret;
int i;
RSA *rsa;
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
EVP_PKEY *pkey;
EVP_PKEY_CTX *ctx;
#endif
@@ -2189,7 +2258,7 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
goto done;
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
pkey = EVP_PKEY_new();
EVP_PKEY_set1_RSA(pkey, rsa);
@@ -2316,7 +2385,7 @@ static int get_rsa_private_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa)
static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Type, Digest, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C]) */
ErlNifBinary digest_bin, ret_bin;
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
EVP_PKEY *pkey;
EVP_PKEY_CTX *ctx;
size_t rsa_s_len;
@@ -2349,7 +2418,7 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
pkey = EVP_PKEY_new();
EVP_PKEY_set1_RSA(pkey, rsa);
rsa_s_len=(size_t)EVP_PKEY_size(pkey);
diff --git a/lib/debugger/src/dbg_debugged.erl b/lib/debugger/src/dbg_debugged.erl
index 5b1469a10e..e142af4ae0 100644
--- a/lib/debugger/src/dbg_debugged.erl
+++ b/lib/debugger/src/dbg_debugged.erl
@@ -70,7 +70,10 @@ msg_loop(Meta, Mref, SaveStacktrace) ->
%% Meta is evaluating a receive, must be done within context
%% of real (=this) process
{sys, Meta, {'receive',Msg}} ->
- receive Msg -> Meta ! {self(), rec_acked} end,
+ receive Msg ->
+ Meta ! {self(), rec_acked},
+ ok
+ end,
msg_loop(Meta, Mref, SaveStacktrace);
%% Meta needs something evaluated within context of real process
diff --git a/lib/debugger/src/dbg_icmd.erl b/lib/debugger/src/dbg_icmd.erl
index 1b274e20ae..57a3719a50 100644
--- a/lib/debugger/src/dbg_icmd.erl
+++ b/lib/debugger/src/dbg_icmd.erl
@@ -171,10 +171,10 @@ handle_cmd(Bs, Status, Ieval) ->
%% User control of process execution and settings
%%====================================================================
-step(Meta) -> Meta ! {user, {cmd, step}}.
-next(Meta) -> Meta ! {user, {cmd, next}}.
-continue(Meta) -> Meta ! {user, {cmd, continue}}.
-finish(Meta) -> Meta ! {user, {cmd, finish}}.
+step(Meta) -> Meta ! {user, {cmd, step}}, ok.
+next(Meta) -> Meta ! {user, {cmd, next}}, ok.
+continue(Meta) -> Meta ! {user, {cmd, continue}}, ok.
+finish(Meta) -> Meta ! {user, {cmd, finish}}, ok.
skip(Meta) -> Meta ! {user, {cmd, skip}}.
timeout(Meta) -> Meta ! {user, timeout}.
diff --git a/lib/debugger/src/dbg_iserver.erl b/lib/debugger/src/dbg_iserver.erl
index 0ad303d8d9..3561454685 100644
--- a/lib/debugger/src/dbg_iserver.erl
+++ b/lib/debugger/src/dbg_iserver.erl
@@ -72,17 +72,17 @@ cast(Int, Request) ->
gen_server:cast(Int, Request).
safe_call(Request) ->
- ensure_started(),
+ {ok, _} = ensure_started(),
call(Request).
safe_cast(Request) ->
- ensure_started(),
+ {ok, _} = ensure_started(),
cast(Request).
ensure_started() ->
case whereis(?MODULE) of
undefined -> start();
- _Pid -> ignore
+ Pid -> {ok, Pid}
end.
%%--Module database---------------------------------------------------
@@ -402,8 +402,10 @@ handle_cast({set_status, Meta, Status, Info}, State) ->
send_all(subscriber, {new_status, Proc#proc.pid, Status, Info}, State),
if
Status =:= break ->
- auto_attach(break, State#state.auto, Proc);
- true -> ignore
+ _ = auto_attach(break, State#state.auto, Proc),
+ ok;
+ true ->
+ ok
end,
Proc2 = Proc#proc{status=Status, info=Info},
{noreply, State#state{procs=lists:keyreplace(Meta, #proc.meta,
@@ -470,7 +472,7 @@ handle_info({'EXIT',Who,Why}, State) ->
[self(),AttPid,Pid,Why,ExitInfo]);
undefined ->
%% Otherwise, auto attach if necessary
- auto_attach(exit, State#state.auto, Pid),
+ _ = auto_attach(exit, State#state.auto, Pid),
Who
end,
send_all(subscriber, {new_status,Pid,exit,Why}, State),
@@ -583,7 +585,8 @@ send_all(Pids, Msg) ->
lists:foreach(fun(Pid) -> send(Pid, Msg) end, Pids).
send(Pid, Msg) ->
- Pid ! {int, Msg}.
+ Pid ! {int, Msg},
+ ok.
get_proc({Type, Pid}, Procs) ->
Index = case Type of
diff --git a/lib/debugger/src/dbg_wx_break_win.erl b/lib/debugger/src/dbg_wx_break_win.erl
index cd1e81456f..770681510d 100644
--- a/lib/debugger/src/dbg_wx_break_win.erl
+++ b/lib/debugger/src/dbg_wx_break_win.erl
@@ -65,18 +65,18 @@ create_win(Parent, Pos, function, Mod, _Line) ->
{choices, IntStrs}]),
Expand = [{border, 5}, {flag,?wxLEFT bor ?wxRIGHT bor ?wxEXPAND}],
- wxSizer:add(MainS, Label, [{border,5},
+ _ = wxSizer:add(MainS, Label, [{border,5},
{flag,?wxTOP bor ?wxLEFT bor ?wxRIGHT}]),
- wxSizer:add(MainS, Text, Expand),
+ _ = wxSizer:add(MainS, Text, Expand),
FunLabel = wxStaticText:new(Win, ?wxID_ANY, "Function:"),
LB = wxListBox:new(Win, ?wxID_ANY, [{size,{-1, 100}},{style,?wxLB_MULTIPLE}]),
- wxSizer:add(MainS, FunLabel, Expand),
- wxSizer:add(MainS, LB, [{proportion,1}|Expand]),
+ _ = wxSizer:add(MainS, FunLabel, Expand),
+ _ = wxSizer:add(MainS, LB, [{proportion,1}|Expand]),
wxSizer:setMinSize(MainS, 300, 400),
OK = wxDialog:createStdDialogButtonSizer(Win, ?wxOK bor ?wxCANCEL),
- wxSizer:add(MainS, OK, [{border,5},{flag,?wxALL}]),
+ _ = wxSizer:add(MainS, OK, [{border,5},{flag,?wxALL}]),
wxDialog:setSizer(Win,MainS),
- wxSizer:fit(MainS, Win),
+ _ = wxSizer:fit(MainS, Win),
wxSizer:setSizeHints(MainS,Win),
wxComboBox:setFocus(Text),
wxDialog:connect(Win, command_button_clicked),
@@ -110,11 +110,11 @@ create_win(Parent, Pos, Type, Mod, Line) ->
IntStrs = [atom_to_list(M) || M <- Int],
ModT = wxComboBox:new(Win, ?wxID_ANY, [{choices,IntStrs}]),
ModSz = create_label_of_control(Win, "Module:", ModT, Mod),
- wxSizer:add(MainS,ModSz,[{flag, ?wxEXPAND}]),
+ _ = wxSizer:add(MainS,ModSz,[{flag, ?wxEXPAND}]),
%% Create rest of text input fields
Add = fun({IType, Label, Def}) ->
{Sz, Text} = create_sizer_with_text(Win, Label, Def),
- wxSizer:add(MainS, Sz, [{flag, ?wxEXPAND}]),
+ _ = wxSizer:add(MainS, Sz, [{flag, ?wxEXPAND}]),
{Text, IType}
end,
Inputs = case Type of
@@ -129,15 +129,15 @@ create_win(Parent, Pos, Type, Mod, Line) ->
Entries = wx:map(Add, Inputs),
%% Create and add radio box
{TriggerBox,Trigger} = create_trigger_box(Win),
- wxSizer:add(MainS, TriggerBox, [{border,5},{flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(MainS, TriggerBox, [{border,5},{flag,?wxALL bor ?wxEXPAND}]),
- wxSizer:addStretchSpacer(MainS),
+ _ = wxSizer:addStretchSpacer(MainS),
%% Put it together
OK = wxDialog:createStdDialogButtonSizer(Win, ?wxOK bor ?wxCANCEL),
- wxSizer:add(MainS, OK, [{border,5},{flag,?wxALL}]),
+ _ = wxSizer:add(MainS, OK, [{border,5},{flag,?wxALL}]),
wxSizer:setMinSize(MainS, 300, -1),
wxDialog:setSizer(Win,MainS),
- wxSizer:fit(MainS, Win),
+ _ = wxSizer:fit(MainS, Win),
wxSizer:setSizeHints(MainS,Win),
wxComboBox:setFocus(ModT),
wxDialog:connect(Win, command_button_clicked),
@@ -243,8 +243,8 @@ create_label_of_control(Parent, Label, Control, Def) ->
Text = wxStaticText:new(Parent, ?wxID_ANY, Label),
Border = {border, 5},
Flag = ?wxRIGHT bor ?wxLEFT bor ?wxALIGN_CENTRE_VERTICAL,
- wxSizer:add(Sizer, Text, [{proportion,1}, {flag,Flag}, Border]),
- wxSizer:add(Sizer, Control, [{proportion,3}, {flag,Flag bor ?wxEXPAND}, Border]),
+ _ = wxSizer:add(Sizer, Text, [{proportion,1}, {flag,Flag}, Border]),
+ _ = wxSizer:add(Sizer, Control, [{proportion,3}, {flag,Flag bor ?wxEXPAND}, Border]),
wxControl:setLabel(Control, dbg_wx_win:to_string(Def)),
Sizer.
@@ -252,11 +252,11 @@ create_trigger_box(Win) ->
SBox = wxStaticBox:new(Win, ?wxID_ANY, "Trigger Action:"),
SBS = wxStaticBoxSizer:new(SBox, ?wxVERTICAL),
Ebtn = wxRadioButton:new(Win, ?wxID_ANY, "Enable"),
- wxSizer:add(SBS,Ebtn),
+ _ = wxSizer:add(SBS,Ebtn),
Dibtn = wxRadioButton:new(Win, ?wxID_ANY, "Disable"),
- wxSizer:add(SBS,Dibtn),
+ _ = wxSizer:add(SBS,Dibtn),
Debtn = wxRadioButton:new(Win, ?wxID_ANY, "Delete"),
- wxSizer:add(SBS,Debtn),
+ _ = wxSizer:add(SBS,Debtn),
wxRadioButton:setValue(Ebtn, true),
{SBS, [{Ebtn,enable},{Dibtn,disable},{Debtn,delete}]}.
diff --git a/lib/debugger/src/dbg_wx_code.erl b/lib/debugger/src/dbg_wx_code.erl
index f8fc331a81..473963500a 100644
--- a/lib/debugger/src/dbg_wx_code.erl
+++ b/lib/debugger/src/dbg_wx_code.erl
@@ -127,20 +127,22 @@ load_code(Ed, Code) ->
%%io:format("~p ~p ~p~n", [Lines, Sz, LW]),
?stc:setMarginWidth(Ed, 0, LW+5),
?stc:setReadOnly(Ed, true),
- Ed.
+ ok.
unload_code(Ed) ->
?stc:setReadOnly(Ed, false),
?stc:setTextRaw(Ed, <<0:8>>),
?stc:setReadOnly(Ed, true),
- Ed.
+ ok.
add_break_to_code(Ed, Line, active) ->
?stc:markerDelete(Ed, Line-1, 1),
- ?stc:markerAdd(Ed, Line-1, 0);
+ ?stc:markerAdd(Ed, Line-1, 0),
+ ok;
add_break_to_code(Ed, Line, inactive) ->
?stc:markerDelete(Ed, Line-1, 0),
- ?stc:markerAdd(Ed, Line-1, 1).
+ ?stc:markerAdd(Ed, Line-1, 1),
+ ok.
del_break_from_code(Ed,Line) ->
?stc:markerDelete(Ed, Line-1, 0),
diff --git a/lib/debugger/src/dbg_wx_filedialog_win.erl b/lib/debugger/src/dbg_wx_filedialog_win.erl
index 2103536a04..f7b031dc28 100644
--- a/lib/debugger/src/dbg_wx_filedialog_win.erl
+++ b/lib/debugger/src/dbg_wx_filedialog_win.erl
@@ -118,9 +118,9 @@ init([Parent, Id, Options0]) ->
wxTextCtrl:connect(Dir, char, [{callback, IsTab}]),
Top = wxBoxSizer:new(?wxHORIZONTAL),
- wxSizer:add(Top, Back, [{border, 2},{flag,?wxALL bor ?wxEXPAND}]),
- wxSizer:add(Top, Forw, [{border, 2},{flag,?wxALL bor ?wxEXPAND}]),
- wxSizer:add(Top, Up, [{border, 2},{flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(Top, Back, [{border, 2},{flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(Top, Forw, [{border, 2},{flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(Top, Up, [{border, 2},{flag,?wxALL bor ?wxEXPAND}]),
%% List Ctrl
{Art, IconMap} = create_icons(ExtraIcons),
@@ -154,13 +154,13 @@ init([Parent, Id, Options0]) ->
%% OK done
Box = wxBoxSizer:new(?wxVERTICAL),
- wxSizer:add(Box, Top, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}]),
- wxSizer:add(Box, Dir, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}]),
- wxSizer:add(Box, LC, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}, {proportion, 1}]),
- wxSizer:add(Box, Bott, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(Box, Top, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(Box, Dir, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(Box, LC, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}, {proportion, 1}]),
+ _ = wxSizer:add(Box, Bott, [{border, 2}, {flag,?wxALL bor ?wxEXPAND}]),
wxWindow:setSizer(Dlg, Box),
- wxSizer:fit(Box, Dlg),
+ _ = wxSizer:fit(Box, Dlg),
wxSizer:setSizeHints(Box,Dlg),
State = #state{win=Dlg,
back=Back, forward=Forw, up=Up,
diff --git a/lib/debugger/src/dbg_wx_mon.erl b/lib/debugger/src/dbg_wx_mon.erl
index 345367a911..a32a6894b8 100644
--- a/lib/debugger/src/dbg_wx_mon.erl
+++ b/lib/debugger/src/dbg_wx_mon.erl
@@ -135,7 +135,7 @@ init2(CallingPid, Mode, SFile, GS) ->
%% Start other necessary stuff
dbg_wx_win:init(),
- dbg_wx_winman:start(), % Debugger window manager
+ _ = dbg_wx_winman:start(), % Debugger window manager
%% Create monitor window
Title = "Monitor",
@@ -339,7 +339,7 @@ gui_cmd('Delete All Modules', State) ->
lists:foreach(fun(Mod) -> int:nn(Mod) end, int:interpreted()),
State;
gui_cmd({module, Mod, What}, State) ->
- case What of
+ _ = case What of
delete -> int:nn(Mod);
view ->
Window = dbg_wx_mon_win:get_window(State#state.win),
diff --git a/lib/debugger/src/dbg_wx_mon_win.erl b/lib/debugger/src/dbg_wx_mon_win.erl
index 2e48210f55..9737c9e67f 100644
--- a/lib/debugger/src/dbg_wx_mon_win.erl
+++ b/lib/debugger/src/dbg_wx_mon_win.erl
@@ -107,31 +107,31 @@ create_win_batch(Title, Menus) ->
Hlb = 200,
Listbox = wxListBox:new(Panel, ?wxID_ANY, [{size,{?Wf,Hlb}},
{style,?wxLB_SINGLE}]),
- wxSizer:add(LeftSz,Listbox,[{proportion,1},{border,3},{flag,?wxEXPAND}]),
+ _ = wxSizer:add(LeftSz,Listbox,[{proportion,1},{border,3},{flag,?wxEXPAND}]),
wxListBox:connect(Listbox, command_listbox_doubleclicked),
wxListBox:connect(Listbox, right_down),
SBox = wxStaticBox:new(Panel, ?wxID_ANY, "Auto Attach:"),
SBS = wxStaticBoxSizer:new(SBox, ?wxVERTICAL),
Fbtn = wxCheckBox:new(Panel, ?autoId, "First Call"),
- wxSizer:add(SBS,Fbtn),
+ _ = wxSizer:add(SBS,Fbtn),
Bbtn = wxCheckBox:new(Panel, ?autoId, "On Break"),
- wxSizer:add(SBS,Bbtn),
+ _ = wxSizer:add(SBS,Bbtn),
Ebtn = wxCheckBox:new(Panel, ?autoId, "On Exit"),
- wxSizer:add(SBS,Ebtn),
+ _ = wxSizer:add(SBS,Ebtn),
wxFrame:connect(Panel, command_checkbox_clicked),
- wxSizer:add(LeftSz,SBS, [{flag,?wxEXPAND}]),
+ _ = wxSizer:add(LeftSz,SBS, [{flag,?wxEXPAND}]),
SLabel = wxStaticText:new(Panel, ?wxID_ANY, "Stack Trace:\n On (with tail)"),
- wxSizer:add(LeftSz,SLabel),
+ _ = wxSizer:add(LeftSz,SLabel),
BLabel = wxStaticText:new(Panel, ?wxID_ANY, "Back Trace Size:\n 50000"),
- wxSizer:add(LeftSz,BLabel),
+ _ = wxSizer:add(LeftSz,BLabel),
StringsBox = wxStaticBox:new(Panel, ?wxID_ANY, "Strings:"),
StringsBS = wxStaticBoxSizer:new(StringsBox, ?wxVERTICAL),
Stringsbtn = wxCheckBox:new(Panel, ?stringsId, ?STRTEXT),
- wxSizer:add(StringsBS,Stringsbtn),
- wxSizer:add(LeftSz,StringsBS, [{flag,?wxEXPAND}]),
+ _ = wxSizer:add(StringsBS,Stringsbtn),
+ _ = wxSizer:add(LeftSz,StringsBS, [{flag,?wxEXPAND}]),
%% Create list_crtl / grid
Grid = wxListCtrl:new(Panel, [{winid, ?GRID},
@@ -169,12 +169,12 @@ create_win_batch(Title, Menus) ->
wxWindow:setFocus(Grid),
%% Put it in the window
- wxSizer:add(MainSz, LeftSz, [{border, 3}, {flag,?wxALL bor ?wxEXPAND}]),
- wxSizer:add(MainSz, Grid, [{border, 3}, {flag,?wxALL bor ?wxEXPAND},
+ _ = wxSizer:add(MainSz, LeftSz, [{border, 3}, {flag,?wxALL bor ?wxEXPAND}]),
+ _ = wxSizer:add(MainSz, Grid, [{border, 3}, {flag,?wxALL bor ?wxEXPAND},
{proportion, 1}]),
wxWindow:setSizer(Panel,MainSz),
- wxSizer:fit(MainSz, Win),
+ _ = wxSizer:fit(MainSz, Win),
wxSizer:setSizeHints(MainSz,Win),
IconFile = dbg_wx_win:find_icon("erlang_bug.png"),
diff --git a/lib/debugger/src/dbg_wx_src_view.erl b/lib/debugger/src/dbg_wx_src_view.erl
index 571c6b01bb..207c407fbc 100644
--- a/lib/debugger/src/dbg_wx_src_view.erl
+++ b/lib/debugger/src/dbg_wx_src_view.erl
@@ -56,7 +56,7 @@ code_area(Parent, Sizer) ->
end,
[SetStyle(Style) || Style <- Styles],
?stc:setKeyWords(Ed, 0, keyWords()),
- wxSizer:add(Sizer, Ed, [{proportion,1}, {flag, ?wxEXPAND}]),
+ _ = wxSizer:add(Sizer, Ed, [{proportion,1}, {flag, ?wxEXPAND}]),
Ed.
diff --git a/lib/debugger/src/dbg_wx_trace.erl b/lib/debugger/src/dbg_wx_trace.erl
index f9c60f9b72..6af19af33b 100644
--- a/lib/debugger/src/dbg_wx_trace.erl
+++ b/lib/debugger/src/dbg_wx_trace.erl
@@ -321,7 +321,7 @@ gui_cmd('Kill', State) ->
exit(State#state.pid, kill),
State;
gui_cmd('Messages', State) ->
- case int:meta(State#state.meta, messages) of
+ _ = case int:meta(State#state.meta, messages) of
[] ->
dbg_wx_trace_win:eval_output(State#state.win,"< No Messages!\n", bold);
Messages ->
diff --git a/lib/debugger/src/dbg_wx_trace_win.erl b/lib/debugger/src/dbg_wx_trace_win.erl
index 51687ad4e9..972a917728 100644
--- a/lib/debugger/src/dbg_wx_trace_win.erl
+++ b/lib/debugger/src/dbg_wx_trace_win.erl
@@ -123,7 +123,8 @@
%% GS = term()
%%--------------------------------------------------------------------
init() ->
- dbg_wx_win:init().
+ _ = dbg_wx_win:init(),
+ ok.
stop(#winInfo{window=Win}) ->
(catch wxFrame:destroy(Win)),
@@ -149,29 +150,29 @@ create_win(Parent, Title, Windows, Menus) ->
Sizer = wxBoxSizer:new(?wxVERTICAL),
Code = code_area(Panel),
- wxSizer:add(Sizer, Code#sub.win,
+ _ = wxSizer:add(Sizer, Code#sub.win,
[{proportion,1}, {border, 2},
{flag, ?wxEXPAND bor ?wxDOWN}]),
wxSizer:setVirtualSizeHints(Sizer, Code#sub.win),
ExpandWithBorder = [{border, 3},{flag,?wxEXPAND bor ?wxALL}],
Search = search_area(Panel),
- wxSizer:add(Sizer, Search#sub.win, ExpandWithBorder),
+ _ = wxSizer:add(Sizer, Search#sub.win, ExpandWithBorder),
Bs = button_area(Panel),
- wxSizer:add(Sizer, Bs#sub.win, ExpandWithBorder),
+ _ = wxSizer:add(Sizer, Bs#sub.win, ExpandWithBorder),
InfoArea = wxBoxSizer:new(?wxHORIZONTAL),
wxSizer:setMinSize(InfoArea, {100, ?EVAL_H}),
Eval = eval_area(Panel),
- wxSizer:add(InfoArea, Eval#sub.win, [{proportion,1},{flag,?wxEXPAND}]),
+ _ = wxSizer:add(InfoArea, Eval#sub.win, [{proportion,1},{flag,?wxEXPAND}]),
Bind = bind_area(Panel),
- wxSizer:add(InfoArea, Bind#sub.win,
+ _ = wxSizer:add(InfoArea, Bind#sub.win,
[{proportion,1},{border, 2},
{flag,?wxEXPAND bor ?wxLEFT}]),
- wxSizer:add(Sizer, InfoArea, ExpandWithBorder),
+ _ = wxSizer:add(Sizer, InfoArea, ExpandWithBorder),
Trace = trace_area(Panel),
- wxSizer:add(Sizer, Trace#sub.win, ExpandWithBorder),
+ _ = wxSizer:add(Sizer, Trace#sub.win, ExpandWithBorder),
SB = wxFrame:createStatusBar(Win,[]),
%% Note id and lastId to get the event when it dragged is complete
@@ -192,7 +193,7 @@ create_win(Parent, Title, Windows, Menus) ->
Wi = show_windows(enable_windows(Wi0,Windows)),
wxWindow:setSizer(Panel, Sizer),
- wxSizer:fit(Sizer, Win),
+ _ = wxSizer:fit(Sizer, Win),
wxSizer:setSizeHints(Sizer,Win),
IconFile = dbg_wx_win:find_icon("erlang_bug.png"),
@@ -230,11 +231,11 @@ get_window(WinInfo) ->
%%--------------------------------------------------------------------
configure(Wi=#winInfo{window=Win,m_szr={Panel,Sizer}}) ->
wx:batch(fun() ->
- show_windows(Wi),
+ _ = show_windows(Wi),
wxSizer:layout(Sizer),
%%wxWindow:setSizerAndFit(Panel,Sizer),
wxWindow:setSizer(Panel, Sizer),
- wxSizer:fit(Sizer, Win),
+ _ = wxSizer:fit(Sizer, Win),
wxSizer:setSizeHints(Sizer,Win),
Wi
end).
@@ -242,10 +243,10 @@ configure(Wi=#winInfo{window=Win,m_szr={Panel,Sizer}}) ->
configure(Wi0=#winInfo{window=Win,m_szr={Panel,Sizer}}, Windows) ->
wx:batch(fun() ->
Wi = enable_windows(Wi0, Windows),
- show_windows(Wi),
+ _ = show_windows(Wi),
wxSizer:layout(Sizer),
wxWindow:setSizer(Panel, Sizer),
- wxSizer:fit(Sizer, Win),
+ _ = wxSizer:fit(Sizer, Win),
wxSizer:setSizeHints(Sizer,Win),
Wi
end).
@@ -348,7 +349,7 @@ add_break(WinInfo, Menu, {{Mod,Line},[Status|_Options]}=Break) ->
case WinInfo#winInfo.editor of
{Mod, Editor} ->
dbg_wx_code:add_break_to_code(Editor, Line, Status);
- _ -> ignore
+ _ -> ok
end,
add_break_to_menu(WinInfo, Menu, Break).
@@ -372,7 +373,7 @@ update_break(WinInfo, {{Mod,Line},[Status|_Options]}=Break) ->
case WinInfo#winInfo.editor of
{Mod, Editor} ->
dbg_wx_code:add_break_to_code(Editor, Line, Status);
- _ -> ignore
+ _ -> ok
end,
update_break_in_menu(WinInfo, Break).
@@ -929,7 +930,7 @@ button_area(Parent) ->
B=wxButton:new(Parent, Button,
[{label,dbg_wx_win:to_string(Name)}]),
Id = wxWindow:getId(B),
- wxSizer:add(Sz,B, []),
+ _ = wxSizer:add(Sz,B, []),
wxButton:connect(B, command_button_clicked, [{id,Id}])
end, buttons()),
#sub{name='Button Area', win=Sz}.
@@ -938,22 +939,22 @@ button_area(Parent) ->
search_area(Parent) ->
HSz = wxBoxSizer:new(?wxHORIZONTAL),
- wxSizer:add(HSz, wxStaticText:new(Parent, ?wxID_ANY, "Find:"),
+ _ = wxSizer:add(HSz, wxStaticText:new(Parent, ?wxID_ANY, "Find:"),
[{flag,?wxALIGN_CENTER_VERTICAL}]),
TC1 = wxTextCtrl:new(Parent, ?SEARCH_ENTRY, [{style, ?wxTE_PROCESS_ENTER}]),
- wxSizer:add(HSz, TC1, [{proportion,3}, {flag, ?wxEXPAND}]),
+ _ = wxSizer:add(HSz, TC1, [{proportion,3}, {flag, ?wxEXPAND}]),
Nbtn = wxRadioButton:new(Parent, ?wxID_ANY, "Next"),
wxRadioButton:setValue(Nbtn, true),
- wxSizer:add(HSz,Nbtn,[{flag,?wxALIGN_CENTER_VERTICAL}]),
+ _ = wxSizer:add(HSz,Nbtn,[{flag,?wxALIGN_CENTER_VERTICAL}]),
Pbtn = wxRadioButton:new(Parent, ?wxID_ANY, "Previous"),
- wxSizer:add(HSz,Pbtn,[{flag,?wxALIGN_CENTER_VERTICAL}]),
+ _ = wxSizer:add(HSz,Pbtn,[{flag,?wxALIGN_CENTER_VERTICAL}]),
Cbtn = wxCheckBox:new(Parent, ?wxID_ANY, "Match Case"),
- wxSizer:add(HSz,Cbtn,[{flag,?wxALIGN_CENTER_VERTICAL}]),
- wxSizer:add(HSz, 15,15, [{proportion,1}, {flag, ?wxEXPAND}]),
- wxSizer:add(HSz, wxStaticText:new(Parent, ?wxID_ANY, "Goto Line:"),
+ _ = wxSizer:add(HSz,Cbtn,[{flag,?wxALIGN_CENTER_VERTICAL}]),
+ _ = wxSizer:add(HSz, 15,15, [{proportion,1}, {flag, ?wxEXPAND}]),
+ _ = wxSizer:add(HSz, wxStaticText:new(Parent, ?wxID_ANY, "Goto Line:"),
[{flag,?wxALIGN_CENTER_VERTICAL}]),
TC2 = wxTextCtrl:new(Parent, ?GOTO_ENTRY, [{style, ?wxTE_PROCESS_ENTER}]),
- wxSizer:add(HSz, TC2, [{proportion,0}, {flag, ?wxEXPAND}]),
+ _ = wxSizer:add(HSz, TC2, [{proportion,0}, {flag, ?wxEXPAND}]),
wxTextCtrl:connect(TC1, command_text_updated),
wxTextCtrl:connect(TC1, command_text_enter),
wxTextCtrl:connect(TC1, kill_focus),
@@ -969,14 +970,14 @@ eval_area(Parent) ->
VSz = wxBoxSizer:new(?wxVERTICAL),
HSz = wxBoxSizer:new(?wxHORIZONTAL),
- wxSizer:add(HSz, wxStaticText:new(Parent, ?wxID_ANY, "Evaluator:"),
+ _ = wxSizer:add(HSz, wxStaticText:new(Parent, ?wxID_ANY, "Evaluator:"),
[{flag,?wxALIGN_CENTER_VERTICAL}]),
TC = wxTextCtrl:new(Parent, ?EVAL_ENTRY, [{style, ?wxTE_PROCESS_ENTER}]),
- wxSizer:add(HSz, TC, [{proportion,1}, {flag, ?wxEXPAND}]),
- wxSizer:add(VSz, HSz, [{flag, ?wxEXPAND}]),
+ _ = wxSizer:add(HSz, TC, [{proportion,1}, {flag, ?wxEXPAND}]),
+ _ = wxSizer:add(VSz, HSz, [{flag, ?wxEXPAND}]),
TL = wxTextCtrl:new(Parent, ?EVAL_LOG, [{style, ?wxTE_DONTWRAP bor
?wxTE_MULTILINE bor ?wxTE_READONLY}]),
- wxSizer:add(VSz, TL, [{proportion,5}, {flag, ?wxEXPAND}]),
+ _ = wxSizer:add(VSz, TL, [{proportion,5}, {flag, ?wxEXPAND}]),
wxTextCtrl:connect(TC, command_text_enter),
#sub{name='Evaluator Area', win=VSz, in=TC, out=TL}.
diff --git a/lib/debugger/src/dbg_wx_win.erl b/lib/debugger/src/dbg_wx_win.erl
index 1ff8818bbe..25ffc5054c 100644
--- a/lib/debugger/src/dbg_wx_win.erl
+++ b/lib/debugger/src/dbg_wx_win.erl
@@ -43,7 +43,8 @@
%% GS = term()
%%--------------------------------------------------------------------
init() ->
- wx:new().
+ _ = wx:new(),
+ ok.
%%--------------------------------------------------------------------
%% create_menus(MenuBar, [Menu])
@@ -80,12 +81,12 @@ create_menus(_MB,[], _Win,Id) ->
Id.
create_menu_item(Menu, [separator|Is], Win, Id,Connect) ->
- wxMenu:appendSeparator(Menu),
+ _ = wxMenu:appendSeparator(Menu),
create_menu_item(Menu,Is,Win,Id+1,Connect);
create_menu_item(Menu, [{Name, _N, cascade, Items}|Is], Win, Id0,Connect) ->
Sub = wxMenu:new([]),
Id = create_menu_item(Sub, Items, Win, Id0, false),
- wxMenu:append(Menu, ?wxID_ANY, menu_name(Name,ignore), Sub),
+ _ = wxMenu:append(Menu, ?wxID_ANY, menu_name(Name,ignore), Sub),
%% Simulate GS sub checkBox/RadioBox behaviour
Self = self(),
Butts = [{MI,get(MI)} || {MI,_,_} <- Items],
@@ -99,8 +100,8 @@ create_menu_item(Menu, [{Name, _N, cascade, Items}|Is], Win, Id0,Connect) ->
Enabled = lists:foldl(IsChecked, [], Butts),
Self ! Ev#wx{userData={Name, Enabled}}
end,
- wxMenu:connect(Win, command_menu_selected,
- [{id,Id0},{lastId, Id-1},{callback,Filter}]),
+ _ = wxMenu:connect(Win, command_menu_selected,
+ [{id,Id0},{lastId, Id-1},{callback,Filter}]),
create_menu_item(Menu, Is, Win, Id, Connect);
create_menu_item(Menu, [{Name,Pos}|Is], Win, Id, Connect) ->
MenuId = case lists:member(Name, ['Debugger']) of
@@ -168,7 +169,7 @@ add_break(Win, MenuName, Point) ->
Delete = wxMenu:appendRadioItem(Trigger, ?wxID_ANY,"Delete"),
Add(Delete, {break,Point,{trigger,delete}}),
- wxMenu:append(Sub, ?wxID_ANY, "Trigger Action", Trigger),
+ _ = wxMenu:append(Sub, ?wxID_ANY, "Trigger Action", Trigger),
MenuBtn = wxMenu:append(Menu,?wxID_ANY, Label, Sub),
#break{mb={Menu,MenuBtn},
diff --git a/lib/debugger/src/dbg_wx_winman.erl b/lib/debugger/src/dbg_wx_winman.erl
index efa58ae325..ca858fa4bb 100644
--- a/lib/debugger/src/dbg_wx_winman.erl
+++ b/lib/debugger/src/dbg_wx_winman.erl
@@ -100,11 +100,11 @@ update_windows_menu(Win, [MonInfo|Infos]) ->
OldItems = wxMenu:getMenuItems(Menu),
[wxMenu:delete(Menu, Item) || Item <- OldItems],
menuitem(Win, Menu,MonInfo, 700),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenu:appendSeparator(Menu),
wx:foldl(fun(Info,Acc) -> menuitem(Win,Menu,Info,Acc) end, 701, Infos).
menuitem(Window, Menu, {Title, Win}, Id) ->
- wxMenu:append(Menu, Id, Title),
+ _ = wxMenu:append(Menu, Id, Title),
wxWindow:connect(Window, command_menu_selected,
[{id,Id},{userData,{dbg_ui_winman,Win}}]),
Id+1.
diff --git a/lib/debugger/src/i.erl b/lib/debugger/src/i.erl
index 4ed5265bdf..2da3e77618 100644
--- a/lib/debugger/src/i.erl
+++ b/lib/debugger/src/i.erl
@@ -108,7 +108,7 @@ ib(Module,Function,Arity) ->
ib(Module,Function,Arity,Cond) ->
Breaks1 = int:all_breaks(Module),
- int:break_in(Module,Function,Arity),
+ ok = int:break_in(Module,Function,Arity),
Breaks2 = int:all_breaks(Module),
lists:foreach(fun({Mod,Line}) -> int:test_at_break(Mod,Line,Cond) end,
Breaks2--Breaks1).
diff --git a/lib/debugger/src/int.erl b/lib/debugger/src/int.erl
index 3906c22afd..e5bade9abe 100644
--- a/lib/debugger/src/int.erl
+++ b/lib/debugger/src/int.erl
@@ -352,10 +352,10 @@ start() -> dbg_iserver:start().
stop() ->
lists:foreach(
fun(Mod) ->
- everywhere(distributed,
- fun() ->
+ _ = everywhere(distributed,
+ fun() ->
erts_debug:breakpoint({Mod,'_','_'}, false)
- end)
+ end)
end,
interpreted()),
dbg_iserver:stop().
@@ -524,21 +524,21 @@ check(Mod) when is_atom(Mod) -> catch check_module(Mod);
check(File) when is_list(File) -> catch check_file(File).
load({Mod, Src, Beam, BeamBin, Exp, Abst}, Dist) ->
- everywhere(Dist,
- fun() ->
+ _ = everywhere(Dist,
+ fun() ->
code:purge(Mod),
erts_debug:breakpoint({Mod,'_','_'}, false),
{module,Mod} = code:load_binary(Mod, Beam, BeamBin)
- end),
+ end),
case erl_prim_loader:get_file(filename:absname(Src)) of
{ok, SrcBin, _} ->
MD5 = code:module_md5(BeamBin),
Bin = term_to_binary({interpreter_module,Exp,Abst,SrcBin,MD5}),
{module, Mod} = dbg_iserver:safe_call({load, Mod, Src, Bin}),
- everywhere(Dist,
- fun() ->
+ _ = everywhere(Dist,
+ fun() ->
true = erts_debug:breakpoint({Mod,'_','_'}, true) > 0
- end),
+ end),
{module, Mod};
error ->
error
@@ -738,9 +738,9 @@ del_mod(AbsMod, Dist) ->
list_to_atom(filename:basename(AbsMod,".erl"))
end,
dbg_iserver:safe_cast({delete, Mod}),
- everywhere(Dist,
- fun() ->
+ _ = everywhere(Dist,
+ fun() ->
erts_debug:breakpoint({Mod,'_','_'}, false),
erlang:yield()
- end),
+ end),
ok.
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl
index d1ffa07706..272ad10e90 100644
--- a/lib/dialyzer/src/dialyzer_contracts.erl
+++ b/lib/dialyzer/src/dialyzer_contracts.erl
@@ -591,10 +591,13 @@ remove_uses([{Var, Use}|ToRemove], Constrs0) ->
remove_uses(_Var, _Use, []) -> [];
remove_uses(Var, Use, [Constr|Constrs]) ->
{V, Form} = Constr,
- case erl_types:t_var_name(V) =:= Var of
- true -> [{V, remove_use(Form, Use)}|Constrs];
- false -> [Constr|remove_uses(Var, Use, Constrs)]
- end.
+ NewConstr = case erl_types:t_var_name(V) =:= Var of
+ true ->
+ {V, remove_use(Form, Use)};
+ false ->
+ Constr
+ end,
+ [NewConstr|remove_uses(Var, Use, Constrs)].
remove_use({var, L, V}, V) -> {var, L, '_'};
remove_use(T, V) when is_tuple(T) ->
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 5ab0c39c04..3349b12932 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -430,17 +430,35 @@ handle_apply(Tree, Map, State) ->
handle_apply_or_call(FunInfoList, Args, ArgTypes, Map, Tree, State) ->
None = t_none(),
+ %% Call-site analysis may be inaccurate and consider more funs than those that
+ %% are actually possible. If all of them are incorrect, then warnings can be
+ %% emitted. If at least one fun is ok, however, then no warning is emitted,
+ %% just in case the bad ones are not really possible. The last argument is
+ %% used for this, with the following encoding:
+ %% Initial value: {none, []}
+ %% First fun checked: {one, <List of warns>}
+ %% More funs checked: {many, <List of warns>}
+ %% A '{one, []}' can only become '{many, []}'.
+ %% If at any point an fun does not add warnings, then the list is also
+ %% replaced with an empty list.
handle_apply_or_call(FunInfoList, Args, ArgTypes, Map, Tree, State,
- [None || _ <- ArgTypes], None, false).
+ [None || _ <- ArgTypes], None, false, {none, []}).
handle_apply_or_call([{local, external}|Left], Args, ArgTypes, Map, Tree, State,
- _AccArgTypes, _AccRet, _HadExternal) ->
+ _AccArgTypes, _AccRet, _HadExternal, Warns) ->
+ {HowMany, _} = Warns,
+ NewHowMany =
+ case HowMany of
+ none -> one;
+ _ -> many
+ end,
+ NewWarns = {NewHowMany, []},
handle_apply_or_call(Left, Args, ArgTypes, Map, Tree, State,
- ArgTypes, t_any(), true);
+ ArgTypes, t_any(), true, NewWarns);
handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
Args, ArgTypes, Map, Tree,
#state{opaques = Opaques} = State,
- AccArgTypes, AccRet, HadExternal) ->
+ AccArgTypes, AccRet, HadExternal, Warns) ->
Any = t_any(),
AnyArgs = [Any || _ <- Args],
GenSig = {AnyArgs, fun(_) -> t_any() end},
@@ -586,16 +604,32 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
end,
NewAccRet = t_sup(AccRet, TotalRet),
?debug("NewAccRet: ~s\n", [t_to_string(NewAccRet)]),
+ {NewWarnings, State4} = state__remove_added_warnings(State, State3),
+ {HowMany, OldWarnings} = Warns,
+ NewWarns =
+ case HowMany of
+ none -> {one, NewWarnings};
+ _ ->
+ case OldWarnings =:= [] of
+ true -> {many, []};
+ false ->
+ case NewWarnings =:= [] of
+ true -> {many, []};
+ false -> {many, NewWarnings ++ OldWarnings}
+ end
+ end
+ end,
handle_apply_or_call(Left, Args, ArgTypes, Map, Tree,
- State3, NewAccArgTypes, NewAccRet, HadExternal);
+ State4, NewAccArgTypes, NewAccRet, HadExternal, NewWarns);
handle_apply_or_call([], Args, _ArgTypes, Map, _Tree, State,
- AccArgTypes, AccRet, HadExternal) ->
+ AccArgTypes, AccRet, HadExternal, {_, Warnings}) ->
+ State1 = state__add_warnings(Warnings, State),
case HadExternal of
false ->
NewMap = enter_type_lists(Args, AccArgTypes, Map),
- {State, NewMap, AccRet};
+ {State1, NewMap, AccRet};
true ->
- {had_external, State}
+ {had_external, State1}
end.
apply_fail_reason(FailedSig, FailedBif, FailedContract) ->
@@ -3038,6 +3072,14 @@ state__add_warning(#state{warnings = Warnings, warning_mode = true} = State,
end
end.
+state__remove_added_warnings(OldState, NewState) ->
+ #state{warnings = OldWarnings} = OldState,
+ #state{warnings = NewWarnings} = NewState,
+ {NewWarnings -- OldWarnings, NewState#state{warnings = OldWarnings}}.
+
+state__add_warnings(Warns, #state{warnings = Warnings} = State) ->
+ State#state{warnings = Warns ++ Warnings}.
+
-spec state__set_curr_fun(curr_fun(), state()) -> state().
state__set_curr_fun(undefined, State) ->
diff --git a/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy b/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy
index 7ce440a60d..11b9ecade6 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy
+++ b/lib/dialyzer/test/small_SUITE_data/results/higher_order_discrepancy
@@ -1,4 +1,3 @@
-higher_order_discrepancy.erl:11: The call higher_order_discrepancy:g('foo') will never return since it differs in the 1st argument from the success typing arguments: ('bar')
-higher_order_discrepancy.erl:14: Function g/1 has no local return
-higher_order_discrepancy.erl:14: The pattern 'bar' can never match the type 'foo'
+higher_order_discrepancy.erl:19: Function g/1 has no local return
+higher_order_discrepancy.erl:19: The pattern 'bar' can never match the type 'foo'
diff --git a/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl b/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl
index ff5ee6bac4..f9547d4929 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/higher_order_discrepancy.erl
@@ -1,3 +1,8 @@
+%% With the patch introduced to avoid false warnings in
+%% user_SUITE_data/src/wpc_hlines.erl we can unfortunately no longer precisely
+%% catch problems like this one... The refinement procedure is still enough to
+%% keep some of the details, nevertheless.
+
-module(higher_order_discrepancy).
-export([test/1]).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/loopy.erl b/lib/dialyzer/test/small_SUITE_data/src/loopy.erl
new file mode 100644
index 0000000000..28125ec3d9
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/loopy.erl
@@ -0,0 +1,17 @@
+%% ERL-157, OTP-13653.
+%% Would cause Dialyzer to go into an infinite loop.
+
+-module(loopy).
+
+-export([loop/1]).
+
+
+-spec loop(Args) -> ok when
+ Args :: [{Module, Args}],
+ Module :: module(),
+ Args :: any().
+loop([{Module, Args} | Rest]) ->
+ Module:init(Args),
+ loop(Rest);
+loop([]) ->
+ ok.
diff --git a/lib/dialyzer/test/user_SUITE_data/results/wpc_hlines b/lib/dialyzer/test/user_SUITE_data/results/wpc_hlines
new file mode 100644
index 0000000000..d6e3f29ab9
--- /dev/null
+++ b/lib/dialyzer/test/user_SUITE_data/results/wpc_hlines
@@ -0,0 +1,3 @@
+
+wpc_hlines.erl:22: Function bad/1 has no local return
+wpc_hlines.erl:22: The pattern 'false' can never match the type 'true'
diff --git a/lib/dialyzer/test/user_SUITE_data/src/wpc_hlines.erl b/lib/dialyzer/test/user_SUITE_data/src/wpc_hlines.erl
new file mode 100644
index 0000000000..8c205a8247
--- /dev/null
+++ b/lib/dialyzer/test/user_SUITE_data/src/wpc_hlines.erl
@@ -0,0 +1,22 @@
+%% Bug reported by Dan Gudmundsson, test shrunk down by Magnus Lång.
+
+%% The problem is that dialyzer_dep generates edges from the fun
+%% application to both of the functions, and then during the warning pass
+%% dialyzer_dataflow:handle_apply_or_call generates warnings for any such
+%% edge that won't return.
+
+%% Since dialyzer_dep is currently supposed to overapproximate rather than
+%% underapproximate, the fix was to modify handle_apply_or_call to not generate
+%% warnings if some of the possible funs can succeed.
+
+-module(wpc_hlines).
+
+-export([do_export/0]).
+
+do_export() ->
+ {Proj, _} = % The culprit seems to be putting the funs in a tuple
+ {fun good/1, fun bad/1},
+ Proj(true).
+
+good(_) -> ok.
+bad(false) -> ok.
diff --git a/lib/edoc/priv/edoc.dtd b/lib/edoc/priv/edoc.dtd
index 4278a9e643..89058f5d85 100644
--- a/lib/edoc/priv/edoc.dtd
+++ b/lib/edoc/priv/edoc.dtd
@@ -103,7 +103,7 @@
<!ATTLIST type name CDATA #IMPLIED>
<!ELEMENT union (typevar | atom | integer | float | nil | list | tuple |
- fun | record | abstype)+>
+ fun | record | map | abstype)+>
<!ELEMENT typevar EMPTY>
<!ATTLIST typevar name CDATA #REQUIRED>
@@ -129,6 +129,10 @@
<!ELEMENT field (atom, type)>
+<!ELEMENT map (map_field)*>
+
+<!ELEMENT map_field (type, type)>
+
<!ELEMENT abstype (erlangName, type*)>
<!ATTLIST abstype
href CDATA #IMPLIED>
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl
index f723cd8373..e86d090b13 100644
--- a/lib/edoc/src/edoc_layout.erl
+++ b/lib/edoc/src/edoc_layout.erl
@@ -898,8 +898,20 @@ t_map(Es) ->
Fs = get_elem(map_field, Es),
["#{"] ++ seq(fun t_map_field/1, Fs, ["}"]).
-t_map_field(#xmlElement{content = [K,V]}) ->
- t_utype_elem(K) ++ [" => "] ++ t_utype_elem(V).
+t_map_field(#xmlElement{content = [K,V]}=E) ->
+ KElem = t_utype_elem(K),
+ VElem = t_utype_elem(V),
+ AT = get_attrval(assoc_type, E),
+ IsAny = fun(["any","()"]) -> true; (_) -> false end,
+ case AT =:= "assoc" andalso IsAny(KElem) andalso IsAny(VElem) of
+ true -> "...";
+ false ->
+ AS = case AT of
+ "assoc" -> " => ";
+ "exact" -> " := "
+ end,
+ KElem ++ [AS] ++ VElem
+ end.
t_record(E, Es) ->
Name = ["#"] ++ t_type(get_elem(atom, Es)),
@@ -1133,8 +1145,12 @@ ot_tuple(Es) ->
ot_map(Es) ->
{type,0,map,[ot_map_field(E) || E <- get_elem(map_field,Es)]}.
-ot_map_field(#xmlElement{content=[K,V]}) ->
- {type,0,map_field_assoc,ot_utype_elem(K), ot_utype_elem(V)}.
+ot_map_field(#xmlElement{content=[K,V]}=E) ->
+ A = case get_attrval(assoc_type, E) of
+ "assoc" -> map_field_assoc;
+ "exact" -> map_field_exact
+ end,
+ {type,0,A,[ot_utype_elem(K), ot_utype_elem(V)]}.
ot_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),
diff --git a/lib/edoc/src/edoc_parser.yrl b/lib/edoc/src/edoc_parser.yrl
index 835e7ccaa6..983e2f8496 100644
--- a/lib/edoc/src/edoc_parser.yrl
+++ b/lib/edoc/src/edoc_parser.yrl
@@ -36,8 +36,8 @@ Terminals
atom float integer var an_var string start_spec start_typedef start_throws
start_ref
-'(' ')' ',' '.' '=>' '->' '{' '}' '[' ']' '|' '+' ':' '::' '=' '/' '//' '*'
-'#' 'where' '<<' '>>' '..' '...'.
+'(' ')' ',' '.' '=>' ':=' '->' '{' '}' '[' ']' '|' '+' ':' '::' '=' '/' '//'
+'*' '#' 'where' '<<' '>>' '..' '...'.
Rootsymbol start.
@@ -76,7 +76,15 @@ utype_map_fields -> '$empty' : [].
utype_map_fields -> utype_map_field : ['$1'].
utype_map_fields -> utype_map_fields ',' utype_map_field : ['$3' | '$1'].
-utype_map_field -> utype '=>' utype : #t_map_field{ k_type = '$1', v_type = '$3'}.
+utype_map_field -> utype '=>' utype : #t_map_field{assoc_type = assoc,
+ k_type = '$1',
+ v_type = '$3'}.
+utype_map_field -> utype ':=' utype : #t_map_field{assoc_type = exact,
+ k_type = '$1',
+ v_type = '$3'}.
+utype_map_field -> '...' : #t_map_field{assoc_type = assoc,
+ k_type = any(),
+ v_type = any()}.
utype_tuple -> '{' utypes '}' : lists:reverse('$2').
@@ -346,6 +354,9 @@ all_vars([#t_var{} | As]) ->
all_vars(As) ->
As =:= [].
+any() ->
+ #t_type{name = #t_name{name = any}, args = []}.
+
%% ---------------------------------------------------------------------
%% @doc EDoc type specification parsing. Parses the content of
diff --git a/lib/edoc/src/edoc_run.erl b/lib/edoc/src/edoc_run.erl
index 9a569d0879..261a649c70 100644
--- a/lib/edoc/src/edoc_run.erl
+++ b/lib/edoc/src/edoc_run.erl
@@ -44,6 +44,8 @@
-import(edoc_report, [report/2, error/1]).
+-type args() :: [string()].
+
%% @spec application([string()]) -> none()
%%
@@ -58,6 +60,7 @@
%% automatically terminated when the call has completed, signalling
%% success or failure to the operating system.
+-spec application(args()) -> no_return().
application(Args) ->
F = fun () ->
case parse_args(Args) of
@@ -81,6 +84,7 @@ application(Args) ->
%% automatically terminated when the call has completed, signalling
%% success or failure to the operating system.
+-spec files(args()) -> no_return().
files(Args) ->
F = fun () ->
case parse_args(Args) of
@@ -93,6 +97,7 @@ files(Args) ->
run(F).
%% @hidden Not official yet
+-spec toc(args()) -> no_return().
toc(Args) ->
F = fun () ->
case parse_args(Args) of
@@ -126,6 +131,7 @@ toc(Args) ->
%% automatically terminated when the call has completed, signalling
%% success or failure to the operating system.
+-spec file(args()) -> no_return().
file(Args) ->
F = fun () ->
case parse_args(Args) of
@@ -137,8 +143,7 @@ file(Args) ->
end,
run(F).
--spec invalid_args(string(), list()) -> no_return().
-
+-spec invalid_args(string(), args()) -> no_return().
invalid_args(Where, Args) ->
report("invalid arguments to ~ts: ~w.", [Where, Args]),
shutdown_error().
@@ -169,10 +174,12 @@ wait_init() ->
%% When and if a function init:stop/1 becomes generally available, we
%% can use that instead of delay-and-pray when there is an error.
+-spec shutdown_ok() -> no_return().
shutdown_ok() ->
%% shut down emulator nicely, signalling "normal termination"
init:stop().
+-spec shutdown_error() -> no_return().
shutdown_error() ->
%% delay 1 second to allow I/O to finish
receive after 1000 -> ok end,
diff --git a/lib/edoc/src/edoc_scanner.erl b/lib/edoc/src/edoc_scanner.erl
index 36423d63f8..f1d5e1d4b9 100644
--- a/lib/edoc/src/edoc_scanner.erl
+++ b/lib/edoc/src/edoc_scanner.erl
@@ -146,6 +146,8 @@ scan1([$>,$>|Cs], Toks, Pos) ->
scan1(Cs, [{'>>',Pos}|Toks], Pos);
scan1([$-,$>|Cs], Toks, Pos) ->
scan1(Cs, [{'->',Pos}|Toks], Pos);
+scan1([$:,$=|Cs], Toks, Pos) ->
+ scan1(Cs, [{':=',Pos}|Toks], Pos);
scan1([$:,$:|Cs], Toks, Pos) ->
scan1(Cs, [{'::',Pos}|Toks], Pos);
scan1([$/,$/|Cs], Toks, Pos) ->
diff --git a/lib/edoc/src/edoc_specs.erl b/lib/edoc/src/edoc_specs.erl
index faee8adf7b..c15dfd328f 100644
--- a/lib/edoc/src/edoc_specs.erl
+++ b/lib/edoc/src/edoc_specs.erl
@@ -369,11 +369,11 @@ d2e({type,_,map,any}, _Prec) ->
d2e({type,_,map,Es}, _Prec) ->
#t_map{types = d2e(Es) };
d2e({type,_,map_field_assoc,[K,V]}, Prec) ->
- T = #t_map_field{k_type = d2e(K), v_type=d2e(V) },
+ T = #t_map_field{assoc_type = assoc, k_type = d2e(K), v_type=d2e(V) },
{P,_R} = erl_parse:type_preop_prec('#'),
maybe_paren(P, Prec, T);
-d2e({type,_,map_field_exact,K,V}, Prec) ->
- T = #t_map_field{k_type = d2e(K), v_type=d2e(V) },
+d2e({type,_,map_field_exact,[K,V]}, Prec) ->
+ T = #t_map_field{assoc_type = exact, k_type = d2e(K), v_type=d2e(V) },
{P,_R} = erl_parse:type_preop_prec('#'),
maybe_paren(P, Prec, T);
d2e({type,_,tuple,Ts0}, _Prec) ->
diff --git a/lib/edoc/src/edoc_types.erl b/lib/edoc/src/edoc_types.erl
index 65fba61a72..5bb68e79fb 100644
--- a/lib/edoc/src/edoc_types.erl
+++ b/lib/edoc/src/edoc_types.erl
@@ -89,8 +89,8 @@ to_xml(#t_fun{args = As, range = T}, Env) ->
wrap_utype(T, Env)]};
to_xml(#t_map{ types = Ts}, Env) ->
{map, map(fun to_xml/2, Ts, Env)};
-to_xml(#t_map_field{ k_type=K, v_type=V}, Env) ->
- {map_field, [wrap_utype(K,Env), wrap_utype(V, Env)]};
+to_xml(#t_map_field{assoc_type = AT, k_type=K, v_type=V}, Env) ->
+ {map_field, [{assoc_type, AT}], [wrap_utype(K,Env), wrap_utype(V, Env)]};
to_xml(#t_tuple{types = Ts}, Env) ->
{tuple, map(fun wrap_utype/2, Ts, Env)};
to_xml(#t_list{type = T}, Env) ->
diff --git a/lib/edoc/src/edoc_types.hrl b/lib/edoc/src/edoc_types.hrl
index 7fec10d936..3e5e91484f 100644
--- a/lib/edoc/src/edoc_types.hrl
+++ b/lib/edoc/src/edoc_types.hrl
@@ -157,5 +157,5 @@
-record(t_paren, {a=[], type}). % parentheses
-record(t_map, {a=[], types=[]}).
--record(t_map_field, {a=[], k_type, v_type}).
+-record(t_map_field, {a=[], assoc_type, k_type, v_type}).
diff --git a/lib/eldap/test/eldap_basic_SUITE.erl b/lib/eldap/test/eldap_basic_SUITE.erl
index 536e891a1e..ac3447cfe6 100644
--- a/lib/eldap/test/eldap_basic_SUITE.erl
+++ b/lib/eldap/test/eldap_basic_SUITE.erl
@@ -28,12 +28,11 @@
-include_lib("eldap/ebin/ELDAPv3.hrl").
--define(TIMEOUT, 120000). % 2 min
-
-
%% Control to delete a referral object:
-define(manageDsaIT, {control,"2.16.840.1.113730.3.4.2",false,asn1_NOVALUE}).
+suite() ->
+ [{timetrap,{seconds,360}}].
all() ->
[app,
@@ -124,7 +123,7 @@ end_per_suite(_Config) ->
init_per_group(return_values, Config) ->
- case ?config(ldap_server,Config) of
+ case proplists:get_value(ldap_server,Config) of
undefined ->
{skip, "LDAP server not availble"};
{Host,Port} ->
@@ -132,7 +131,7 @@ init_per_group(return_values, Config) ->
Config
end;
init_per_group(plain_api, Config0) ->
- case ?config(ldap_server,Config0) of
+ case proplists:get_value(ldap_server,Config0) of
undefined ->
{skip, "LDAP server not availble"};
Server = {Host,Port} ->
@@ -140,7 +139,7 @@ init_per_group(plain_api, Config0) ->
initialize_db([{server,Server}, {ssl_flag,false}, {start_tls,false} | Config0])
end;
init_per_group(ssl_api, Config0) ->
- case ?config(ldaps_server,Config0) of
+ case proplists:get_value(ldaps_server,Config0) of
undefined ->
{skip, "LDAPS server not availble"};
Server = {Host,Port} ->
@@ -148,7 +147,7 @@ init_per_group(ssl_api, Config0) ->
initialize_db([{server,Server}, {ssl_flag,true}, {start_tls,false} | Config0])
end;
init_per_group(start_tls_api, Config0) ->
- case {?config(ldap_server,Config0), ?config(ssl_available,Config0)} of
+ case {proplists:get_value(ldap_server,Config0), proplists:get_value(ssl_available,Config0)} of
{undefined,true} ->
{skip, "LDAP server not availble"};
{_,false} ->
@@ -187,18 +186,18 @@ end_per_group(_Group, Config) -> Config.
init_per_testcase(ssl_connection, Config) ->
- case ?config(ssl_available,Config) of
+ case proplists:get_value(ssl_available,Config) of
true ->
SSL_Port = 9999,
- CertFile = filename:join(?config(data_dir,Config), "certs/server/cert.pem"),
- KeyFile = filename:join(?config(data_dir,Config), "certs/server/key.pem"),
+ CertFile = filename:join(proplists:get_value(data_dir,Config), "certs/server/cert.pem"),
+ KeyFile = filename:join(proplists:get_value(data_dir,Config), "certs/server/key.pem"),
Parent = self(),
Listener = spawn_link(
fun() ->
case ssl:listen(SSL_Port, [{certfile, CertFile},
{keyfile, KeyFile}
- | ?config(tcp_listen_opts,Config)
+ | proplists:get_value(tcp_listen_opts,Config)
]) of
{ok,SSL_LSock} ->
Parent ! {ok,self()},
@@ -245,7 +244,7 @@ init_per_testcase(TC, Config) ->
end;
false ->
- case proplists:get_value(name,?config(tc_group_properties, Config)) of
+ case proplists:get_value(name,proplists:get_value(tc_group_properties, Config)) of
api_not_bound ->
{ok,H} = open(Config),
[{handle,H} | Config];
@@ -282,7 +281,7 @@ appup(Config) when is_list(Config) ->
%%%----------------------------------------------------------------
open_ret_val_success(Config) ->
- {Host,Port} = ?config(ldap_server,Config),
+ {Host,Port} = proplists:get_value(ldap_server,Config),
{ok,H} = eldap:open([Host], [{port,Port}]),
catch eldap:close(H).
@@ -292,7 +291,7 @@ open_ret_val_error(_Config) ->
%%%----------------------------------------------------------------
close_ret_val(Config) ->
- {Host,Port} = ?config(ldap_server,Config),
+ {Host,Port} = proplists:get_value(ldap_server,Config),
{ok,H} = eldap:open([Host], [{port,Port}]),
ok = eldap:close(H).
@@ -313,7 +312,6 @@ tcp_connection(Config) ->
end.
%%%----------------------------------------------------------------
-
close_after_tcp_error(Config) ->
Host = proplists:get_value(listen_host, Config),
Port = proplists:get_value(listen_port, Config),
@@ -436,37 +434,37 @@ tcp_connection_option(Config) ->
%%%----------------------------------------------------------------
elementary_search(Config) ->
{ok, #eldap_search_result{entries=[_]}} =
- eldap:search(?config(handle,Config),
- #eldap_search{base = ?config(eldap_path, Config),
+ eldap:search(proplists:get_value(handle,Config),
+ #eldap_search{base = proplists:get_value(eldap_path, Config),
filter= eldap:present("objectclass"),
scope = eldap:wholeSubtree()}).
%%%----------------------------------------------------------------
search_non_existant(Config) ->
{error, noSuchObject} =
- eldap:search(?config(handle,Config),
- #eldap_search{base = "cn=Bar," ++ ?config(eldap_path, Config),
+ eldap:search(proplists:get_value(handle,Config),
+ #eldap_search{base = "cn=Bar," ++ proplists:get_value(eldap_path, Config),
filter= eldap:present("objectclass"),
scope = eldap:wholeSubtree()}).
%%%----------------------------------------------------------------
add_when_not_bound(Config) ->
- {error, _} = eldap:add(?config(handle,Config),
- "cn=Jonas Jonsson," ++ ?config(eldap_path, Config),
+ {error, _} = eldap:add(proplists:get_value(handle,Config),
+ "cn=Jonas Jonsson," ++ proplists:get_value(eldap_path, Config),
[{"objectclass", ["person"]},
{"cn", ["Jonas Jonsson"]},
{"sn", ["Jonsson"]}]).
%%%----------------------------------------------------------------
bind(Config) ->
- ok = eldap:simple_bind(?config(handle,Config),
+ ok = eldap:simple_bind(proplists:get_value(handle,Config),
"cn=Manager,dc=ericsson,dc=se",
"hejsan").
%%%----------------------------------------------------------------
add_when_bound(Config) ->
- ok = eldap:add(?config(handle, Config),
- "cn=Jonas Jonsson," ++ ?config(eldap_path, Config),
+ ok = eldap:add(proplists:get_value(handle, Config),
+ "cn=Jonas Jonsson," ++ proplists:get_value(eldap_path, Config),
[{"objectclass", ["person"]},
{"cn", ["Jonas Jonsson"]},
{"sn", ["Jonsson"]}]).
@@ -474,16 +472,16 @@ add_when_bound(Config) ->
%%%----------------------------------------------------------------
add_already_exists(Config) ->
{error, entryAlreadyExists} =
- eldap:add(?config(handle, Config),
- "cn=Jonas Jonsson," ++ ?config(eldap_path, Config),
+ eldap:add(proplists:get_value(handle, Config),
+ "cn=Jonas Jonsson," ++ proplists:get_value(eldap_path, Config),
[{"objectclass", ["person"]},
{"cn", ["Jonas Jonsson"]},
{"sn", ["Jonsson"]}]).
%%%----------------------------------------------------------------
more_add(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ok = eldap:add(H, "cn=Foo Bar," ++ BasePath,
[{"objectclass", ["person"]},
{"cn", ["Foo Bar"]},
@@ -495,8 +493,8 @@ more_add(Config) ->
%%%----------------------------------------------------------------
add_referral(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
{ok,{referral,["ldap://nowhere.example.com"++_]}} =
eldap:add(H, "cn=Foo Bar,dc=notHere," ++ BasePath,
[{"objectclass", ["person"]},
@@ -506,28 +504,28 @@ add_referral(Config) ->
%%%----------------------------------------------------------------
search_filter_equalityMatch(Config) ->
- BasePath = ?config(eldap_path, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ExpectedDN = "cn=Jonas Jonsson," ++ BasePath,
{ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
- eldap:search(?config(handle, Config),
+ eldap:search(proplists:get_value(handle, Config),
#eldap_search{base = BasePath,
filter = eldap:equalityMatch("sn", "Jonsson"),
scope=eldap:singleLevel()}).
%%%----------------------------------------------------------------
search_filter_substring_any(Config) ->
- BasePath = ?config(eldap_path, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ExpectedDN = "cn=Jonas Jonsson," ++ BasePath,
{ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
- eldap:search(?config(handle, Config),
+ eldap:search(proplists:get_value(handle, Config),
#eldap_search{base = BasePath,
filter = eldap:substrings("sn", [{any, "ss"}]),
scope=eldap:singleLevel()}).
%%%----------------------------------------------------------------
search_filter_initial(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ExpectedDN = "cn=Foo Bar," ++ BasePath,
{ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
eldap:search(H,
@@ -537,8 +535,8 @@ search_filter_initial(Config) ->
%%%----------------------------------------------------------------
search_filter_final(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ExpectedDN = "cn=Foo Bar," ++ BasePath,
{ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
eldap:search(H,
@@ -548,8 +546,8 @@ search_filter_final(Config) ->
%%%----------------------------------------------------------------
search_filter_and(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ExpectedDN = "cn=Foo Bar," ++ BasePath,
{ok, #eldap_search_result{entries=[#eldap_entry{object_name=ExpectedDN}]}} =
eldap:search(H,
@@ -560,8 +558,8 @@ search_filter_and(Config) ->
%%%----------------------------------------------------------------
search_filter_or(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
ExpectedDNs = lists:sort(["cn=Foo Bar," ++ BasePath,
"ou=Team," ++ BasePath]),
{ok, #eldap_search_result{entries=Es}} =
@@ -574,8 +572,8 @@ search_filter_or(Config) ->
%%%----------------------------------------------------------------
search_filter_and_not(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
{ok, #eldap_search_result{entries=[]}} =
eldap:search(H,
#eldap_search{base = BasePath,
@@ -587,8 +585,8 @@ search_filter_and_not(Config) ->
%%%----------------------------------------------------------------
search_two_hits(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
DN1 = "cn=Santa Claus," ++ BasePath,
DN2 = "cn=Jultomten," ++ BasePath,
%% Add two objects:
@@ -619,8 +617,8 @@ search_two_hits(Config) ->
%%%----------------------------------------------------------------
search_referral(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
DN = "cn=Santa Claus,dc=notHere," ++ BasePath,
{ok,{referral,["ldap://nowhere.example.com"++_]}} =
eldap:search(H, #eldap_search{base = DN,
@@ -629,8 +627,8 @@ search_referral(Config) ->
%%%----------------------------------------------------------------
modify(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
%% The object to modify
DN = "cn=Foo Bar," ++ BasePath,
@@ -662,8 +660,8 @@ modify(Config) ->
%%%----------------------------------------------------------------
modify_referral(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
%% The object to modify
DN = "cn=Foo Bar,dc=notHere," ++ BasePath,
@@ -675,8 +673,8 @@ modify_referral(Config) ->
%%%----------------------------------------------------------------
delete(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
%% The element to play with:
DN = "cn=Jonas Jonsson," ++ BasePath,
@@ -693,16 +691,16 @@ delete(Config) ->
%%%----------------------------------------------------------------
delete_referral(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
%% The element to play with:
DN = "cn=Jonas Jonsson,dc=notHere," ++ BasePath,
{ok,{referral,["ldap://nowhere.example.com"++_]}} = eldap:delete(H, DN).
%%%----------------------------------------------------------------
modify_dn_delete_old(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
OrigCN = "Foo Bar",
OriginalRDN = "cn="++OrigCN,
DN = OriginalRDN ++ "," ++ BasePath,
@@ -747,8 +745,8 @@ modify_dn_delete_old(Config) ->
%%%----------------------------------------------------------------
modify_dn_keep_old(Config) ->
- H = ?config(handle, Config),
- BasePath = ?config(eldap_path, Config),
+ H = proplists:get_value(handle, Config),
+ BasePath = proplists:get_value(eldap_path, Config),
OriginalRDN = "cn=Foo Bar",
DN = OriginalRDN ++ "," ++ BasePath,
NewCN = "Niclas Andre",
@@ -887,7 +885,7 @@ initialize_db(Config) ->
clear_db(Config) ->
{ok,H} = open_bind(Config),
- Path = ?config(eldap_path, Config),
+ Path = proplists:get_value(eldap_path, Config),
delete_old_contents(H, Path),
eldap:close(H),
Config.
@@ -939,20 +937,20 @@ ok(MODULE, LINE, X) ->
cond_start_tls(H, Config) ->
- case ?config(start_tls,Config) of
+ case proplists:get_value(start_tls,Config) of
true -> start_tls(H,Config);
_ -> Config
end.
start_tls(H, Config) ->
- KeyFile = filename:join([?config(data_dir,Config),
+ KeyFile = filename:join([proplists:get_value(data_dir,Config),
"certs/client/key.pem"
]),
case eldap:start_tls(H, [{keyfile, KeyFile}]) of
ok ->
[{start_tls_success,true} | Config];
Error ->
- ct:log("Start_tls on ~p failed: ~p",[?config(url,Config) ,Error]),
+ ct:log("Start_tls on ~p failed: ~p",[proplists:get_value(url,Config) ,Error]),
ct:fail("start_tls failed")
end.
@@ -964,8 +962,8 @@ open_bind(Config) ->
{ok,H}.
open(Config) ->
- {Host,Port} = ?config(server,Config),
- SSLflag = ?config(ssl_flag,Config),
+ {Host,Port} = proplists:get_value(server,Config),
+ SSLflag = proplists:get_value(ssl_flag,Config),
{ok,H} = eldap:open([Host], [{port,Port},{ssl,SSLflag}]),
cond_start_tls(H, Config),
{ok,H}.
@@ -1023,7 +1021,7 @@ init_ssl_certs_et_al(Config) ->
of
R when R==ok ; R=={error,{already_started,ssl}} ->
try make_certs:all("/dev/null",
- filename:join(?config(data_dir,Config), "certs"))
+ filename:join(proplists:get_value(data_dir,Config), "certs"))
of
{ok,_} -> true;
Other ->
diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css
index 347782eb1e..219740a557 100644
--- a/lib/erl_docgen/priv/css/otp_doc.css
+++ b/lib/erl_docgen/priv/css/otp_doc.css
@@ -122,6 +122,11 @@ span.code { font-family: Courier, monospace; font-weight: normal }
font-size: 90%;
padding: 5px 10px;
}
+
+.quote {
+ font-style: italic
+}
+
.example {
background-color:#eeeeff;
padding: 0px 10px;
diff --git a/lib/erl_docgen/priv/dtd/common.dtd b/lib/erl_docgen/priv/dtd/common.dtd
index 961bcd3fc2..b1578ad9d4 100644
--- a/lib/erl_docgen/priv/dtd/common.dtd
+++ b/lib/erl_docgen/priv/dtd/common.dtd
@@ -12,7 +12,7 @@
limitations under the License.
The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
+ Portions created by Ericsson are Copyright 1999-2016, Ericsson AB.
All Rights Reserved.''
$Id$
@@ -24,7 +24,7 @@
<!ENTITY % block "p|pre|code|list|taglist|codeinclude|
erleval" >
-<!ENTITY % inline "#PCDATA|c|i|em|term|cite|br|path|seealso|
+<!ENTITY % inline "#PCDATA|c|i|em|strong|term|cite|br|path|seealso|
url|marker|anno" >
<!-- XXX -->
<!ELEMENT p (%inline;)* >
@@ -40,6 +40,7 @@
<!ELEMENT c (#PCDATA|anno)* >
<!ELEMENT i (#PCDATA|c|anno)* >
<!ELEMENT em (#PCDATA|c|anno)* >
+<!ELEMENT strong (#PCDATA|c|anno)* >
<!ELEMENT anno (#PCDATA) >
<!-- XXX -->
@@ -68,7 +69,7 @@
<!ATTLIST list type (ordered|bulleted) "bulleted" >
<!ELEMENT taglist (tag,item+)+ >
<!ELEMENT tag (#PCDATA|c|i|em|br|seealso|url|marker|anno)* >
-<!ELEMENT item (%inline;|%block;|warning|note|dont|do)* >
+<!ELEMENT item (%inline;|%block;|warning|note|dont|do|quote)* >
<!-- References -->
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index c2d7d40446..75399992f2 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -785,39 +785,36 @@
<!-- Book -->
<xsl:template match="/book">
-
- <xsl:apply-templates name="parts"/>
- <xsl:apply-templates name="applications"/>
-
+ <xsl:apply-templates select="parts"/>
+ <xsl:apply-templates select="applications"/>
+ <xsl:apply-templates select="releasenotes"/>
</xsl:template>
<!-- Parts -->
<xsl:template match="parts">
- <xsl:apply-templates name="part"/>
+ <xsl:apply-templates select="part"/>
</xsl:template>
<!-- Applications -->
<xsl:template match="applications">
- <xsl:apply-templates name="application"/>
+ <xsl:apply-templates select="application"/>
</xsl:template>
-
<!-- Header -->
- <xsl:template match="header">
- </xsl:template>
-
- <!-- Section/Title -->
- <xsl:template match="section/title">
- </xsl:template>
-
- <xsl:template match="pagetext">
- </xsl:template>
+ <xsl:template match="header"/>
+
+ <!-- Section/Title -->
+ <xsl:template match="section/title"/>
+ <xsl:template match="pagetext"/>
- <!-- Chapter/Section -->
+ <!-- Chapter/Section, subsection level 1-->
<xsl:template match="chapter/section">
<xsl:param name="chapnum"/>
<h3>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
<a name="{generate-id(title)}">
<xsl:value-of select="$chapnum"/>.<xsl:number/>&#160;
<xsl:value-of select="title"/>
@@ -829,11 +826,14 @@
</xsl:apply-templates>
</xsl:template>
- <!-- Subsections lvl 3 and ... -->
+ <!-- Subsections lvl 2 -->
<xsl:template match="section/section">
<xsl:param name="chapnum"/>
<xsl:param name="sectnum"/>
<h4>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
<!-- xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$sectnum"/>.<xsl:number/ -->
<xsl:value-of select="title"/>
</h4>
@@ -842,10 +842,29 @@
</xsl:apply-templates>
</xsl:template>
+ <!-- Subsections lvl 3 and ... -->
+ <xsl:template match="section/section/section">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="sectnum"/>
+ <h5>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
+ <!-- xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$sectnum"/>.<xsl:number/ -->
+ <xsl:value-of select="title"/>
+ </h5>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
<!-- *ref/Section -->
<xsl:template match="erlref/section|cref/section|comref/section|fileref/section|appref/section">
<xsl:param name="chapnum"/>
<h3>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
<a name="{generate-id(title)}">
<xsl:value-of select="title"/>
</a>
@@ -873,7 +892,6 @@
<!-- Lists -->
-
<xsl:template match="list">
<xsl:param name="chapnum"/>
<ul>
@@ -981,6 +999,18 @@
</div>
</xsl:template>
+ <!-- Quote -->
+ <xsl:template match="quote">
+ <xsl:param name="chapnum"/>
+ <div class="quote">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </xsl:template>
+
<!-- Paragraph -->
<xsl:template match="p">
<p>
@@ -989,10 +1019,6 @@
</xsl:template>
<!-- Inline elements -->
- <xsl:template match="b">
- <strong><xsl:apply-templates/></strong>
- </xsl:template>
-
<xsl:template match="i">
<i><xsl:apply-templates/></i>
</xsl:template>
@@ -1009,6 +1035,10 @@
<strong><xsl:apply-templates/></strong>
</xsl:template>
+ <xsl:template match="strong">
+ <strong><xsl:apply-templates/></strong>
+ </xsl:template>
+
<!-- Code -->
<xsl:template match="code">
<xsl:param name="chapnum"/>
@@ -1095,11 +1125,11 @@
<xsl:param name="chapnum"/>
<xsl:param name="fignum"/>
- <em>Figure
+ <p><em>Figure
<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$fignum"/>:
&#160;
<xsl:apply-templates/>
- </em>
+ </em></p>
</xsl:template>
@@ -1286,9 +1316,7 @@
<xsl:with-param name="type">ref_man</xsl:with-param>
</xsl:call-template-->
-
<xsl:document href="{$outdir}/index.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
-
<xsl:call-template name="pagelayout"/>
</xsl:document>
</xsl:template>
@@ -2003,7 +2031,7 @@
</xsl:template>
<xsl:template match="seealso">
- <xsl:call-template name="seealso"/>
+ <xsl:call-template name="seealso"/>
</xsl:template>
<xsl:template name="seealso">
@@ -2085,16 +2113,27 @@
</xsl:template>
-
<xsl:template match="url">
<span class="bold_code"><a href="{@href}"><xsl:apply-templates/></a></span>
</xsl:template>
-
<xsl:template match="marker">
- <a name="{@id}"><xsl:apply-templates/></a>
+ <xsl:choose>
+ <xsl:when test="not(parent::section and following-sibling::title)">
+ <a name="{@id}"><xsl:apply-templates/></a>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
+ <xsl:template name="marker-before-title">
+ <xsl:choose>
+ <xsl:when test="self::marker and parent::section and following-sibling::title">
+ <a name="{@id}"><xsl:apply-templates/></a>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+
<xsl:template match="term">
<xsl:value-of select="@id"/>
<!-- xsl:choose>
@@ -2373,7 +2412,11 @@
<xsl:template name="nl">
<xsl:text>
-</xsl:text>
+ </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="seealso//text()">
+ <xsl:value-of select="normalize-space(.)"/>
</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 f75615c105..03b6b0691d 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -589,12 +589,6 @@
</xsl:template>
<!-- Inline elements -->
- <xsl:template match="b">
- <xsl:text>\fB</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>\fR\&amp; </xsl:text>
- </xsl:template>
-
<xsl:template match="i">
<xsl:text>\fI</xsl:text>
<xsl:apply-templates/>
@@ -622,6 +616,12 @@
<xsl:text>\fI</xsl:text> <xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
</xsl:template>
+ <xsl:template match="strong">
+ <xsl:text>\fB</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>\fR\&amp; </xsl:text>
+ </xsl:template>
+
<xsl:template match="seealso">
<xsl:choose>
<xsl:when test="ancestor::head">
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index e5e624ac4c..99263847fb 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -1171,6 +1171,16 @@
</fo:block>
</xsl:template>
+ <!-- Quote -->
+ <xsl:template match="quote">
+ <xsl:param name="chapnum"/>
+ <fo:block font-style="italic">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
<!-- Paragraph -->
<xsl:template match="p">
<fo:block xsl:use-attribute-sets="p">
@@ -1180,14 +1190,8 @@
<!-- Inline elements -->
- <xsl:template match="b">
- <fo:inline font-weight="bold">
- <xsl:apply-templates/>
- </fo:inline>
- </xsl:template>
-
<xsl:template match="i">
- <fo:inline font-weight="italic">
+ <fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
@@ -1203,7 +1207,13 @@
</xsl:template>
<xsl:template match="em">
- <fo:inline font-style="italic">
+ <fo:inline font-weight="bold">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="strong">
+ <fo:inline font-weight="bold">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
diff --git a/lib/erl_docgen/src/docgen_otp_specs.erl b/lib/erl_docgen/src/docgen_otp_specs.erl
index e154323f07..5bc3be7a8d 100644
--- a/lib/erl_docgen/src/docgen_otp_specs.erl
+++ b/lib/erl_docgen/src/docgen_otp_specs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2015. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -389,10 +389,10 @@ t_type([#xmlElement{name = list, content = Es}]) ->
t_list(Es);
t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
t_nonempty_list(Es);
-t_type([#xmlElement{name = tuple, content = Es}]) ->
- t_tuple(Es);
t_type([#xmlElement{name = map, content = Es}]) ->
t_map(Es);
+t_type([#xmlElement{name = tuple, content = Es}]) ->
+ t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
["fun("] ++ t_fun(Es) ++ [")"];
t_type([E = #xmlElement{name = record, content = Es}]) ->
@@ -435,16 +435,28 @@ t_nonempty_list(Es) ->
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+t_fun(Es) ->
+ ["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
+ [") -> "] ++ t_utype(get_elem(type, Es))).
+
t_map(Es) ->
Fs = get_elem(map_field, Es),
["#{"] ++ seq(fun t_map_field/1, Fs, ["}"]).
-t_map_field(#xmlElement{content = [K,V]}) ->
- [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
-
-t_fun(Es) ->
- ["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
- [") -> "] ++ t_utype(get_elem(type, Es))).
+t_map_field(#xmlElement{content = [K,V]}=E) ->
+ KElem = t_utype_elem(K),
+ VElem = t_utype_elem(V),
+ AT = get_attrval(assoc_type, E),
+ IsAny = fun(["any","()"]) -> true; (_) -> false end,
+ case AT =:= "assoc" andalso IsAny(KElem) andalso IsAny(VElem) of
+ true -> "...";
+ false ->
+ AS = case AT of
+ "assoc" -> " => ";
+ "exact" -> " := "
+ end,
+ KElem ++ [AS] ++ VElem
+ end.
t_record(E, Es) ->
Name = ["#"] ++ t_type(get_elem(atom, Es)),
@@ -618,8 +630,12 @@ ot_tuple(Es) ->
ot_map(Es) ->
{type,0,map,[ot_map_field(E) || E <- get_elem(map_field,Es)]}.
-ot_map_field(#xmlElement{content=[K,V]}) ->
- {type,0,map_field_assoc,[ot_utype_elem(K),ot_utype_elem(V)]}.
+ot_map_field(#xmlElement{content=[K,V]}=E) ->
+ A = case get_attrval(assoc_type, E) of
+ "assoc" -> map_field_assoc;
+ "exact" -> map_field_exact
+ end,
+ {type,0,A,[ot_utype_elem(K), ot_utype_elem(V)]}.
ot_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),
diff --git a/lib/erl_interface/src/misc/ei_portio.h b/lib/erl_interface/src/misc/ei_portio.h
index a14fdbd7d1..fbb61b0ccf 100644
--- a/lib/erl_interface/src/misc/ei_portio.h
+++ b/lib/erl_interface/src/misc/ei_portio.h
@@ -21,6 +21,12 @@
*/
#ifndef _EI_PORTIO_H
#define _EI_PORTIO_H
+#if !defined(__WIN32__) || !defined(VXWORKS)
+#ifdef HAVE_WRITEV
+/* Declaration of struct iovec *iov should be visible in this scope. */
+#include <sys/uio.h>
+#endif
+#endif
int ei_accept_t(int fd, void *addr, void *addrlen, unsigned ms);
int ei_connect_t(int fd, void *sinp, int sin_siz, unsigned ms);
@@ -29,8 +35,7 @@ int ei_write_fill(int fd, const char *buf, int len);
int ei_read_fill_t(int fd, char* buf, int len, unsigned ms);
int ei_write_fill_t(int fd, const char *buf, int len, unsigned ms);
#ifdef HAVE_WRITEV
-int ei_writev_fill_t(int fd, const struct iovec *iov, int iovcnt,
- unsigned ms);
+int ei_writev_fill_t(int fd, const struct iovec *iov, int iovcnt, unsigned ms);
#endif
#endif /* _EI_PORTIO_H */
diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl
index b8916c0eb9..aba90b0be1 100644
--- a/lib/et/src/et_collector.erl
+++ b/lib/et/src/et_collector.erl
@@ -27,8 +27,7 @@
-behaviour(gen_server).
%% External exports
--export([
- start_link/1,
+-export([start_link/1,
stop/1,
report/2,
@@ -55,8 +54,7 @@
dict_delete/2,
dict_lookup/2,
dict_match/2,
- multicast/2
- ]).
+ multicast/2]).
%% Internal export
-export([monitor_trace_port/2]).
@@ -258,7 +256,7 @@ parse_opt(BadList, _S, _Dict, _Clients) ->
{error, {bad_option_list, BadList}}.
start_clients(CollectorPid, [{Type, Parameters} | T]) ->
- start_trace_client(CollectorPid, Type, Parameters),
+ _ = start_trace_client(CollectorPid, Type, Parameters),
start_clients(CollectorPid, T);
start_clients(CollectorPid, []) ->
{ok, CollectorPid}.
@@ -892,7 +890,7 @@ init([InitialS, Dict]) ->
process_flag(trap_exit, true),
case InitialS#state.parent_pid of
undefined ->
- ignore;
+ ok;
Pid when is_pid(Pid) ->
link(Pid)
end,
@@ -914,7 +912,7 @@ init_global(S) ->
Spec = trace_spec_wrapper(EventFun, EndFun, {ok, self()}),
dbg:tracer(process, Spec),
et_selector:change_pattern(S#state.trace_pattern),
- net_kernel:monitor_nodes(true),
+ ok = net_kernel:monitor_nodes(true),
lists:foreach(fun(N) -> self() ! {nodeup, N} end, nodes()),
S#state{trace_nodes = [node()]};
false ->
@@ -1001,7 +999,7 @@ handle_call({save_event_file, FileName, Options}, _From, S) ->
%% insert() ->
%% case S2#state.file of
%% undefined ->
- %% ignore;
+ %% ok;
%% F ->
%% Fd = F#file.desc,
%% ok = disk_log:log(Fd, Event)
@@ -1010,7 +1008,7 @@ handle_call({save_event_file, FileName, Options}, _From, S) ->
Fun = fun({_, E}, A) -> ok = disk_log:log(Fd, E), A end,
Tab = S#state.event_tab,
Reply = tab_iterate(Fun, Tab, ets:first(Tab), ok),
- disk_log:close(Fd),
+ ok = disk_log:close(Fd),
{Reply, S}
%% all ->
%% Reply = tab_iterate(WriteFun, Tab, ok),
@@ -1033,7 +1031,7 @@ handle_call({save_event_file, FileName, Options}, _From, S) ->
handle_call({change_pattern, Pattern}, _From, S) ->
Ns = S#state.trace_nodes,
- rpc:multicall(Ns, et_selector, change_pattern, [Pattern]),
+ {_,[]} = rpc:multicall(Ns, et_selector, change_pattern, [Pattern]),
Reply = {old_pattern, S#state.trace_pattern},
S2 = S#state{trace_pattern = Pattern},
reply(Reply, S2);
@@ -1045,8 +1043,9 @@ handle_call(clear_table, _From, S) ->
handle_call(stop, _From, S) ->
do_multicast(S#state.subscribers, close),
case S#state.trace_global of
- true -> rpc:multicall(S#state.trace_nodes, dbg, stop_clear, []);
- false -> ignore
+ true -> {_,[]} = rpc:multicall(S#state.trace_nodes, dbg, stop_clear, []),
+ ok;
+ false -> ok
end,
{stop, shutdown, ok, S};
handle_call(Request, From, S) ->
@@ -1239,8 +1238,8 @@ tab_iterate(Fun, Tab, Key, Acc) ->
file_open(F) ->
Fd = make_ref(),
case F#file.file_opt of
- write -> file:rename(F#file.name, F#file.name ++ ".OLD");
- append -> ignore
+ write -> ok = file:rename(F#file.name, F#file.name ++ ".OLD");
+ append -> ok
end,
Args = [{file, F#file.name}, {name, Fd},
{repair, true}, {mode, read_write}],
@@ -1278,7 +1277,7 @@ do_multicast([], _Msg) ->
opt_unlink(Pid) ->
if
Pid =:= undefined ->
- ignore;
+ ok;
true ->
unlink(Pid)
end.
diff --git a/lib/et/src/et_wx_contents_viewer.erl b/lib/et/src/et_wx_contents_viewer.erl
index d5347a43db..247dd4c7ba 100644
--- a/lib/et/src/et_wx_contents_viewer.erl
+++ b/lib/et/src/et_wx_contents_viewer.erl
@@ -89,7 +89,7 @@ start_link(Options) ->
S#state.parent_pid =/= self() ->
unlink(Pid);
true ->
- ignore
+ ok
end,
{ok, Pid}
catch
@@ -242,11 +242,12 @@ handle_event(#wx{id = Id,
S) ->
case proplists:get_value(Id, S#state.menu_data) of
undefined ->
- ignore;
+ ok;
Data when is_record(Data, filter) ->
F = Data,
- ChildState= S#state{active_filter = F#filter.name},
- wx_object:start_link(?MODULE, [ChildState], []);
+ ChildState = S#state{active_filter = F#filter.name},
+ _ = wx_object:start_link(?MODULE, [ChildState], []),
+ ok;
{hide, Actors} ->
send_viewer_event(S, {delete_actors, Actors});
{show, Actors} ->
@@ -267,7 +268,7 @@ handle_event(#wx{id = Id,
TimeStamp =
case S#state.event_order of
trace_ts -> Event#event.trace_ts;
- event_ts -> Event#event.event_ts
+ event_ts -> Event#event.event_ts
end,
FileName = lists:flatten(["et_contents_viewer_", now_to_string(TimeStamp), ".txt"]),
Style = ?wxFD_SAVE bor ?wxFD_OVERWRITE_PROMPT,
@@ -275,7 +276,7 @@ handle_event(#wx{id = Id,
case select_file(S#state.frame, Msg, filename:absname(FileName), Style) of
{ok, FileName2} ->
Bin = list_to_binary(event_to_string(Event, S#state.event_order)),
- file:write_file(FileName2, Bin);
+ ok = file:write_file(FileName2, Bin);
cancel ->
ok
end,
@@ -351,19 +352,21 @@ handle_event(#wx{event = #wxKey{rawCode = KeyCode}}, S) ->
$0 ->
case lists:keysearch(?DEFAULT_FILTER_NAME, #filter.name, S#state.filters) of
{value, F} when is_record(F, filter) ->
- ChildState= S#state{active_filter = F#filter.name},
- wx_object:start_link(?MODULE, [ChildState], []);
+ ChildState = S#state{active_filter = F#filter.name},
+ _ = wx_object:start_link(?MODULE, [ChildState], []),
+ ok;
false ->
- ignore
+ ok
end,
{noreply, S};
Int when is_integer(Int), Int > $0, Int =< $9 ->
case catch lists:nth(Int-$0, S#state.filters) of
F when is_record(F, filter) ->
- ChildState= S#state{active_filter = F#filter.name},
- wx_object:start_link(?MODULE, [ChildState], []);
+ ChildState = S#state{active_filter = F#filter.name},
+ _ = wx_object:start_link(?MODULE, [ChildState], []),
+ ok;
{'EXIT', _} ->
- ignore
+ ok
end,
{noreply, S};
@@ -443,11 +446,11 @@ create_window(S) ->
Title = lists:concat([?MODULE, " (filter: ", Name, ")"]),
WinOpt = [{size, {W,H}}],
Frame = wxFrame:new(wx:null(), ?wxID_ANY, Title, WinOpt),
- wxFrame:createStatusBar(Frame),
+ _ = wxFrame:createStatusBar(Frame),
Panel = wxPanel:new(Frame, []),
Bar = wxMenuBar:new(),
- wxFrame:setMenuBar(Frame,Bar),
+ _ = wxFrame:setMenuBar(Frame,Bar),
create_file_menu(Bar),
Editor = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, 0
bor ?wxDEFAULT
@@ -457,21 +460,21 @@ create_window(S) ->
bor ?wxTE_DONTWRAP}]),
Font = wxFont:new(10, ?wxFONTFAMILY_TELETYPE, ?wxNORMAL, ?wxNORMAL,[]),
TextAttr = wxTextAttr:new(?wxBLACK, [{font, Font}]),
- wxTextCtrl:setDefaultStyle(Editor, TextAttr),
+ _ = wxTextCtrl:setDefaultStyle(Editor, TextAttr),
Sizer = wxBoxSizer:new(?wxHORIZONTAL),
- wxSizer:add(Sizer, Editor, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ _ = wxSizer:add(Sizer, Editor, [{flag, ?wxEXPAND}, {proportion, 1}]),
FilteredEvent = config_editor(Editor, S),
S2 = S#state{win = Frame, panel = Panel, filtered_event = FilteredEvent},
HideData = create_hide_menu(Bar, S2),
SearchData = create_search_menu(Bar, S2),
FilterData = create_filter_menu(Bar, S#state.filters),
- wxFrame:connect(Frame, command_menu_selected, []),
- wxFrame:connect(Frame, key_up),
- wxFrame:connect(Frame, close_window, [{skip,true}]),
- wxFrame:setFocus(Frame),
- wxPanel:setSizer(Panel, Sizer),
- wxSizer:fit(Sizer, Panel),
- wxFrame:show(Frame),
+ _ = wxFrame:connect(Frame, command_menu_selected, []),
+ _ = wxFrame:connect(Frame, key_up),
+ _ = wxFrame:connect(Frame, close_window, [{skip,true}]),
+ _ = wxFrame:setFocus(Frame),
+ _ = wxPanel:setSizer(Panel, Sizer),
+ _ = wxSizer:fit(Sizer, Panel),
+ _ = wxFrame:show(Frame),
S2#state{menu_data = HideData++SearchData++FilterData, editor = Editor, frame = Frame}.
menuitem(Menu, Id, Text, UserData) ->
@@ -480,16 +483,17 @@ menuitem(Menu, Id, Text, UserData) ->
create_file_menu(Bar) ->
Menu = wxMenu:new([]),
- wxMenu:append(Menu, ?wxID_SAVE, "Save"),
- wxMenu:append(Menu, ?wxID_PRINT,"Print"),
- wxMenu:appendSeparator(Menu),
- wxMenu:append(Menu, ?wxID_EXIT, "Close"),
- wxMenuBar:append(Bar, Menu, "File").
+ _ = wxMenu:append(Menu, ?wxID_SAVE, "Save"),
+ _ = wxMenu:append(Menu, ?wxID_PRINT,"Print"),
+ _ = wxMenu:appendSeparator(Menu),
+ _ = wxMenu:append(Menu, ?wxID_EXIT, "Close"),
+ _ = wxMenuBar:append(Bar, Menu, "File"),
+ ok.
create_filter_menu(Bar, Filters) ->
Menu = wxMenu:new([]),
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Select Filter"), [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Select Filter"), [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
Item = fun(F, {N,Acc}) when F#filter.name =:= ?DEFAULT_FILTER_NAME->
Label = lists:concat([pad_string(F#filter.name, 20, $\ , right), "(0)"]),
MenuItem = menuitem(Menu, ?wxID_ANY, Label, F),
@@ -502,7 +506,7 @@ create_filter_menu(Bar, Filters) ->
end,
Filters2 = lists:keysort(#filter.name, Filters),
{_,MenuData} = lists:foldl(Item, {1, []}, Filters2),
- wxMenuBar:append(Bar, Menu, "Filters"),
+ _ = wxMenuBar:append(Bar, Menu, "Filters"),
MenuData.
create_hide_menu(Bar, S) ->
@@ -515,33 +519,33 @@ create_hide_menu(Bar, S) ->
S#state.viewer_pid =:= undefined ->
ignore;
From =:= To ->
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
Hide = menuitem(Menu, ?wxID_ANY, "From=To (f|t|b)", {hide, [From]}),
- wxMenu:appendSeparator(Menu),
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
Show = menuitem(Menu, ?wxID_ANY, "From=To (F|T|B)", {show, [From]}),
[Show,Hide];
true ->
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
Hide = [menuitem(Menu, ?wxID_ANY, "From (f)", {hide, [From]}),
menuitem(Menu, ?wxID_ANY, "To (t)", {hide, [To]}),
menuitem(Menu, ?wxID_ANY, "Both (b)", {hide, [From, To]})],
- wxMenu:appendSeparator(Menu),
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
Show = [menuitem(Menu, ?wxID_ANY, "From (F)", {show, [From]}),
menuitem(Menu, ?wxID_ANY, "To (T)", {show, [To]}),
menuitem(Menu, ?wxID_ANY, "Both (B)", {show, [From, To]})],
Show++Hide
end,
- wxMenuBar:append(Bar, Menu, "Hide"),
+ _ = wxMenuBar:append(Bar, Menu, "Hide"),
MenuData.
create_search_menu(Bar, S) ->
@@ -549,9 +553,9 @@ create_search_menu(Bar, S) ->
E = S#state.filtered_event,
From = E#event.from,
To = E#event.to,
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Search in Viewer "),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Search in Viewer "),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
MenuData =
if
S#state.viewer_pid =:= undefined ->
@@ -571,7 +575,7 @@ create_search_menu(Bar, S) ->
menuitem(Menu, ?wxID_ANY, "Reverse from this event (r)", {mode, ModeR}),
menuitem(Menu, ?wxID_ANY, "Abort search. Display all (a)", {mode, all})]
end,
- wxMenuBar:append(Bar, Menu, "Search"),
+ _ = wxMenuBar:append(Bar, Menu, "Search"),
MenuData.
config_editor(Editor, S) ->
@@ -668,9 +672,10 @@ pad_string(String, MinLen, Char, Dir) when is_integer(MinLen), MinLen >= 0 ->
send_viewer_event(S, Event) ->
case S#state.viewer_pid of
ViewerPid when is_pid(ViewerPid) ->
- ViewerPid ! {et, Event};
+ ViewerPid ! {et, Event},
+ ok;
undefined ->
- ignore
+ ok
end.
select_file(Frame, Message, DefaultFile, Style) ->
diff --git a/lib/et/src/et_wx_viewer.erl b/lib/et/src/et_wx_viewer.erl
index 0fc10cb37b..9613299e6b 100644
--- a/lib/et/src/et_wx_viewer.erl
+++ b/lib/et/src/et_wx_viewer.erl
@@ -320,8 +320,8 @@ init([S]) when is_record(S, state) ->
undefined -> ok;
ParentPid -> link(ParentPid)
end,
- wx:new(),
- wx:debug(S#state.wx_debug),
+ _ = wx:new(),
+ _ = wx:debug(S#state.wx_debug),
et_collector:dict_insert(S#state.collector_pid,
{subscriber, self()},
?MODULE),
@@ -532,26 +532,25 @@ handle_info(#wx{id=Id, event = #wxCommand{type = command_menu_selected}}, S=#sta
load_all ->
Style = ?wxFD_OPEN bor ?wxFD_OVERWRITE_PROMPT,
Msg = "Select a file to load events from",
- S2 =
- case select_file(S#state.frame, Msg, S#state.event_file, Style) of
- {ok, NewFile} ->
- et_collector:start_trace_client(CollectorPid, event_file, NewFile),
- S#state{event_file = NewFile};
- cancel ->
- S
- end,
+ S2 = case select_file(S#state.frame, Msg, S#state.event_file, Style) of
+ {ok, NewFile} ->
+ _ = et_collector:start_trace_client(CollectorPid, event_file, NewFile),
+ S#state{event_file = NewFile};
+ cancel ->
+ S
+ end,
noreply(S2);
save_all ->
Style = ?wxFD_SAVE bor ?wxFD_OVERWRITE_PROMPT,
Msg = "Select a file to save events to",
- S2 =
- case select_file(S#state.frame, Msg, S#state.event_file, Style) of
- {ok, NewFile} ->
- et_collector:save_event_file(CollectorPid, NewFile, [existing, write, keep]),
- S#state{event_file = NewFile};
- cancel ->
- S
- end,
+ S2 = case select_file(S#state.frame, Msg, S#state.event_file, Style) of
+ {ok, NewFile} ->
+ ok = et_collector:save_event_file(CollectorPid, NewFile,
+ [existing, write, keep]),
+ S#state{event_file = NewFile};
+ cancel ->
+ S
+ end,
noreply(S2);
print_setup ->
S2 = print_setup(S),
@@ -787,7 +786,7 @@ handle_info(#wx{event = #wxKey{keyCode = KeyCode, shiftDown = SD}}, S) ->
noreply(S)
end;
handle_info(#wx{event = #wxScroll{type = scroll_changed}} = Wx, S) ->
- get_latest_scroll(Wx),
+ _ = get_latest_scroll(Wx),
Pos = wxScrollBar:getThumbPosition(S#state.scroll_bar),
{_, LineTopY, LineBotY} = calc_y(S),
Range = LineBotY - LineTopY,
@@ -1107,7 +1106,7 @@ pick_n([Head | Tail], N, Acc) when N > 0 ->
pick_n(Tail, N - 1, [Head | Acc]).
close_all(S) ->
- close_all_others(S),
+ _ = close_all_others(S),
wxFrame:destroy(S#state.frame),
opt_unlink(S#state.parent_pid),
{stop, shutdown, S}.
@@ -1115,12 +1114,12 @@ close_all(S) ->
close_all_others(S) ->
Fun =
fun({{subscriber, Pid}, _}) ->
- if
- Pid =:= self() ->
- ignore;
+ if Pid =:= self() ->
+ ok;
true ->
unlink(Pid),
- Pid ! {et, close}
+ Pid ! {et, close},
+ ok
end
end,
All = et_collector:dict_match(S#state.collector_pid,
@@ -1208,9 +1207,9 @@ create_main_window(S) ->
CheckBoxData = [{wxCheckBox:getId(HideActions), hide_actions},
{wxCheckBox:getId(HideActors), hide_actors}],
wxPanel:connect(Panel, command_checkbox_clicked),
- wxSizer:add(CheckSizer, HideActions),
- wxSizer:add(CheckSizer,HideActors),
- wxSizer:add(OptSizer, CheckSizer, [{border, 10}, {flag, ?wxALL}]),
+ _ = wxSizer:add(CheckSizer, HideActions),
+ _ = wxSizer:add(CheckSizer,HideActors),
+ _ = wxSizer:add(OptSizer, CheckSizer, [{border, 10}, {flag, ?wxALL}]),
DetailLevelBox = wxStaticBoxSizer:new(?wxHORIZONTAL,
Panel,
[{label, "Detail level"}]),
@@ -1222,22 +1221,21 @@ create_main_window(S) ->
{size, {200,-1}}]),
wxStatusBar:setStatusText(StatusBar, where_text(S)),
wxFrame:connect(Frame, command_slider_updated),
- wxSizer:add(DetailLevelBox, DetailLevel),
- wxSizer:add(OptSizer, DetailLevelBox, [{border, 10}, {flag, ?wxALL}]),
- wxSizer:addStretchSpacer(OptSizer),
- wxSizer:add(MainSizer, OptSizer),
- wxSizer:add(MainSizer,
- wxStaticLine:new(Panel, [{style, ?wxLI_HORIZONTAL}]),
- [{flag, ?wxEXPAND}]),
+ _ = wxSizer:add(DetailLevelBox, DetailLevel),
+ _ = wxSizer:add(OptSizer, DetailLevelBox, [{border, 10}, {flag, ?wxALL}]),
+ _ = wxSizer:addStretchSpacer(OptSizer),
+ _ = wxSizer:add(MainSizer, OptSizer),
+ _ = wxSizer:add(MainSizer, wxStaticLine:new(Panel, [{style, ?wxLI_HORIZONTAL}]),
+ [{flag, ?wxEXPAND}]),
CanvasSizer = wxBoxSizer:new(?wxHORIZONTAL),
Canvas = wxPanel:new(Panel, [{style, ?wxFULL_REPAINT_ON_RESIZE}]),
{CanvasW,CanvasH} = wxPanel:getSize(Canvas),
ScrollBar = wxScrollBar:new(Panel, ?wxID_ANY, [{style, ?wxSB_VERTICAL}]),
- wxSizer:add(CanvasSizer, Canvas, [{flag, ?wxEXPAND}, {proportion, 1}]),
- wxSizer:add(CanvasSizer, ScrollBar, [{flag, ?wxEXPAND}]),
- wxSizer:add(MainSizer, CanvasSizer, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ _ = wxSizer:add(CanvasSizer, Canvas, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ _ = wxSizer:add(CanvasSizer, ScrollBar, [{flag, ?wxEXPAND}]),
+ _ = wxSizer:add(MainSizer, CanvasSizer, [{flag, ?wxEXPAND}, {proportion, 1}]),
wxPanel:connect(Canvas, left_down),
wxPanel:connect(Canvas, left_up),
wxPanel:connect(Canvas, right_up),
@@ -1337,8 +1335,7 @@ menuitem(Menu, Id, Text, UserData) ->
create_file_menu(Bar) ->
Menu = wxMenu:new([]),
- Data = [
- menuitem(Menu, ?wxID_ANY, "Clear all events in the Collector", clear_all),
+ Data = [menuitem(Menu, ?wxID_ANY, "Clear all events in the Collector", clear_all),
menuitem(Menu, ?wxID_ANY, "Load events to the Collector from file", load_all),
menuitem(Menu, ?wxID_ANY, "Save all events in the Collector to file", save_all),
@@ -1348,51 +1345,44 @@ create_file_menu(Bar) ->
menuitem(Menu, ?wxID_ANY, "Close this Viewer", close),
menuitem(Menu, ?wxID_ANY, "Close all other Viewers, but this (c)", close_all_others),
- menuitem(Menu, ?wxID_ANY, "Close all Viewers and the Collector) (C) ", close_all)
- ],
- wxMenu:insertSeparator(Menu, 3),
- wxMenu:insertSeparator(Menu, 7),
+ menuitem(Menu, ?wxID_ANY, "Close all Viewers and the Collector) (C) ", close_all)],
+ _ = wxMenu:insertSeparator(Menu, 3),
+ _ = wxMenu:insertSeparator(Menu, 7),
wxMenuBar:append(Bar, Menu, "File"),
Data.
create_viewer_menu(Bar) ->
Menu = wxMenu:new([]),
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll this Viewer"),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
- D1 = [
- menuitem(Menu, ?wxID_ANY, "First (f)", first),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll this Viewer"),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
+ D1 = [menuitem(Menu, ?wxID_ANY, "First (f)", first),
menuitem(Menu, ?wxID_ANY, "Last (l)", last),
menuitem(Menu, ?wxID_ANY, "Prev (p)", prev),
menuitem(Menu, ?wxID_ANY, "Next (n)", next),
- menuitem(Menu, ?wxID_ANY, "Refresh (r)", refresh)
- ],
- wxMenu:appendSeparator(Menu),
- D2 = [
- menuitem(Menu, ?wxID_ANY, "Up 5 (Up)", up),
- menuitem(Menu, ?wxID_ANY, "Down 5 (Down)", down)
- ],
- wxMenu:appendSeparator(Menu),
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Actor visibility in this Viewer"),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
+ menuitem(Menu, ?wxID_ANY, "Refresh (r)", refresh)],
+ _ = wxMenu:appendSeparator(Menu),
+ D2 = [menuitem(Menu, ?wxID_ANY, "Up 5 (Up)", up),
+ menuitem(Menu, ?wxID_ANY, "Down 5 (Down)", down)],
+ _ = wxMenu:appendSeparator(Menu),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Actor visibility in this Viewer"),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
D3 = [menuitem(Menu, ?wxID_ANY, "Display all actors (a)", display_all)],
- wxMenuBar:append(Bar, Menu, "Viewer"),
+ _ = wxMenuBar:append(Bar, Menu, "Viewer"),
[D1,D2,D3].
create_collector_menu(Bar) ->
Menu = wxMenu:new([]),
- wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll all Viewers"),
- [{enable, false}]),
- wxMenu:appendSeparator(Menu),
- Data = [
- menuitem(Menu, ?wxID_ANY, "First (F)", first_all),
+ _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll all Viewers"),
+ [{enable, false}]),
+ _ = wxMenu:appendSeparator(Menu),
+ Data = [menuitem(Menu, ?wxID_ANY, "First (F)", first_all),
menuitem(Menu, ?wxID_ANY, "Last (L)", last_all),
menuitem(Menu, ?wxID_ANY, "Prev (P)", prev_all),
menuitem(Menu, ?wxID_ANY, "Next (N)", next_all),
- menuitem(Menu, ?wxID_ANY, "Refresh (R)", refresh_all)
- ],
- wxMenuBar:append(Bar, Menu, "Collector"),
+ menuitem(Menu, ?wxID_ANY, "Refresh (R)", refresh_all)],
+ _ = wxMenuBar:append(Bar, Menu, "Collector"),
Data.
create_filter_menu(S=#state{filter_menu = {Menu,Data}}, ActiveFilterName, Filters) ->
@@ -1421,21 +1411,19 @@ create_filter_menu(S=#state{filter_menu = {Menu,Data}}, ActiveFilterName, Filter
Same = lists:concat([pad_string(ActiveFilterName, 20), "(=) same scale"]),
Larger = lists:concat([pad_string(ActiveFilterName, 20), "(+) bigger scale"]),
Smaller = lists:concat([pad_string(ActiveFilterName, 20), "(-) smaller scale"]),
- D2 = [
- menuitem(Menu, ?wxID_ANY, Same, {data, Filter, 0}),
+ D2 = [menuitem(Menu, ?wxID_ANY, Same, {data, Filter, 0}),
menuitem(Menu, ?wxID_ANY, Smaller, {data, Filter, -1}),
menuitem(Menu, ?wxID_ANY, Larger, {data, Filter, 1}),
wxMenu:appendSeparator(Menu),
I2 = wxMenu:append(Menu, ?wxID_ANY, "New Filter Same Scale"),
- wxMenu:appendSeparator(Menu)
- ],
- wxMenuItem:enable(I2, [{enable,false}]),
+ wxMenu:appendSeparator(Menu)],
+ _ = wxMenuItem:enable(I2, [{enable,false}]),
{_,D3} = lists:foldl(Item, {1,[]}, Filters),
S#state{filter_menu = {Menu, lists:flatten([D1,D2,D3])}}.
create_help_menu(Bar) ->
Menu = wxMenu:new([]),
- menuitem(Menu, ?wxID_HELP, "Info", help),
+ _ = menuitem(Menu, ?wxID_HELP, "Info", help),
wxMenuBar:append(Bar, Menu, "Help").
clear_canvas(S) ->
diff --git a/lib/hipe/amd64/Makefile b/lib/hipe/amd64/Makefile
index 0d81ff4d72..8dc2af2679 100644
--- a/lib/hipe/amd64/Makefile
+++ b/lib/hipe/amd64/Makefile
@@ -73,7 +73,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += -DHIPE_AMD64 +warn_exported_vars
+ERL_COMPILE_FLAGS += -DHIPE_AMD64 -Werror +warn_export_vars
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/arm/Makefile b/lib/hipe/arm/Makefile
index 6622680ee1..00b6732afa 100644
--- a/lib/hipe/arm/Makefile
+++ b/lib/hipe/arm/Makefile
@@ -74,7 +74,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index 78930154a9..9f50d6bf91 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -66,7 +66,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += -Werror +inline +warn_exported_vars +warn_unused_import +warn_missing_spec #+warn_untyped_record
+ERL_COMPILE_FLAGS += +inline -Werror +warn_export_vars +warn_unused_import +warn_missing_spec #+warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index b037a4360c..c383541020 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -1751,14 +1751,14 @@ map_def_val(?map(_,_,DefV)) ->
-spec mapdict_store(t_map_pair(), t_map_dict()) -> t_map_dict().
mapdict_store(E={K,_,_}, [{K,_,_}|T]) -> [E|T];
-mapdict_store(E1={K1,_,_}, [E2={K2,_,_}|T]) when K1 > K2->
+mapdict_store(E1={K1,_,_}, [E2={K2,_,_}|T]) when K1 > K2 ->
[E2|mapdict_store(E1, T)];
mapdict_store(E={_,_,_}, T) -> [E|T].
-spec mapdict_insert(t_map_pair(), t_map_dict()) -> t_map_dict().
mapdict_insert(E={K,_,_}, D=[{K,_,_}|_]) -> error(badarg, [E, D]);
-mapdict_insert(E1={K1,_,_}, [E2={K2,_,_}|T]) when K1 > K2->
+mapdict_insert(E1={K1,_,_}, [E2={K2,_,_}|T]) when K1 > K2 ->
[E2|mapdict_insert(E1, T)];
mapdict_insert(E={_,_,_}, T) -> [E|T].
@@ -1769,25 +1769,26 @@ mapdict_insert(E={_,_,_}, T) -> [E|T].
t_map_mandatoriness(), erl_type())
-> t_map_pair() | false),
erl_type(), erl_type()) -> t_map_dict().
-map_pairwise_merge(F, ?map(APairs, ADefK, ADefV),
- ?map(BPairs, BDefK, BDefV)) ->
+map_pairwise_merge(F, ?map(APairs, ADefK, ADefV), ?map(BPairs, BDefK, BDefV)) ->
map_pairwise_merge(F, APairs, ADefK, ADefV, BPairs, BDefK, BDefV).
map_pairwise_merge(_, [], _, _, [], _, _) -> [];
map_pairwise_merge(F, As0, ADefK, ADefV, Bs0, BDefK, BDefV) ->
- case {As0, Bs0} of
- {[{K,AMNess,AV}|As], [{K, BMNess,BV}|Bs]} -> ok;
- {[{K,AMNess,AV}|As], [{BK,_, _ }|_]=Bs} when K < BK ->
- {BMNess, BV} = {?opt, mapmerge_otherv(K, BDefK, BDefV)};
- {As, [{K, BMNess,BV}|Bs]} ->
- {AMNess, AV} = {?opt, mapmerge_otherv(K, ADefK, ADefV)};
- {[{K,AMNess,AV}|As], []=Bs} ->
- {BMNess, BV} = {?opt, mapmerge_otherv(K, BDefK, BDefV)}
- end,
- MK = K, %% Rename to make clear that we are matching below
- case F(K, AMNess, AV, BMNess, BV) of
- false -> map_pairwise_merge(F,As,ADefK,ADefV,Bs,BDefK,BDefV);
- M={MK,_,_} -> [M|map_pairwise_merge(F,As,ADefK,ADefV,Bs,BDefK,BDefV)]
+ {K1, AMNess1, AV1, As1, BMNess1, BV1, Bs1} =
+ case {As0, Bs0} of
+ {[{K,AMNess,AV}|As], [{K, BMNess,BV}|Bs]} ->
+ {K, AMNess, AV, As, BMNess, BV, Bs};
+ {[{K,AMNess,AV}|As], [{BK,_, _ }|_]=Bs} when K < BK ->
+ {K, AMNess, AV, As, ?opt, mapmerge_otherv(K, BDefK, BDefV), Bs};
+ {As, [{K, BMNess,BV}|Bs]} ->
+ {K, ?opt, mapmerge_otherv(K, ADefK, ADefV), As, BMNess, BV, Bs};
+ {[{K,AMNess,AV}|As], []=Bs} ->
+ {K, AMNess, AV, As, ?opt, mapmerge_otherv(K, BDefK, BDefV), Bs}
+ end,
+ MK = K1, %% Rename to make clear that we are matching below
+ case F(K1, AMNess1, AV1, BMNess1, BV1) of
+ false -> map_pairwise_merge(F,As1,ADefK,ADefV,Bs1,BDefK,BDefV);
+ {MK,_,_}=M -> [M|map_pairwise_merge(F,As1,ADefK,ADefV,Bs1,BDefK,BDefV)]
end.
%% Folds over the pairs in two maps simultaneously in reverse key order. Missing
@@ -1804,17 +1805,19 @@ map_pairwise_merge_foldr(F, AccIn, ?map(APairs, ADefK, ADefV),
map_pairwise_merge_foldr(_, Acc, [], _, _, [], _, _) -> Acc;
map_pairwise_merge_foldr(F, AccIn, As0, ADefK, ADefV, Bs0, BDefK, BDefV) ->
- case {As0, Bs0} of
- {[{K,AMNess,AV}|As], [{K, BMNess,BV}|Bs]} -> ok;
- {[{K,AMNess,AV}|As], [{BK,_, _ }|_]=Bs} when K < BK ->
- {BMNess, BV} = {?opt, mapmerge_otherv(K, BDefK, BDefV)};
- {As, [{K, BMNess,BV}|Bs]} ->
- {AMNess, AV} = {?opt, mapmerge_otherv(K, ADefK, ADefV)};
- {[{K,AMNess,AV}|As], []=Bs} ->
- {BMNess, BV} = {?opt, mapmerge_otherv(K, BDefK, BDefV)}
- end,
- F(K, AMNess, AV, BMNess, BV,
- map_pairwise_merge_foldr(F,AccIn,As,ADefK,ADefV,Bs,BDefK,BDefV)).
+ {K1, AMNess1, AV1, As1, BMNess1, BV1, Bs1} =
+ case {As0, Bs0} of
+ {[{K,AMNess,AV}|As], [{K,BMNess,BV}|Bs]} ->
+ {K, AMNess, AV, As, BMNess, BV, Bs};
+ {[{K,AMNess,AV}|As], [{BK,_, _ }|_]=Bs} when K < BK ->
+ {K, AMNess, AV, As, ?opt, mapmerge_otherv(K, BDefK, BDefV), Bs};
+ {As, [{K,BMNess,BV}|Bs]} ->
+ {K, ?opt, mapmerge_otherv(K, ADefK, ADefV), As, BMNess, BV, Bs};
+ {[{K,AMNess,AV}|As], []=Bs} ->
+ {K, AMNess, AV, As, ?opt, mapmerge_otherv(K, BDefK, BDefV), Bs}
+ end,
+ F(K1, AMNess1, AV1, BMNess1, BV1,
+ map_pairwise_merge_foldr(F,AccIn,As1,ADefK,ADefV,Bs1,BDefK,BDefV)).
%% By observing that a missing pair in a map is equivalent to an optional pair,
%% with ?none or DefV value, depending on whether K \in DefK, we can simplify
diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile
index fe1675b7dd..d883eecf36 100644
--- a/lib/hipe/flow/Makefile
+++ b/lib/hipe/flow/Makefile
@@ -66,7 +66,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec # +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars +warn_missing_spec +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/flow/cfg.hrl b/lib/hipe/flow/cfg.hrl
index 641ec102db..2575b9e38a 100644
--- a/lib/hipe/flow/cfg.hrl
+++ b/lib/hipe/flow/cfg.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -38,8 +38,8 @@
is_closure :: boolean(),
closure_arity = none :: 'none' | arity(),
is_leaf :: boolean(),
- params, % :: list()
- info = []}). %% this field seems not needed; take out??
+ params :: list(), %% XXX: refine
+ info = [] :: list()}). %% seems not needed; take out??
-type cfg_info() :: #cfg_info{}.
%%
diff --git a/lib/hipe/flow/hipe_dominators.erl b/lib/hipe/flow/hipe_dominators.erl
index 1b147607c7..72c16b5688 100644
--- a/lib/hipe/flow/hipe_dominators.erl
+++ b/lib/hipe/flow/hipe_dominators.erl
@@ -59,7 +59,7 @@
-record(domTree, {root :: cfg_lbl(),
size = 0 :: non_neg_integer(),
nodes = gb_trees:empty() :: gb_trees:tree()}).
--type domTree() :: #domTree{}.
+-opaque domTree() :: #domTree{}.
%%>----------------------------------------------------------------------<
%% Procedure : domTree_create/1
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile
index a5edb10d90..b220bc16a0 100644
--- a/lib/hipe/icode/Makefile
+++ b/lib/hipe/icode/Makefile
@@ -59,7 +59,7 @@ DOC_MODULES = hipe_beam_to_icode \
hipe_icode_pp hipe_icode_primops \
hipe_icode_range \
hipe_icode_split_arith \
- hipe_icode_ssa hipe_icode_ssa_const_prop \
+ hipe_icode_ssa hipe_icode_ssa_const_prop hipe_icode_call_elim \
hipe_icode_ssa_copy_prop hipe_icode_ssa_struct_reuse \
hipe_icode_type $(HIPE_MODULES)
@@ -84,7 +84,7 @@ DOC_FILES= $(DOC_MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_unused_import +warn_exported_vars +warn_missing_spec # +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_unused_import +warn_export_vars +warn_missing_spec # +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/icode/hipe_icode.erl b/lib/hipe/icode/hipe_icode.erl
index 07d230491d..78508dff22 100644
--- a/lib/hipe/icode/hipe_icode.erl
+++ b/lib/hipe/icode/hipe_icode.erl
@@ -610,7 +610,9 @@
%% Exported types
%%
--export_type([icode/0]).
+-export_type([icode/0, params/0]).
+
+-type params() :: [icode_var()].
%%---------------------------------------------------------------------
%%
@@ -618,7 +620,7 @@
%%
%%---------------------------------------------------------------------
--spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()],
+-spec mk_icode(mfa(), params(), boolean(), boolean(), [icode_instr()],
{non_neg_integer(),non_neg_integer()},
{icode_lbl(),icode_lbl()}) -> icode().
mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) ->
@@ -629,7 +631,7 @@ mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) ->
var_range=VarRange,
label_range=LabelRange}.
--spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()],
+-spec mk_icode(mfa(), params(), boolean(), boolean(), [icode_instr()],
hipe_consttab(), {non_neg_integer(),non_neg_integer()},
{icode_lbl(),icode_lbl()}) -> icode().
mk_icode(Fun, Params, IsClosure, IsLeaf, Code, Data, VarRange, LabelRange) ->
@@ -640,11 +642,11 @@ mk_icode(Fun, Params, IsClosure, IsLeaf, Code, Data, VarRange, LabelRange) ->
-spec icode_fun(icode()) -> mfa().
icode_fun(#icode{'fun' = MFA}) -> MFA.
--spec icode_params(icode()) -> [icode_var()].
+-spec icode_params(icode()) -> params().
icode_params(#icode{params = Params}) -> Params.
--spec icode_params_update(icode(), [icode_var()]) -> icode().
-icode_params_update(Icode, Params) ->
+-spec icode_params_update(icode(), params()) -> icode().
+icode_params_update(Icode, Params) ->
Icode#icode{params = Params}.
-spec icode_is_closure(icode()) -> boolean().
diff --git a/lib/hipe/icode/hipe_icode.hrl b/lib/hipe/icode/hipe_icode.hrl
index 999c54732b..b2e0d86b28 100644
--- a/lib/hipe/icode/hipe_icode.hrl
+++ b/lib/hipe/icode/hipe_icode.hrl
@@ -169,7 +169,7 @@
%%---------------------------------------------------------------------
-record(icode, {'fun' :: mfa(),
- params :: [icode_var()],
+ params :: hipe_icode:params(),
%% TODO: merge is_closure and closure_arity into one field
is_closure :: boolean(),
closure_arity = none :: 'none' | arity(),
diff --git a/lib/hipe/icode/hipe_icode_call_elim.erl b/lib/hipe/icode/hipe_icode_call_elim.erl
new file mode 100644
index 0000000000..6a22133962
--- /dev/null
+++ b/lib/hipe/icode/hipe_icode_call_elim.erl
@@ -0,0 +1,78 @@
+%% -*- erlang-indent-level: 2 -*-
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+%% File : hipe_icode_call_elim.erl
+%% Authors : Daniel S. McCain <[email protected]>,
+%% Magnus Lång <[email protected]>
+%% Created : 14 Apr 2014 by Magnus Lång <[email protected]>
+%% Purpose : Eliminate calls to BIFs that are side-effect free only when
+%% executed on some argument types.
+%%----------------------------------------------------------------------
+-module(hipe_icode_call_elim).
+-export([cfg/1]).
+
+-include("hipe_icode.hrl").
+-include("../flow/cfg.hrl").
+
+-spec cfg(cfg()) -> cfg().
+
+cfg(IcodeSSA) ->
+ lists:foldl(fun (Lbl, CFG1) ->
+ BB1 = hipe_icode_cfg:bb(CFG1, Lbl),
+ Code1 = hipe_bb:code(BB1),
+ Code2 = lists:map(fun elim_insn/1, Code1),
+ BB2 = hipe_bb:code_update(BB1, Code2),
+ hipe_icode_cfg:bb_add(CFG1, Lbl, BB2)
+ end, IcodeSSA, hipe_icode_cfg:labels(IcodeSSA)).
+
+-spec elim_insn(icode_instr()) -> icode_instr().
+elim_insn(Insn=#icode_call{'fun'={_,_,_}=MFA, args=Args, type=remote,
+ dstlist=[Dst=#icode_variable{
+ annotation={type_anno, RetType, _}}]}) ->
+ Opaques = 'universe',
+ case erl_types:t_is_singleton(RetType, Opaques) of
+ true ->
+ ArgTypes = [case Arg of
+ #icode_variable{annotation={type_anno, Type, _}} -> Type;
+ #icode_const{} ->
+ erl_types:t_from_term(hipe_icode:const_value(Arg))
+ end || Arg <- Args],
+ case can_be_eliminated(MFA, ArgTypes) of
+ true ->
+ Const = hipe_icode:mk_const(
+ erl_types:t_singleton_to_term(RetType, Opaques)),
+ #icode_move{dst=Dst, src=Const};
+ false -> Insn
+ end;
+ false -> Insn
+ end;
+elim_insn(Insn) -> Insn.
+
+
+%% A function can be eliminated for some argument types if it has no side
+%% effects when run on arguments of those types.
+
+-spec can_be_eliminated(mfa(), [erl_types:erl_type()]) -> boolean().
+
+can_be_eliminated({maps, is_key, 2}, [_K, M]) ->
+ erl_types:t_is_map(M);
+can_be_eliminated(_, _) ->
+ false.
diff --git a/lib/hipe/icode/hipe_icode_cfg.erl b/lib/hipe/icode/hipe_icode_cfg.erl
index b9969fa69d..9a602c0283 100644
--- a/lib/hipe/icode/hipe_icode_cfg.erl
+++ b/lib/hipe/icode/hipe_icode_cfg.erl
@@ -55,6 +55,9 @@
-spec postorder(cfg()) -> [icode_lbl()].
-spec reverse_postorder(cfg()) -> [icode_lbl()].
+-spec params(cfg()) -> hipe_icode:params().
+-spec params_update(cfg(), hipe_icode:params()) -> cfg().
+
-spec is_visited(icode_lbl(), gb_sets:set()) -> boolean().
-spec visit(icode_lbl(), gb_sets:set()) -> gb_sets:set().
diff --git a/lib/hipe/icode/hipe_icode_range.erl b/lib/hipe/icode/hipe_icode_range.erl
index 24ffc71237..12ed796690 100644
--- a/lib/hipe/icode/hipe_icode_range.erl
+++ b/lib/hipe/icode/hipe_icode_range.erl
@@ -89,6 +89,7 @@
ret_type :: range(),
lookup_fun :: call_fun(),
result_action :: final_fun()}).
+-type state() :: #state{}.
-define(WIDEN, 1).
@@ -172,7 +173,7 @@ analyse(Cfg, Data) ->
catch throw:no_input -> ok
end.
--spec safe_analyse(cfg(), data()) -> #state{}.
+-spec safe_analyse(cfg(), data()) -> state().
safe_analyse(CFG, Data={MFA,_,_,_}) ->
State = state__init(CFG, Data),
@@ -181,14 +182,14 @@ safe_analyse(CFG, Data={MFA,_,_,_}) ->
(state__result_action(NewState))(MFA, [state__ret_type(NewState)]),
NewState.
--spec rewrite_blocks(#state{}) -> #state{}.
+-spec rewrite_blocks(state()) -> state().
rewrite_blocks(State) ->
CFG = state__cfg(State),
Start = hipe_icode_cfg:start_label(CFG),
rewrite_blocks([Start], State, [Start]).
--spec rewrite_blocks([label()], #state{}, [label()]) -> #state{}.
+-spec rewrite_blocks([label()], state(), [label()]) -> state().
rewrite_blocks([Next|Rest], State, Visited) ->
Info = state__info_in(State, Next),
@@ -201,7 +202,7 @@ rewrite_blocks([Next|Rest], State, Visited) ->
rewrite_blocks([], State, _) ->
State.
--spec analyse_blocks(#state{}, work_list()) -> #state{}.
+-spec analyse_blocks(state(), work_list()) -> state().
analyse_blocks(State, Work) ->
case get_work(Work) of
@@ -218,7 +219,7 @@ analyse_blocks(State, Work) ->
analyse_blocks(NewState, NewWork2)
end.
--spec analyse_block(label(), info(), #state{}, boolean()) -> {#state{}, [label()]}.
+-spec analyse_block(label(), info(), state(), boolean()) -> {state(), [label()]}.
analyse_block(Label, Info, State, Rewrite) ->
BB = state__bb(State, Label),
@@ -612,36 +613,32 @@ analyse_if(If, Info, Rewrite) ->
{#icode_goto{} | #icode_if{}, [{label(), info()}]}.
analyse_sane_if(If, Info, [Arg1, Arg2], [Range1, Range2], Rewrite) ->
- case normalize_name(hipe_icode:if_op(If)) of
- '>' ->
- {TrueRange2, TrueRange1, FalseRange2, FalseRange1} =
- range_inequality_propagation(Range2, Range1);
- '<' ->
- {TrueRange1, TrueRange2, FalseRange1, FalseRange2} =
+ {TrueRange1, TrueRange2, FalseRange1, FalseRange2} =
+ case normalize_name(hipe_icode:if_op(If)) of
+ '>' ->
+ {TR2, TR1, FR2, FR1} = range_inequality_propagation(Range2, Range1),
+ {TR1, TR2, FR1, FR2};
+ '<' ->
range_inequality_propagation(Range1, Range2);
- '>=' ->
- {FalseRange1, FalseRange2, TrueRange1, TrueRange2} =
- range_inequality_propagation(Range1, Range2);
- '=<' ->
- {FalseRange2, FalseRange1, TrueRange2, TrueRange1} =
- range_inequality_propagation(Range2, Range1);
- '=:=' ->
- {TrueRange1, TrueRange2, FalseRange1, FalseRange2} =
- range_equality_propagation(Range1, Range2);
- '=/=' ->
- {FalseRange1, FalseRange2, TrueRange1, TrueRange2} =
- range_equality_propagation(Range1, Range2);
- '==' ->
- {TempTrueRange1, TempTrueRange2, FalseRange1, FalseRange2} =
- range_equality_propagation(Range1, Range2),
- TrueRange1 = set_other(TempTrueRange1, other(Range1)),
- TrueRange2 = set_other(TempTrueRange2, other(Range2));
- '/=' ->
- {TempFalseRange1, TempFalseRange2, TrueRange1, TrueRange2} =
- range_equality_propagation(Range1, Range2),
- FalseRange1 = set_other(TempFalseRange1, other(Range1)),
- FalseRange2 = set_other(TempFalseRange2, other(Range2))
- end,
+ '>=' ->
+ {FR1, FR2, TR1, TR2} = range_inequality_propagation(Range1, Range2),
+ {TR1, TR2, FR1, FR2};
+ '=<' ->
+ {FR2, FR1, TR2, TR1} = range_inequality_propagation(Range2, Range1),
+ {TR1, TR2, FR1, FR2};
+ '=:=' ->
+ {TR1, TR2, FR1, FR2} = range_equality_propagation(Range1, Range2),
+ {TR1, TR2, FR1, FR2};
+ '=/=' ->
+ {FR1, FR2, TR1, TR2} = range_equality_propagation(Range1, Range2),
+ {TR1, TR2, FR1, FR2};
+ '==' ->
+ {TR1, TR2, FR1, FR2} = range_equality_propagation(Range1, Range2),
+ {set_other(TR1,other(Range1)), set_other(TR2,other(Range2)), FR1, FR2};
+ '/=' ->
+ {FR1, FR2, TR1, TR2} = range_equality_propagation(Range1, Range2),
+ {TR1, TR2, set_other(FR1,other(Range1)), set_other(FR2,other(Range2))}
+ end,
%% io:format("TR1 = ~w\nTR2 = ~w\n", [TrueRange1, TrueRange2]),
True =
case lists:all(fun range__is_none/1, [TrueRange1, TrueRange2]) of
@@ -694,26 +691,24 @@ normalize_name(Name) ->
-spec range_equality_propagation(range(), range()) ->
{range(), range(), range(), range()}.
-range_equality_propagation(Range_1, Range_2) ->
- True_range = inf(Range_1, Range_2),
- case {range(Range_1), range(Range_2)} of
- {{N,N}, {N,N}} ->
- False_range_1 = none_range(),
- False_range_2 = none_range();
- {{N1,N1}, {N2,N2}} ->
- False_range_1 = Range_1,
- False_range_2 = Range_2;
- {{N,N}, _} ->
- False_range_1 = Range_1,
- {_,False_range_2} = compare_with_integer(N, Range_2);
- {_, {N,N}} ->
- False_range_2 = Range_2,
- {_,False_range_1} = compare_with_integer(N, Range_1);
- {_, _} ->
- False_range_1 = Range_1,
- False_range_2 = Range_2
- end,
- {True_range, True_range, False_range_1, False_range_2}.
+range_equality_propagation(Range1, Range2) ->
+ TrueRange = inf(Range1, Range2),
+ {FalseRange1, FalseRange2} =
+ case {range(Range1), range(Range2)} of
+ {{N,N}, {N,N}} ->
+ {none_range(), none_range()};
+ {{N1,N1}, {N2,N2}} ->
+ {Range1, Range2};
+ {{N,N}, _} ->
+ {_,FR2} = compare_with_integer(N, Range2),
+ {Range1, FR2};
+ {_, {N,N}} ->
+ {_,FR1} = compare_with_integer(N, Range1),
+ {FR1, Range2};
+ {_, _} ->
+ {Range1, Range2}
+ end,
+ {TrueRange, TrueRange, FalseRange1, FalseRange2}.
-spec range_inequality_propagation(range(), range()) ->
{range(), range(), range(), range()}.
@@ -779,18 +774,17 @@ analyse_type(Type, Info, Rewrite) ->
TypeTest = hipe_icode:type_test(Type),
[Arg|_] = hipe_icode:type_args(Type),
OldVarRange = get_range_from_arg(Arg),
- case TypeTest of
- {integer, N} ->
- {TrueRange,FalseRange} = compare_with_integer(N,OldVarRange);
- integer ->
- TrueRange = inf(any_range(), OldVarRange),
- FalseRange = inf(none_range(), OldVarRange);
- number ->
- TrueRange = FalseRange = OldVarRange;
- _ ->
- TrueRange = inf(none_range(), OldVarRange),
- FalseRange = OldVarRange
- end,
+ {TrueRange, FalseRange} =
+ case TypeTest of
+ {integer, N} ->
+ compare_with_integer(N, OldVarRange);
+ integer ->
+ {inf(any_range(), OldVarRange), inf(none_range(), OldVarRange)};
+ number ->
+ {OldVarRange, OldVarRange};
+ _ ->
+ {inf(none_range(), OldVarRange), OldVarRange}
+ end,
TrueLabel = hipe_icode:type_true_label(Type),
FalseLabel = hipe_icode:type_false_label(Type),
TrueInfo = enter_define({Arg, TrueRange}, Info),
@@ -1201,14 +1195,12 @@ basic_type(#unsafe_update_element{}) -> not_analysed.
analyse_bs_get_integer(Size, Flags, true) ->
Signed = Flags band 4,
- if Signed =:= 0 ->
- Max = inf_add(inf_bsl(1, Size), -1),
- Min = 0;
- true ->
- Max = inf_add(inf_bsl(1, Size-1), -1),
- Min = inf_inv(inf_bsl(1, Size-1))
- end,
- {Min, Max};
+ case Signed =:= 0 of
+ true ->
+ {0, inf_add(inf_bsl(1, Size), -1)}; % return {Min, Max}
+ false ->
+ {inf_inv(inf_bsl(1, Size-1)), inf_add(inf_bsl(1, Size-1), -1)}
+ end;
analyse_bs_get_integer(Size, Flags, false) when is_integer(Size),
is_integer(Flags) ->
any_r().
@@ -1653,7 +1645,7 @@ inf_bsl(Number1, Number2) when is_integer(Number1), is_integer(Number2) ->
%% State
--spec state__init(cfg(), data()) -> #state{}.
+-spec state__init(cfg(), data()) -> state().
state__init(Cfg, {MFA, ArgsFun, CallFun, FinalFun}) ->
Start = hipe_icode_cfg:start_label(Cfg),
@@ -1676,19 +1668,19 @@ state__init(Cfg, {MFA, ArgsFun, CallFun, FinalFun}) ->
lookup_fun=CallFun, result_action=FinalFun}
end.
--spec state__cfg(#state{}) -> cfg().
+-spec state__cfg(state()) -> cfg().
state__cfg(#state{cfg=Cfg}) ->
Cfg.
--spec state__bb(#state{}, label()) -> bb().
+-spec state__bb(state(), label()) -> bb().
state__bb(#state{cfg=Cfg}, Label) ->
BB = hipe_icode_cfg:bb(Cfg, Label),
true = hipe_bb:is_bb(BB), % Just an assert
BB.
--spec state__bb_add(#state{}, label(), bb()) -> #state{}.
+-spec state__bb_add(state(), label(), bb()) -> state().
state__bb_add(S=#state{cfg=Cfg}, Label, BB) ->
NewCfg = hipe_icode_cfg:bb_add(Cfg, Label, BB),
@@ -1774,14 +1766,12 @@ join_info_in([Var|Left], Info1, Info2, Acc, Changed) ->
NewTree = gb_trees:insert(Var, Val, Acc),
join_info_in(Left, Info1, Info2, NewTree, Changed);
{{value, Val1}, {value, Val2}} ->
- NewVal =
+ {NewChanged, NewVal} =
case sup(Val1, Val2) of
Val1 ->
- NewChanged = Changed,
- Val1;
+ {Changed, Val1};
Val ->
- NewChanged = true,
- Val
+ {true, Val}
end,
NewTree = gb_trees:insert(Var, NewVal, Acc),
join_info_in(Left, Info1, Info2, NewTree, NewChanged)
diff --git a/lib/hipe/icode/hipe_icode_type.erl b/lib/hipe/icode/hipe_icode_type.erl
index e3ba00c5e9..794c27ebcc 100644
--- a/lib/hipe/icode/hipe_icode_type.erl
+++ b/lib/hipe/icode/hipe_icode_type.erl
@@ -105,6 +105,7 @@
ret_type = [t_none()] :: [erl_types:erl_type()],
lookupfun :: call_fun(),
resultaction :: final_fun()}).
+-type state() :: #state{}.
%%-----------------------------------------------------------------------
%% The main exported function
@@ -193,7 +194,7 @@ analyse(Cfg, Data) ->
catch throw:no_input -> ok % No need to do anything since we have no input
end.
--spec safe_analyse(cfg(), data()) -> #state{}.
+-spec safe_analyse(cfg(), data()) -> state().
safe_analyse(Cfg, {MFA,_,_,_}=Data) ->
State = new_state(Cfg, Data),
@@ -363,6 +364,7 @@ call_always_fails(#icode_call{} = I, Info) ->
%% These can actually be calls too.
{erlang, halt, 0} -> false;
{erlang, halt, 1} -> false;
+ {erlang, halt, 2} -> false;
{erlang, exit, 1} -> false;
{erlang, error, 1} -> false;
{erlang, error, 2} -> false;
@@ -460,24 +462,24 @@ integer_range_inequality_propagation(Op, A1, A2, TrueLab, FalseLab, Info) ->
NonIntArg1 = t_subtract(Arg1, t_integer()),
NonIntArg2 = t_subtract(Arg2, t_integer()),
?ineq_debug("nonintargs", [NonIntArg1,NonIntArg2]),
- case t_is_none(IntArg1) or t_is_none(IntArg2) of
+ case t_is_none(IntArg1) orelse t_is_none(IntArg2) of
true ->
?ineq_debug("one is none", [IntArg1,IntArg2]),
[{TrueLab, Info}, {FalseLab, Info}];
false ->
- case Op of
- '>=' ->
- {FalseArg1, FalseArg2, TrueArg1, TrueArg2} =
- integer_range_less_then_propagator(IntArg1, IntArg2);
- '>' ->
- {TrueArg2, TrueArg1, FalseArg2, FalseArg1} =
- integer_range_less_then_propagator(IntArg2, IntArg1);
- '<' ->
- {TrueArg1, TrueArg2, FalseArg1, FalseArg2} =
- integer_range_less_then_propagator(IntArg1, IntArg2);
- '=<' ->
- {FalseArg2, FalseArg1, TrueArg2, TrueArg1} =
- integer_range_less_then_propagator(IntArg2, IntArg1)
+ {TrueArg1, TrueArg2, FalseArg1, FalseArg2} =
+ case Op of
+ '>=' ->
+ {FA1, FA2, TA1, TA2} = int_range_lt_propagator(IntArg1, IntArg2),
+ {TA1, TA2, FA1, FA2};
+ '>' ->
+ {TA2, TA1, FA2, FA1} = int_range_lt_propagator(IntArg2, IntArg1),
+ {TA1, TA2, FA1, FA2};
+ '<' ->
+ int_range_lt_propagator(IntArg1, IntArg2);
+ '=<' ->
+ {FA2, FA1, TA2, TA1} = int_range_lt_propagator(IntArg2, IntArg1),
+ {TA1, TA2, FA1, FA2}
end,
?ineq_debug("int res", [TrueArg1, TrueArg2, FalseArg1, FalseArg2]),
False = {FalseLab, enter(A1, t_sup(FalseArg1, NonIntArg1),
@@ -487,7 +489,7 @@ integer_range_inequality_propagation(Op, A1, A2, TrueLab, FalseLab, Info) ->
[True, False]
end.
-integer_range_less_then_propagator(IntArg1, IntArg2) ->
+int_range_lt_propagator(IntArg1, IntArg2) ->
Min1 = number_min(IntArg1),
Max1 = number_max(IntArg1),
Min2 = number_min(IntArg2),
diff --git a/lib/hipe/llvm/Makefile b/lib/hipe/llvm/Makefile
index d2d39fb9e3..88016a7d8b 100644
--- a/lib/hipe/llvm/Makefile
+++ b/lib/hipe/llvm/Makefile
@@ -40,20 +40,19 @@ RELSYSDIR = $(RELEASE_PATH)/lib/hipe-$(VSN)
# Target Specs
# ----------------------------------------------------
ifdef HIPE_ENABLED
-HIPE_MODULES = hipe_rtl_to_llvm \
+HIPE_MODULES = elf_format \
hipe_llvm \
- elf_format \
+ hipe_llvm_liveness \
hipe_llvm_main \
hipe_llvm_merge \
- hipe_llvm_liveness
+ hipe_rtl_to_llvm
else
HIPE_MODULES =
endif
MODULES = $(HIPE_MODULES)
-HRL_FILES= elf_format.hrl elf32_format.hrl elf64_format.hrl \
- hipe_llvm_arch.hrl
+HRL_FILES= elf_format.hrl elf32_format.hrl elf64_format.hrl hipe_llvm_arch.hrl
ERL_FILES= $(MODULES:%=%.erl)
TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
@@ -71,7 +70,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
include ../native.mk
-ERL_COMPILE_FLAGS += +inline #+warn_missing_spec
+ERL_COMPILE_FLAGS += -Werror +inline +warn_export_vars #+warn_missing_spec
# if in 32 bit backend define BIT32 symbol
ARCH = $(shell echo $(TARGET) | sed 's/^\(x86_64\)-.*/64bit/')
@@ -108,3 +107,11 @@ release_spec: opt
$(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
release_docs_spec:
+
+$(EBIN)/elf_format.beam: elf_format.hrl elf32_format.hrl elf64_format.hrl
+$(EBIN)/hipe_llvm_main.beam: ../../kernel/src/hipe_ext_format.hrl \
+ hipe_llvm_arch.hrl elf_format.hrl elf32_format.hrl elf64_format.hrl
+$(EBIN)/hipe_llvm_merge.beam: ../../kernel/src/hipe_ext_format.hrl \
+ hipe_llvm_arch.hrl ../rtl/hipe_literals.hrl ../main/hipe.hrl
+$(EBIN)/hipe_rtl_to_llvm.beam: ../rtl/hipe_rtl.hrl ../rtl/hipe_literals.hrl \
+ hipe_llvm_arch.hrl
diff --git a/lib/hipe/llvm/elf_format.erl b/lib/hipe/llvm/elf_format.erl
index 260da9b5e6..8cf6ea6250 100644
--- a/lib/hipe/llvm/elf_format.erl
+++ b/lib/hipe/llvm/elf_format.erl
@@ -13,21 +13,20 @@
-module(elf_format).
--export([get_tab_entries/1,
- %% Relocations
- get_rodata_relocs/1,
- get_text_relocs/1,
+-export([%% Relocations
extract_rela/2,
- get_rela_addends/1,
%% Note
extract_note/2,
%% Executable code
extract_text/1,
%% GCC Exception Table
- get_exn_handlers/1,
- %% Misc.
- set_architecture_flag/1,
- is64bit/0
+ get_exn_handlers/1,
+ %% Symbols
+ elf_symbols/1,
+ %% Sections
+ section_contents/2,
+ %% Main interface
+ read/1
]).
-include("elf_format.hrl").
@@ -36,27 +35,57 @@
%% Types
%%------------------------------------------------------------------------------
--type elf() :: binary().
-
--type lp() :: non_neg_integer(). % landing pad
--type num() :: non_neg_integer().
--type index() :: non_neg_integer().
--type offset() :: non_neg_integer().
--type size() :: non_neg_integer().
--type start() :: non_neg_integer().
-
--type info() :: index().
--type nameoff() :: offset().
--type valueoff() :: offset().
-
--type name() :: string().
--type name_size() :: {name(), size()}.
--type name_sizes() :: [name_size()].
+-export_type([elf/0
+ ,addend/0
+ ,bitflags/0
+ ,name/0
+ ,offset/0
+ ,reloc_type/0
+ ,shdr_type/0
+ ,size/0
+ ,sym_bind/0
+ ,sym_type/0
+ ,valueoff/0
+ ]).
+
+-type bitflags() :: non_neg_integer().
+-type index() :: non_neg_integer().
+-type lp() :: non_neg_integer(). % landing pad
+-type num() :: non_neg_integer().
+-type offset() :: non_neg_integer().
+-type size() :: non_neg_integer().
+-type start() :: non_neg_integer().
+
+-type addend() :: integer() | undefined.
+-type name() :: string().
+-type shdr_type() :: 'null' | 'progbits' | 'symtab' | 'strtab' | 'rela'
+ | 'hash' | 'dynamic' | 'note' | 'nobits' | 'rel' | 'shlib'
+ | 'dynsym' | {os, ?SHT_LOOS..?SHT_HIOS}
+ | {proc, ?SHT_LOPROC..?SHT_HIPROC}.
+-type sym_bind() :: 'local' | 'global' | 'weak' | {os, ?STB_LOOS..?STB_HIOS}
+ | {proc, ?STB_LOPROC..?STB_HIPROC}.
+-type sym_type() :: 'notype' | 'object' | 'func' | 'section' | 'file'
+ | {os, ?STT_LOOS..?STT_HIOS}
+ | {proc, ?STT_LOPROC..?STT_HIPROC}.
+-type valueoff() :: offset().
+
+-ifdef(BIT32). % 386
+-type reloc_type() :: '32' | 'pc32'.
+-else. % X86_64
+-type reloc_type() :: '64' | 'pc32' | '32'.
+-endif.
%%------------------------------------------------------------------------------
%% Abstract Data Types and Accessors for ELF Structures.
%%------------------------------------------------------------------------------
+-record(elf, {file :: binary()
+ ,sections :: [elf_shdr()]
+ ,sec_nam :: #{string() => elf_shdr()}
+ ,symbols :: undefined | [elf_sym()]
+ }).
+-opaque elf() :: #elf{}.
+
%% File header
-record(elf_ehdr, {ident, % ELF identification
type, % Object file type
@@ -85,42 +114,6 @@
}).
%% -type elf_ehdr_ident() :: #elf_ehdr_ident{}.
-%% Section header entries
--record(elf_shdr, {name, % Section name
- type, % Section type
- flags, % Section attributes
- addr, % Virtual address in memory
- offset :: offset(), % Offset in file
- size :: size(), % Size of section
- link, % Link to other section
- info, % Miscellaneous information
- addralign, % Address align boundary
- entsize % Size of entries, if section has table
- }).
-%% -type elf_shdr() :: #elf_shdr{}.
-
-%% Symbol table entries
--record(elf_sym, {name :: nameoff(), % Symbol name
- info, % Type and Binding attributes
- other, % Reserved
- shndx, % Section table index
- value :: valueoff(), % Symbol value
- size :: size() % Size of object
- }).
--type elf_sym() :: #elf_sym{}.
-
-%% Relocations
--record(elf_rel, {r_offset :: offset(), % Address of reference
- r_info :: info() % Symbol index and type of relocation
- }).
--type elf_rel() :: #elf_rel{}.
-
--record(elf_rela, {r_offset :: offset(), % Address of reference
- r_info :: info(), % Symbol index and type of relocation
- r_addend :: offset() % Constant part of expression
- }).
--type elf_rela() :: #elf_rela{}.
-
%% %% Program header table
%% -record(elf_phdr, {type, % Type of segment
%% flags, % Segment attributes
@@ -199,44 +192,19 @@ mk_shdr(Name, Type, Flags, Addr, Offset, Size, Link, Info, AddrAlign, EntSize) -
%%%-------------------------
%%% Symbol Table Entries
%%%-------------------------
-mk_sym(Name, Info, Other, Shndx, Value, Size) ->
- #elf_sym{name = Name, info = Info, other = Other,
- shndx = Shndx, value = Value, size = Size}.
-
--spec sym_name(elf_sym()) -> nameoff().
-sym_name(#elf_sym{name = Name}) -> Name.
+mk_sym(Name, Bind, Type, Section, Value, Size) ->
+ #elf_sym{name = Name, bind = Bind, type = Type,
+ section = Section, value = Value, size = Size}.
+%% -spec sym_name(elf_sym()) -> string().
+%% sym_name(#elf_sym{name = Name}) -> Name.
+%%
%% -spec sym_value(elf_sym()) -> valueoff().
%% sym_value(#elf_sym{value = Value}) -> Value.
%%
%% -spec sym_size(elf_sym()) -> size().
%% sym_size(#elf_sym{size = Size}) -> Size.
-%%%-------------------------
-%%% Relocations
-%%%-------------------------
--spec mk_rel(offset(), info()) -> elf_rel().
-mk_rel(Offset, Info) ->
- #elf_rel{r_offset = Offset, r_info = Info}.
-
-%% The following two functions capitalize on the fact that the two kinds of
-%% relocation records (for 32- and 64-bit architectures have similar structure.
-
--spec r_offset(elf_rel() | elf_rela()) -> offset().
-r_offset(#elf_rel{r_offset = Offset}) -> Offset;
-r_offset(#elf_rela{r_offset = Offset}) -> Offset.
-
--spec r_info(elf_rel() | elf_rela()) -> info().
-r_info(#elf_rel{r_info = Info}) -> Info;
-r_info(#elf_rela{r_info = Info}) -> Info.
-
--spec mk_rela(offset(), info(), offset()) -> elf_rela().
-mk_rela(Offset, Info, Addend) ->
- #elf_rela{r_offset = Offset, r_info = Info, r_addend = Addend}.
-
--spec rela_addend(elf_rela()) -> offset().
-rela_addend(#elf_rela{r_addend = Addend}) -> Addend.
-
%% %%%-------------------------
%% %%% GCC exception table
%% %%%-------------------------
@@ -263,15 +231,30 @@ mk_gccexntab_callsite(Start, Size, LP, Action) ->
%% gccexntab_callsite_lp(#elf_gccexntab_callsite{lp = LP}) -> LP.
%%------------------------------------------------------------------------------
+%% Main interface function
+%%------------------------------------------------------------------------------
+
+%% @doc Parses an ELF file.
+-spec read(binary()) -> elf().
+read(ElfBin) ->
+ Header = extract_header(ElfBin),
+ [_UndefinedSec|Sections] = extract_shdrtab(ElfBin, Header),
+ SecNam = maps:from_list(
+ [{Name, Sec} || Sec = #elf_shdr{name=Name} <- Sections]),
+ Elf0 = #elf{file=ElfBin, sections=Sections, sec_nam=SecNam},
+ [_UndefinedSym|Symbols] = extract_symtab(Elf0, extract_strtab(Elf0)),
+ Elf0#elf{symbols=Symbols}.
+
+%%------------------------------------------------------------------------------
%% Functions to manipulate the ELF File Header
%%------------------------------------------------------------------------------
%% @doc Extracts the File Header from an ELF formatted object file. Also sets
%% the ELF class variable in the process dictionary (used by many functions
%% in this and hipe_llvm_main modules).
--spec extract_header(elf()) -> elf_ehdr().
-extract_header(Elf) ->
- Ehdr_bin = get_binary_segment(Elf, 0, ?ELF_EHDR_SIZE),
+-spec extract_header(binary()) -> elf_ehdr().
+extract_header(ElfBin) ->
+ Ehdr_bin = get_binary_segment(ElfBin, 0, ?ELF_EHDR_SIZE),
<< %% Structural pattern matching on fields.
Ident_bin:?E_IDENT_SIZE/binary,
Type:?bits(?E_TYPE_SIZE)/integer-little,
@@ -300,19 +283,28 @@ extract_header(Elf) ->
%% Functions to manipulate Section Header Entries
%%------------------------------------------------------------------------------
+-type shdrtab() :: [elf_shdr()].
+
%% @doc Extracts the Section Header Table from an ELF formated Object File.
-extract_shdrtab(Elf) ->
- %% Extract File Header to get info about Section Header Offset (in bytes),
- %% Entry Size (in bytes) and Number of entries
- #elf_ehdr{shoff = ShOff, shentsize = ShEntsize, shnum = ShNum} =
- extract_header(Elf),
+-spec extract_shdrtab(binary(), elf_ehdr()) -> shdrtab().
+extract_shdrtab(ElfBin, #elf_ehdr{shoff=ShOff, shentsize=?ELF_SHDRENTRY_SIZE,
+ shnum=ShNum, shstrndx=ShStrNdx}) ->
%% Get actual Section header table (binary)
- ShdrBin = get_binary_segment(Elf, ShOff, ShNum * ShEntsize),
- get_shdrtab_entries(ShdrBin, []).
-
-get_shdrtab_entries(<<>>, Acc) ->
- lists:reverse(Acc);
-get_shdrtab_entries(ShdrBin, Acc) ->
+ ShdrBin = get_binary_segment(ElfBin, ShOff, ShNum * ?ELF_SHDRENTRY_SIZE),
+ %% We need to lookup the offset and size of the section header string table
+ %% before we can fully parse the section table. We compute its offset and
+ %% extract the fields we need here.
+ ShStrEntryOffset = ShStrNdx * ?ELF_SHDRENTRY_SIZE,
+ <<_:ShStrEntryOffset/binary, _:?SH_NAME_SIZE/binary,
+ _:?SH_TYPE_SIZE/binary, _:?SH_FLAGS_SIZE/binary, _:?SH_ADDR_SIZE/binary,
+ ShStrOffset:?bits(?SH_OFFSET_SIZE)/little,
+ ShStrSize:?bits(?SH_SIZE_SIZE)/little,
+ _/binary>> = ShdrBin,
+ ShStrTab = parse_strtab(get_binary_segment(ElfBin, ShStrOffset, ShStrSize)),
+ get_shdrtab_entries(ShdrBin, ShStrTab).
+
+get_shdrtab_entries(<<>>, _ShStrTab) -> [];
+get_shdrtab_entries(ShdrTab, ShStrTab) ->
<<%% Structural pattern matching on fields.
Name:?bits(?SH_NAME_SIZE)/integer-little,
Type:?bits(?SH_TYPE_SIZE)/integer-little,
@@ -324,205 +316,166 @@ get_shdrtab_entries(ShdrBin, Acc) ->
Info:?bits(?SH_INFO_SIZE)/integer-little,
Addralign:?bits(?SH_ADDRALIGN_SIZE)/integer-little,
Entsize:?bits(?SH_ENTSIZE_SIZE)/integer-little,
- MoreShdrE/binary
- >> = ShdrBin,
- ShdrE = mk_shdr(Name, Type, Flags, Addr, Offset,
- Size, Link, Info, Addralign, Entsize),
- get_shdrtab_entries(MoreShdrE, [ShdrE | Acc]).
-
-%% @doc Extracts a specific Entry of a Section Header Table. This function
-%% takes as argument the Section Header Table (`SHdrTab') and the entry's
-%% serial number (`EntryNum') and returns the entry (`shdr').
-get_shdrtab_entry(SHdrTab, EntryNum) ->
- lists:nth(EntryNum + 1, SHdrTab).
-
-%%------------------------------------------------------------------------------
-%% Functions to manipulate Section Header String Table
-%%------------------------------------------------------------------------------
-
-%% @doc Extracts the Section Header String Table. This section is not a known
-%% ELF Object File section. It is just a "hidden" table storing the
-%% names of all sections that exist in current object file.
--spec extract_shstrtab(elf()) -> [name()].
-extract_shstrtab(Elf) ->
- %% Extract Section Name String Table Index
- #elf_ehdr{shstrndx = ShStrNdx} = extract_header(Elf),
- ShHdrTab = extract_shdrtab(Elf),
- %% Extract Section header entry and get actual Section-header String Table
- #elf_shdr{offset = ShStrOffset, size = ShStrSize} =
- get_shdrtab_entry(ShHdrTab, ShStrNdx),
- case get_binary_segment(Elf, ShStrOffset, ShStrSize) of
- <<>> -> %% Segment empty
- [];
- ShStrTab -> %% Convert to string table
- [Name || {Name, _Size} <- get_names(ShStrTab)]
- end.
-
-%%------------------------------------------------------------------------------
-
--spec get_tab_entries(elf()) -> [{name(), valueoff(), size()}].
-get_tab_entries(Elf) ->
- SymTab = extract_symtab(Elf),
- Ts = [{Name, Value, Size div ?ELF_XWORD_SIZE}
- || #elf_sym{name = Name, value = Value, size = Size} <- SymTab,
- Name =/= 0],
- {NameIndices, ValueOffs, Sizes} = lists:unzip3(Ts),
- %% Find the names of the symbols.
- %% Get string table entries ([{Name, Offset in strtab section}]). Keep only
- %% relevant entries:
- StrTab = extract_strtab(Elf),
- Relevant = [get_strtab_entry(StrTab, Off) || Off <- NameIndices],
- %% Zip back to {Name, ValueOff, Size}
- lists:zip3(Relevant, ValueOffs, Sizes).
+ Rest/binary
+ >> = ShdrTab,
+ Entry = mk_shdr(get_strtab_entry(Name, ShStrTab), decode_shdr_type(Type),
+ Flags, Addr, Offset, Size, Link, Info, Addralign, Entsize),
+ [Entry | get_shdrtab_entries(Rest, ShStrTab)].
+
+decode_shdr_type(?SHT_NULL) -> 'null';
+decode_shdr_type(?SHT_PROGBITS) -> 'progbits';
+decode_shdr_type(?SHT_SYMTAB) -> 'symtab';
+decode_shdr_type(?SHT_STRTAB) -> 'strtab';
+decode_shdr_type(?SHT_RELA) -> 'rela';
+decode_shdr_type(?SHT_HASH) -> 'hash'; %unused
+decode_shdr_type(?SHT_DYNAMIC) -> 'dynamic'; %unused
+decode_shdr_type(?SHT_NOTE) -> 'note'; %unused
+decode_shdr_type(?SHT_NOBITS) -> 'nobits';
+decode_shdr_type(?SHT_REL) -> 'rel';
+decode_shdr_type(?SHT_SHLIB) -> 'shlib'; %unused
+decode_shdr_type(?SHT_DYNSYM) -> 'dynsym'; %unused
+decode_shdr_type(OS) when ?SHT_LOOS =< OS, OS =< ?SHT_HIOS -> {os, OS};
+decode_shdr_type(Proc) when ?SHT_LOPROC =< Proc, Proc =< ?SHT_HIPROC ->
+ {proc, Proc}.
+
+-spec elf_section(non_neg_integer(), elf()) -> undefined | abs | elf_shdr().
+elf_section(0, #elf{}) -> undefined;
+elf_section(?SHN_ABS, #elf{}) -> abs;
+elf_section(Index, #elf{sections=SecIdx}) ->
+ lists:nth(Index, SecIdx).
+
+%% Reads the contents of a section from an object
+-spec section_contents(elf_shdr(), elf()) -> binary().
+section_contents(#elf_shdr{offset=Offset, size=Size}, #elf{file=ElfBin}) ->
+ get_binary_segment(ElfBin, Offset, Size).
%%------------------------------------------------------------------------------
%% Functions to manipulate Symbol Table
%%------------------------------------------------------------------------------
%% @doc Function that extracts Symbol Table from an ELF Object file.
-extract_symtab(Elf) ->
- Symtab_bin = extract_segment_by_name(Elf, ?SYMTAB),
- get_symtab_entries(Symtab_bin, []).
-
-get_symtab_entries(<<>>, Acc) ->
- lists:reverse(Acc);
-get_symtab_entries(Symtab_bin, Acc) ->
- <<SymE_bin:?ELF_SYM_SIZE/binary, MoreSymE/binary>> = Symtab_bin,
- case is64bit() of
- true ->
- <<%% Structural pattern matching on fields.
- Name:?bits(?ST_NAME_SIZE)/integer-little,
- Info:?bits(?ST_INFO_SIZE)/integer-little,
- Other:?bits(?ST_OTHER_SIZE)/integer-little,
- Shndx:?bits(?ST_SHNDX_SIZE)/integer-little,
- Value:?bits(?ST_VALUE_SIZE)/integer-little,
- Size:?bits(?ST_SIZE_SIZE)/integer-little
- >> = SymE_bin;
- false ->
- << %% Same fields in different order:
- Name:?bits(?ST_NAME_SIZE)/integer-little,
- Value:?bits(?ST_VALUE_SIZE)/integer-little,
- Size:?bits(?ST_SIZE_SIZE)/integer-little,
- Info:?bits(?ST_INFO_SIZE)/integer-little,
- Other:?bits(?ST_OTHER_SIZE)/integer-little,
- Shndx:?bits(?ST_SHNDX_SIZE)/integer-little
- >> = SymE_bin
- end,
- SymE = mk_sym(Name, Info, Other, Shndx, Value, Size),
- get_symtab_entries(MoreSymE, [SymE | Acc]).
-
-%% @doc Extracts a specific entry from the Symbol Table (as binary).
-%% This function takes as arguments the Symbol Table (`SymTab')
-%% and the entry's serial number and returns that entry (`sym').
-get_symtab_entry(SymTab, EntryNum) ->
- lists:nth(EntryNum + 1, SymTab).
+extract_symtab(Elf, StrTab) ->
+ Symtab = extract_segment_by_name(Elf, ?SYMTAB),
+ [parse_sym(Sym, Elf, StrTab) || <<Sym:?ELF_SYM_SIZE/binary>> <= Symtab].
+
+-ifdef(BIT32).
+parse_sym(<<%% Structural pattern matching on fields.
+ Name:?bits(?ST_NAME_SIZE)/integer-little,
+ Value:?bits(?ST_VALUE_SIZE)/integer-little,
+ Size:?bits(?ST_SIZE_SIZE)/integer-little,
+ Info:?bits(?ST_INFO_SIZE)/integer-little,
+ _Other:?bits(?ST_OTHER_SIZE)/integer-little,
+ Shndx:?bits(?ST_SHNDX_SIZE)/integer-little>>,
+ Elf, StrTab) ->
+ mk_sym(get_strtab_entry(Name, StrTab), decode_symbol_bind(?ELF_ST_BIND(Info)),
+ decode_symbol_type(?ELF_ST_TYPE(Info)), elf_section(Shndx, Elf), Value,
+ Size).
+-else.
+parse_sym(<<%% Same fields in different order:
+ Name:?bits(?ST_NAME_SIZE)/integer-little,
+ Info:?bits(?ST_INFO_SIZE)/integer-little,
+ _Other:?bits(?ST_OTHER_SIZE)/integer-little,
+ Shndx:?bits(?ST_SHNDX_SIZE)/integer-little,
+ Value:?bits(?ST_VALUE_SIZE)/integer-little,
+ Size:?bits(?ST_SIZE_SIZE)/integer-little>>,
+ Elf, StrTab) ->
+ mk_sym(get_strtab_entry(Name, StrTab), decode_symbol_bind(?ELF_ST_BIND(Info)),
+ decode_symbol_type(?ELF_ST_TYPE(Info)), elf_section(Shndx, Elf), Value,
+ Size).
+-endif.
+
+decode_symbol_bind(?STB_LOCAL) -> 'local';
+decode_symbol_bind(?STB_GLOBAL) -> 'global';
+decode_symbol_bind(?STB_WEAK) -> 'weak'; %unused
+decode_symbol_bind(OS) when ?STB_LOOS =< OS, OS =< ?STB_HIOS -> {os, OS};
+decode_symbol_bind(Proc) when ?STB_LOPROC =< Proc, Proc =< ?STB_HIPROC ->
+ {proc, Proc}.
+
+decode_symbol_type(?STT_NOTYPE) -> 'notype';
+decode_symbol_type(?STT_OBJECT) -> 'object';
+decode_symbol_type(?STT_FUNC) -> 'func';
+decode_symbol_type(?STT_SECTION) -> 'section';
+decode_symbol_type(?STT_FILE) -> 'file';
+decode_symbol_type(OS) when ?STT_LOOS =< OS, OS =< ?STT_HIOS -> {os, OS};
+decode_symbol_type(Proc) when ?STT_LOPROC =< Proc, Proc =< ?STT_HIPROC ->
+ {proc, Proc}.
+
+%% @doc Extracts a specific entry from the Symbol Table.
+-spec elf_symbol(0, elf()) -> undefined;
+ (pos_integer(), elf()) -> elf_sym().
+elf_symbol(0, #elf{}) -> undefined;
+elf_symbol(Index, #elf{symbols=Symbols}) -> lists:nth(Index, Symbols).
+
+-spec elf_symbols(elf()) -> [elf_sym()].
+elf_symbols(#elf{symbols=Symbols}) -> Symbols.
%%------------------------------------------------------------------------------
%% Functions to manipulate String Table
%%------------------------------------------------------------------------------
+%% ADT: get_strtab_entry/1 must be used to consume this type.
+-type strtab() :: binary().
+
%% @doc Extracts String Table from an ELF formated Object File.
--spec extract_strtab(elf()) -> [{string(), offset()}].
+-spec extract_strtab(elf()) -> strtab().
extract_strtab(Elf) ->
- Strtab_bin = extract_segment_by_name(Elf, ?STRTAB),
- NamesSizes = get_names(Strtab_bin),
- make_offsets(NamesSizes).
-
-%% @doc Returns the name of the symbol at the given offset. The string table
-%% contains entries of the form {Name, Offset}. If no such offset exists
-%% returns the empty string (`""').
-%% XXX: There might be a bug here because of the "compact" saving the ELF
-%% format uses: e.g. only stores ".rela.text" for ".rela.text" and ".text".
-get_strtab_entry(Strtab, Offset) ->
- case lists:keyfind(Offset, 2, Strtab) of
- {Name, Offset} -> Name;
- false -> ""
- end.
+ parse_strtab(extract_segment_by_name(Elf, ?STRTAB)).
+
+-spec parse_strtab(binary()) -> strtab().
+parse_strtab(StrTabSectionBin) -> StrTabSectionBin.
+
+%% @doc Returns the name of the symbol at the given offset.
+-spec get_strtab_entry(non_neg_integer(), strtab()) -> string().
+get_strtab_entry(Offset, StrTab) ->
+ <<_:Offset/binary, StrBin/binary>> = StrTab,
+ bin_get_string(StrBin).
+
+%% @doc Extracts a null-terminated string from a binary.
+-spec bin_get_string(binary()) -> string().
+%% FIXME: No regard for encoding (just happens to work for ASCII and Latin-1)
+bin_get_string(<<0, _/binary>>) -> [];
+bin_get_string(<<Char, Rest/binary>>) -> [Char|bin_get_string(Rest)].
%%------------------------------------------------------------------------------
%% Functions to manipulate Relocations
%%------------------------------------------------------------------------------
-%% @doc This function gets as argument an ELF binary file and returns a list
-%% with all .rela.rodata labels (i.e. constants and literals in code)
-%% or an empty list if no ".rela.rodata" section exists in code.
--spec get_rodata_relocs(elf()) -> [offset()].
-get_rodata_relocs(Elf) ->
- case is64bit() of
- true ->
- %% Only care about the addends (== offsets):
- get_rela_addends(extract_rela(Elf, ?RODATA));
- false ->
- %% Find offsets hardcoded in ".rodata" entry
- %%XXX: Treat all 0s as padding and skip them!
- [SkipPadding || SkipPadding <- extract_rodata(Elf), SkipPadding =/= 0]
- end.
-
--spec get_rela_addends([elf_rela()]) -> [offset()].
-get_rela_addends(RelaEntries) ->
- [rela_addend(E) || E <- RelaEntries].
-
-%% @doc Extract a list of the form `[{SymbolName, Offset}]' with all relocatable
-%% symbols and their offsets in the code from the ".text" section.
--spec get_text_relocs(elf()) -> [{name(), offset()}].
-get_text_relocs(Elf) ->
- %% Only care about the symbol table index and the offset:
- NameOffsetTemp = [{?ELF_R_SYM(r_info(E)), r_offset(E)}
- || E <- extract_rela(Elf, ?TEXT)],
- {NameIndices, ActualOffsets} = lists:unzip(NameOffsetTemp),
- %% Find the names of the symbols:
- %%
- %% Get those symbol table entries that are related to Text relocs:
- Symtab = extract_symtab(Elf),
- SymtabEs = [get_symtab_entry(Symtab, Index) || Index <- NameIndices],
- %XXX: not zero-indexed!
- %% Symbol table entries contain the offset of the name of the symbol in
- %% String Table:
- SymtabEs2 = [sym_name(E) || E <- SymtabEs], %XXX: Do we need to sort SymtabE?
- %% Get string table entries ([{Name, Offset in strtab section}]). Keep only
- %% relevant entries:
- Strtab = extract_strtab(Elf),
- Relevant = [get_strtab_entry(Strtab, Off) || Off <- SymtabEs2],
- %% Zip back with actual offsets:
- lists:zip(Relevant, ActualOffsets).
-
%% @doc Extract the Relocations segment for section `Name' (that is passed
%% as second argument) from an ELF formated Object file binary.
--spec extract_rela(elf(), name()) -> [elf_rel() | elf_rela()].
+-spec extract_rela(elf(), name()) -> [elf_rel()].
+
+-ifdef(BIT32).
extract_rela(Elf, Name) ->
- SegName =
- case is64bit() of
- true -> ?RELA(Name); % ELF-64 uses ".rela"
- false -> ?REL(Name) % ...while ELF-32 uses ".rel"
- end,
- Rela_bin = extract_segment_by_name(Elf, SegName),
- get_rela_entries(Rela_bin, []).
-
-get_rela_entries(<<>>, Acc) ->
- lists:reverse(Acc);
-get_rela_entries(Bin, Acc) ->
- E = case is64bit() of
- true ->
- <<%% Structural pattern matching on fields of a Rela Entry.
- Offset:?bits(?R_OFFSET_SIZE)/integer-little,
- Info:?bits(?R_INFO_SIZE)/integer-little,
- Addend:?bits(?R_ADDEND_SIZE)/integer-little,
- Rest/binary
- >> = Bin,
- mk_rela(Offset, Info, Addend);
- false ->
- <<%% Structural pattern matching on fields of a Rel Entry.
- Offset:?bits(?R_OFFSET_SIZE)/integer-little,
- Info:?bits(?R_INFO_SIZE)/integer-little,
- Rest/binary
- >> = Bin,
- mk_rel(Offset, Info)
- end,
- get_rela_entries(Rest, [E | Acc]).
-
-%% %% @doc Extract the `EntryNum' (serial number) Relocation Entry.
-%% get_rela_entry(Rela, EntryNum) ->
-%% lists:nth(EntryNum + 1, Rela).
+ SecData = extract_segment_by_name(Elf, Name),
+ [#elf_rel{offset=Offset, symbol=elf_symbol(?ELF_R_SYM(Info), Elf),
+ type=decode_reloc_type(?ELF_R_TYPE(Info)),
+ addend=read_implicit_addend(Offset, SecData)}
+ || <<Offset:?bits(?R_OFFSET_SIZE)/little,
+ Info:?bits(?R_INFO_SIZE)/little % 386 uses ".rel"
+ >> <= extract_segment_by_name(Elf, ?REL(Name))].
+
+%% The only types HiPE knows how to patch
+decode_reloc_type(1) -> '32';
+decode_reloc_type(2) -> 'pc32'.
+
+read_implicit_addend(Offset, Section) ->
+ %% All x86 relocation types uses 'word32' relocation fields; i.e. 32-bit LE.
+ <<_:Offset/binary, Addend:32/signed-little, _/binary>> = Section,
+ Addend.
+
+-else. %% BIT32
+extract_rela(Elf, Name) ->
+ [#elf_rel{offset=Offset, symbol=elf_symbol(?ELF_R_SYM(Info), Elf),
+ type=decode_reloc_type(?ELF_R_TYPE(Info)), addend=Addend}
+ || <<Offset:?bits(?R_OFFSET_SIZE)/little,
+ Info:?bits(?R_INFO_SIZE)/little,
+ Addend:?bits(?R_ADDEND_SIZE)/signed-little % X86_64 uses ".rela"
+ >> <= extract_segment_by_name(Elf, ?RELA(Name))].
+
+decode_reloc_type(1) -> '64';
+decode_reloc_type(2) -> 'pc32';
+decode_reloc_type(10) -> '32'.
+-endif. %% BIT32
%%------------------------------------------------------------------------------
%% Functions to manipulate Executable Code segment
@@ -615,19 +568,6 @@ get_gccexntab_callsites(CSTab, Acc) ->
get_gccexntab_callsites(More, [GccCS | Acc]).
%%------------------------------------------------------------------------------
-%% Functions to manipulate Read-only Data (.rodata)
-%%------------------------------------------------------------------------------
-extract_rodata(Elf) ->
- Rodata_bin = extract_segment_by_name(Elf, ?RODATA),
- get_rodata_entries(Rodata_bin, []).
-
-get_rodata_entries(<<>>, Acc) ->
- lists:reverse(Acc);
-get_rodata_entries(Rodata_bin, Acc) ->
- <<Num:?bits(?ELF_ADDR_SIZE)/integer-little, More/binary>> = Rodata_bin,
- get_rodata_entries(More, [Num | Acc]).
-
-%%------------------------------------------------------------------------------
%% Helper functions
%%------------------------------------------------------------------------------
@@ -647,107 +587,15 @@ get_binary_segment(Bin, Offset, Size) ->
%% There are handy macros defined in elf_format.hrl for all Standard
%% Section Names.
-spec extract_segment_by_name(elf(), string()) -> binary().
-extract_segment_by_name(Elf, SectionName) ->
- %% Extract Section Header Table and Section Header String Table from binary
- SHdrTable = extract_shdrtab(Elf),
- Names = extract_shstrtab(Elf),
- %% Zip to a list of (Name,ShdrE)
- [_Zero | ShdrEs] = lists:keysort(2, SHdrTable), % Skip first entry (zeros).
- L = lists:zip(Names, ShdrEs),
+extract_segment_by_name(#elf{file=ElfBin, sec_nam=SecNam}, SectionName) ->
%% Find Section Header Table entry by name
- case lists:keyfind(SectionName, 1, L) of
- {SectionName, ShdrE} -> %% Note: Same name.
- #elf_shdr{offset = Offset, size = Size} = ShdrE,
- get_binary_segment(Elf, Offset, Size);
- false -> %% Not found.
+ case SecNam of
+ #{SectionName := #elf_shdr{offset=Offset, size=Size}} ->
+ get_binary_segment(ElfBin, Offset, Size);
+ #{} -> %% Not found.
<<>>
end.
-%% @doc Extracts a list of strings with (zero-separated) names from a binary.
-%% Returns tuples of `{Name, Size}'.
-%% XXX: Skip trailing 0.
--spec get_names(<<_:8,_:_*8>>) -> name_sizes().
-get_names(<<0, Bin/binary>>) ->
- NamesSizes = get_names(Bin, []),
- fix_names(NamesSizes, []).
-
-get_names(<<>>, Acc) ->
- lists:reverse(Acc);
-get_names(Bin, Acc) ->
- {Name, MoreNames} = bin_get_string(Bin),
- get_names(MoreNames, [{Name, length(Name)} | Acc]).
-
-%% @doc Fix names:
-%% e.g. If ".rela.text" exists, ".text" does not. Same goes for
-%% ".rel.text". In that way, the Section Header String Table is more
-%% compact. Add ".text" just *before* the corresponding rela-field,
-%% etc.
--spec fix_names(name_sizes(), name_sizes()) -> name_sizes().
-fix_names([], Acc) ->
- lists:reverse(Acc);
-fix_names([{Name, Size}=T | Names], Acc) ->
- case is64bit() of
- true ->
- case string:str(Name, ".rela") =:= 1 of
- true -> %% Name starts with ".rela":
- Section = string:substr(Name, 6),
- fix_names(Names, [{Section, Size - 5}
- | [T | Acc]]); % XXX: Is order ok? (".text"
- % always before ".rela.text")
- false -> %% Name does not start with ".rela":
- fix_names(Names, [T | Acc])
- end;
- false ->
- case string:str(Name, ".rel") =:= 1 of
- true -> %% Name starts with ".rel":
- Section = string:substr(Name, 5),
- fix_names(Names, [{Section, Size - 4}
- | [T | Acc]]); % XXX: Is order ok? (".text"
- % always before ".rela.text")
- false -> %% Name does not start with ".rel":
- fix_names(Names, [T | Acc])
- end
- end.
-
-
-%% @doc A function that byte-reverses a binary. This might be needed because of
-%% little (fucking!) endianess.
--spec bin_reverse(binary()) -> binary().
-bin_reverse(Bin) when is_binary(Bin) ->
- bin_reverse(Bin, <<>>).
-
--spec bin_reverse(binary(), binary()) -> binary().
-bin_reverse(<<>>, Acc) ->
- Acc;
-bin_reverse(<<Head, More/binary>>, Acc) ->
- bin_reverse(More, <<Head, Acc/binary>>).
-
-%% @doc A function that extracts a null-terminated string from a binary. It
-%% returns the found string along with the rest of the binary.
--spec bin_get_string(binary()) -> {string(), binary()}.
-bin_get_string(Bin) ->
- bin_get_string(Bin, <<>>).
-
-bin_get_string(<<>>, BinAcc) ->
- Bin = bin_reverse(BinAcc), % little endian!
- {binary_to_list(Bin), <<>>};
-bin_get_string(<<0, MoreBin/binary>>, BinAcc) ->
- Bin = bin_reverse(BinAcc), % little endian!
- {binary_to_list(Bin), MoreBin};
-bin_get_string(<<Letter, Tail/binary>>, BinAcc) ->
- bin_get_string(Tail, <<Letter, BinAcc/binary>>).
-
-%% @doc
-make_offsets(NamesSizes) ->
- {Names, Sizes} = lists:unzip(NamesSizes),
- Offsets = make_offsets_from_sizes(Sizes, 1, []),
- lists:zip(Names, Offsets).
-
-make_offsets_from_sizes([], _, Acc) ->
- lists:reverse(Acc);
-make_offsets_from_sizes([Size | Sizes], Cur, Acc) ->
- make_offsets_from_sizes(Sizes, Size+Cur+1, [Cur | Acc]). % For the "."!
-
%% @doc Little-Endian Base 128 (LEB128) Decoder
%% This function extracts the <b>first</b> LEB128-encoded integer in a
%% binary and returns that integer along with the remaining binary. This is
@@ -770,21 +618,3 @@ leb128_decode(LebNum, NoOfBits, Acc) ->
<<Num:Size/integer>> = <<NextBundle:7/bits, Acc/bits>>,
{Num, MoreLebNums}
end.
-
-%% @doc Extract ELF Class from ELF header and export symbol to process
-%% dictionary.
--spec set_architecture_flag(elf()) -> 'ok'.
-set_architecture_flag(Elf) ->
- %% Extract information about ELF Class from ELF Header
- <<16#7f, $E, $L, $F, EI_Class, _MoreHeader/binary>>
- = get_binary_segment(Elf, 0, ?ELF_EHDR_SIZE),
- put(elf_class, EI_Class),
- ok.
-
-%% @doc Read from object file header if the file class is ELF32 or ELF64.
--spec is64bit() -> boolean().
-is64bit() ->
- case get(elf_class) of
- ?ELFCLASS64 -> true;
- ?ELFCLASS32 -> false
- end.
diff --git a/lib/hipe/llvm/elf_format.hrl b/lib/hipe/llvm/elf_format.hrl
index 7a3cdfead6..57a36f0c3e 100644
--- a/lib/hipe/llvm/elf_format.hrl
+++ b/lib/hipe/llvm/elf_format.hrl
@@ -486,3 +486,43 @@
%% Misc.
%%------------------------------------------------------------------------------
-define(bits(Bytes), ((Bytes) bsl 3)).
+
+%%------------------------------------------------------------------------------
+%% Exported record and type declarations for 'elf_format' module
+%%------------------------------------------------------------------------------
+
+%% Section header entries
+-record(elf_shdr,
+ {name :: elf_format:name() % Section name
+ ,type :: elf_format:shdr_type() % Section type
+ ,flags :: elf_format:bitflags() % Section attributes
+ ,addr :: elf_format:offset() % Virtual address in memory
+ ,offset :: elf_format:offset() % Offset in file
+ ,size :: elf_format:size() % Size of section
+ ,link :: non_neg_integer() % Link to other section
+ ,info :: non_neg_integer() % Miscellaneous information
+ ,addralign :: elf_format:size() % Address align boundary
+ ,entsize :: elf_format:size() % Size of entries, if section has
+ % table
+ }).
+-type elf_shdr() :: #elf_shdr{}.
+
+%% Symbol table entries
+-record(elf_sym,
+ {name :: elf_format:name() % Symbol name
+ ,bind :: elf_format:sym_bind() % Symbol binding
+ ,type :: elf_format:sym_type() % Symbol type
+ ,value :: elf_format:valueoff() % Symbol value
+ ,size :: elf_format:size() % Size of object
+ ,section :: undefined | abs | elf_shdr()
+ }).
+-type elf_sym() :: #elf_sym{}.
+
+%% Relocations
+-record(elf_rel,
+ {offset :: elf_format:offset()
+ ,type :: elf_format:reloc_type()
+ ,addend :: elf_format:addend()
+ ,symbol :: elf_sym()
+ }).
+-type elf_rel() :: #elf_rel{}.
diff --git a/lib/hipe/llvm/hipe_llvm.erl b/lib/hipe/llvm/hipe_llvm.erl
index 5e33731a2b..b22f8fb320 100644
--- a/lib/hipe/llvm/hipe_llvm.erl
+++ b/lib/hipe/llvm/hipe_llvm.erl
@@ -199,10 +199,9 @@
adj_stack_register/1,
adj_stack_type/1,
- mk_branch_meta/3,
- branch_meta_id/1,
- branch_meta_true_weight/1,
- branch_meta_false_weight/1
+ mk_meta/2,
+ meta_id/1,
+ meta_operands/1
]).
-export([
@@ -234,7 +233,7 @@
function_arg_type_list/1
]).
--export([pp_ins_list/2, pp_ins/2]).
+-export([pp_ins_list/3, pp_ins/3]).
%%-----------------------------------------------------------------------------
@@ -343,8 +342,9 @@
-record(llvm_adj_stack, {offset, 'register', type}).
-type llvm_adj_stack() :: #llvm_adj_stack{}.
--record(llvm_branch_meta, {id, true_weight, false_weight}).
--type llvm_branch_meta() :: #llvm_branch_meta{}.
+-record(llvm_meta, {id :: string(),
+ operands :: [string() | integer() | llvm_meta()]}).
+-type llvm_meta() :: #llvm_meta{}.
%% A type for any LLVM instruction
-type llvm_instr() :: llvm_ret() | llvm_br() | llvm_br_cond()
@@ -357,7 +357,7 @@
| llvm_call() | llvm_fun_def() | llvm_fun_decl()
| llvm_landingpad() | llvm_comment() | llvm_label()
| llvm_const_decl() | llvm_asm() | llvm_adj_stack()
- | llvm_branch_meta().
+ | llvm_meta().
%% Types
-record(llvm_void, {}).
@@ -701,7 +701,7 @@ is_label(#llvm_comment{}) -> false;
is_label(#llvm_const_decl{}) -> false;
is_label(#llvm_asm{}) -> false;
is_label(#llvm_adj_stack{}) -> false;
-is_label(#llvm_branch_meta{}) -> false.
+is_label(#llvm_meta{}) -> false.
%% const_decl
mk_const_decl(Dst, Decl_type, Type, Value) ->
@@ -722,14 +722,11 @@ adj_stack_offset(#llvm_adj_stack{offset=Offset}) -> Offset.
adj_stack_register(#llvm_adj_stack{'register'=Register}) -> Register.
adj_stack_type(#llvm_adj_stack{type=Type}) -> Type.
-%% branch meta-data
-mk_branch_meta(Id, True_weight, False_weight) ->
- #llvm_branch_meta{id=Id, true_weight=True_weight, false_weight=False_weight}.
-branch_meta_id(#llvm_branch_meta{id=Id}) -> Id.
-branch_meta_true_weight(#llvm_branch_meta{true_weight=True_weight}) ->
- True_weight.
-branch_meta_false_weight(#llvm_branch_meta{false_weight=False_weight}) ->
- False_weight.
+%% meta-data
+mk_meta(Id, Operands) ->
+ #llvm_meta{id=Id, operands=Operands}.
+meta_id(#llvm_meta{id=Id}) -> Id.
+meta_operands(#llvm_meta{operands=Operands}) -> Operands.
%% types
mk_void() -> #llvm_void{}.
@@ -765,13 +762,17 @@ function_arg_type_list(#llvm_fun{arg_type_list=Arg_type_list}) ->
%% Pretty-printer Functions
%%----------------------------------------------------------------------------
-%% @doc Pretty-print a list of LLVM instructions to a Device.
-pp_ins_list(_Dev, []) -> ok;
-pp_ins_list(Dev, [I|Is]) ->
- pp_ins(Dev, I),
- pp_ins_list(Dev, Is).
+-type llvm_version() :: {Major :: integer(), Minor :: integer()}.
-pp_ins(Dev, I) ->
+%% @doc Pretty-print a list of LLVM instructions to a Device, using syntax
+%% compatible with LLVM v. Major.Minor
+-spec pp_ins_list(file:io_device(), llvm_version(), [llvm_instr()]) -> ok.
+pp_ins_list(_Dev, _Ver, []) -> ok;
+pp_ins_list(Dev, Ver={_,_}, [I|Is]) ->
+ pp_ins(Dev, Ver, I),
+ pp_ins_list(Dev, Ver, Is).
+
+pp_ins(Dev, Ver, I) ->
case indent(I) of
true -> write(Dev, " ");
false -> ok
@@ -861,7 +862,7 @@ pp_ins(Dev, I) ->
true -> write(Dev, "volatile ");
false -> ok
end,
- pp_type(Dev, load_p_type(I)),
+ pp_dereference_type(Dev, Ver, load_p_type(I)),
write(Dev, [" ", load_pointer(I), " "]),
case load_alignment(I) of
[] -> ok;
@@ -897,7 +898,7 @@ pp_ins(Dev, I) ->
true -> write(Dev, "inbounds ");
false -> ok
end,
- pp_type(Dev, getelementptr_p_type(I)),
+ pp_dereference_type(Dev, Ver, getelementptr_p_type(I)),
write(Dev, [" ", getelementptr_value(I)]),
pp_typed_idxs(Dev, getelementptr_typed_idxs(I)),
write(Dev, "\n");
@@ -958,12 +959,16 @@ pp_ins(Dev, I) ->
pp_args(Dev, fun_def_arglist(I)),
write(Dev, ") "),
pp_options(Dev, fun_def_fn_attrs(I)),
+ case Ver >= {3,7} of false -> ok; true ->
+ write(Dev, "personality i32 (i32, i64, i8*,i8*)* "
+ "@__gcc_personality_v0 ")
+ end,
case fun_def_align(I) of
[] -> ok;
N -> write(Dev, ["align ", N])
end,
write(Dev, "{\n"),
- pp_ins_list(Dev, fun_def_body(I)),
+ pp_ins_list(Dev, Ver, fun_def_body(I)),
write(Dev, "}\n");
#llvm_fun_decl{} ->
write(Dev, "declare "),
@@ -992,8 +997,12 @@ pp_ins(Dev, I) ->
pp_type(Dev, const_decl_type(I)),
write(Dev, [" ", const_decl_value(I), "\n"]);
#llvm_landingpad{} ->
- write(Dev, "landingpad { i8*, i32 } personality i32 (i32, i64, i8*,i8*)*
- @__gcc_personality_v0 cleanup\n");
+ write(Dev, "landingpad { i8*, i32 } "),
+ case Ver < {3,7} of false -> ok; true ->
+ write(Dev, "personality i32 (i32, i64, i8*,i8*)* "
+ "@__gcc_personality_v0 ")
+ end,
+ write(Dev, "cleanup\n");
#llvm_asm{} ->
write(Dev, [asm_instruction(I), "\n"]);
#llvm_adj_stack{} ->
@@ -1001,14 +1010,37 @@ pp_ins(Dev, I) ->
adj_stack_register(I), "\", \"r\"("]),
pp_type(Dev, adj_stack_type(I)),
write(Dev, [" ", adj_stack_offset(I),")\n"]);
- #llvm_branch_meta{} ->
- write(Dev, ["!", branch_meta_id(I), " = metadata !{metadata !\"branch_weights\",
- i32 ", branch_meta_true_weight(I), ", i32 ",
- branch_meta_false_weight(I), "}\n"]);
+ #llvm_meta{} ->
+ write(Dev, ["!", meta_id(I), " = "]),
+ Named = case string:to_integer(meta_id(I)) of
+ {_, ""} -> false;
+ _ -> true
+ end,
+ case Ver < {3,6} andalso not Named of
+ true -> write(Dev, "metadata !{metadata ");
+ false -> write(Dev, "!{ ")
+ end,
+ write(Dev, string:join([if is_list(Op) -> ["!\"", Op, "\""];
+ is_integer(Op) -> ["i32 ", integer_to_list(Op)];
+ is_record(Op, llvm_meta) ->
+ ["!", meta_id(Op)]
+ end || Op <- meta_operands(I)], ", ")),
+ write(Dev, " }\n");
Other ->
exit({?MODULE, pp_ins, {"Unknown LLVM instruction", Other}})
end.
+%% @doc Print the type of a dereference in an LLVM instruction using syntax
+%% parsable by the specified LLVM version.
+pp_dereference_type(Dev, Ver, Type) ->
+ case Ver >= {3,7} of
+ false -> ok;
+ true ->
+ pp_type(Dev, pointer_type(Type)),
+ write(Dev, ", ")
+ end,
+ pp_type(Dev, Type).
+
%% @doc Pretty-print a list of types
pp_type_list(_Dev, []) -> ok;
pp_type_list(Dev, [T]) ->
@@ -1114,7 +1146,7 @@ indent(I) ->
#llvm_fun_def{} -> false;
#llvm_fun_decl{} -> false;
#llvm_const_decl{} -> false;
- #llvm_branch_meta{} -> false;
+ #llvm_meta{} -> false;
_ -> true
end.
diff --git a/lib/hipe/llvm/hipe_llvm_main.erl b/lib/hipe/llvm/hipe_llvm_main.erl
index 3c24425828..476d6fb49c 100644
--- a/lib/hipe/llvm/hipe_llvm_main.erl
+++ b/lib/hipe/llvm/hipe_llvm_main.erl
@@ -13,7 +13,7 @@
%% chain is invoked in order to produce an object file.
rtl_to_native(MFA, RTL, Roots, Options) ->
%% Compile to LLVM and get Instruction List (along with infos)
- {LLVMCode, RelocsDict, ConstTab} =
+ {LLVMCode, RelocsDict0, ConstTab0} =
hipe_rtl_to_llvm:translate(RTL, Roots),
%% Fix function name to an acceptable LLVM identifier (needed for closures)
{_Module, Fun, Arity} = hipe_rtl_to_llvm:fix_mfa_name(MFA),
@@ -24,34 +24,33 @@ rtl_to_native(MFA, RTL, Roots, Options) ->
%% Extract information from object file
%%
ObjBin = open_object_file(ObjectFile),
- %% Read and set the ELF class
- elf_format:set_architecture_flag(ObjBin),
+ Obj = elf_format:read(ObjBin),
%% Get labels info (for switches and jump tables)
- Labels = elf_format:get_rodata_relocs(ObjBin),
- {Switches, Closures} = get_tables(ObjBin),
+ Labels = elf_format:extract_rela(Obj, ?RODATA),
+ Tables = get_tables(Obj),
%% Associate Labels with Switches and Closures with stack args
- {SwitchInfos, ExposedClosures} =
- correlate_labels(Switches ++ Closures, Labels),
+ {SwitchInfos, ExposedClosures} = correlate_labels(Tables, Labels),
%% SwitchInfos: [{"table_50", [Labels]}]
%% ExposedClosures: [{"table_closures", [Labels]}]
-
+
%% Labelmap contains the offsets of the labels in the code that are
%% used for switch's jump tables
- LabelMap = create_labelmap(MFA, SwitchInfos, RelocsDict),
+ LabelMap = create_labelmap(MFA, SwitchInfos, RelocsDict0),
+ {RelocsDict, ConstTab} = extract_constants(RelocsDict0, ConstTab0, Obj),
%% Get relocation info
- TextRelocs = elf_format:get_text_relocs(ObjBin),
+ TextRelocs = elf_format:extract_rela(Obj, ?TEXT),
%% AccRefs contains the offsets of all references to relocatable symbols in
%% the code:
AccRefs = fix_relocations(TextRelocs, RelocsDict, MFA),
%% Get stack descriptors
- SDescs = get_sdescs(ObjBin),
+ SDescs = get_sdescs(Obj),
%% FixedSDescs are the stack descriptors after correcting calls that have
%% arguments in the stack
FixedSDescs =
fix_stack_descriptors(RelocsDict, AccRefs, SDescs, ExposedClosures),
Refs = AccRefs ++ FixedSDescs,
%% Get binary code from object file
- BinCode = elf_format:extract_text(ObjBin),
+ BinCode = elf_format:extract_text(Obj),
%% Remove temp files (if needed)
ok = remove_temp_folder(Dir, Options),
%% Return the code together with information that will be used in the
@@ -78,7 +77,8 @@ compile_with_llvm(FunName, Arity, LLVMCode, Options, UseBuffer) ->
false -> []
end,
{ok, File_llvm} = file:open(Dir ++ Filename ++ ".ll", OpenOpts),
- hipe_llvm:pp_ins_list(File_llvm, LLVMCode),
+ Ver = hipe:get_llvm_version(), %% Should probably cache this
+ hipe_llvm:pp_ins_list(File_llvm, Ver, LLVMCode),
%% delayed_write can cause file:close not to do a close, hence the two calls
ok = file:close(File_llvm),
__ = file:close(File_llvm),
@@ -158,12 +158,10 @@ trans_optlev_flag(Tool, Options) ->
%%------------------------------------------------------------------------------
%% @doc Get switch table and closure table.
+-spec get_tables(elf_format:elf()) -> [elf_sym()].
get_tables(Elf) ->
- %% Search Symbol Table for an entry with name prefixed with "table_":
- Triples = elf_format:get_tab_entries(Elf),
- Switches = [T || T={"table_" ++ _, _, _} <- Triples],
- Closures = [T || T={"table_closures" ++ _, _, _} <- Switches],
- {Switches, Closures}.
+ %% Search Symbol Table for entries where name is prefixed with "table_":
+ [S || S=#elf_sym{name="table_" ++ _} <- elf_format:elf_symbols(Elf)].
%% @doc This function associates symbols who point to some table of labels with
%% the corresponding offsets of the labels in the code. These tables can
@@ -171,14 +169,12 @@ get_tables(Elf) ->
%% of blocks that contain closure calls with more than ?NR_ARG_REGS.
correlate_labels([], _L) -> {[], []};
correlate_labels(Tables, Labels) ->
- %% Sort "Tables" based on "ValueOffsets"
- OffsetSortedTb = lists:ukeysort(2, Tables),
- %% Unzip offset-sorted list of "Switches"
- {Names, _Offsets, TablesSizeList} = lists:unzip3(OffsetSortedTb),
- %% Associate switch names with labels
- L = split_list(Labels, TablesSizeList),
- %% Zip back! (to [{SwitchName, Values}])
- NamesValues = lists:zip(Names, L),
+ %% Assumes that the relocations are sorted
+ RelocTree = gb_trees:from_orddict(
+ [{Rel#elf_rel.offset, Rel#elf_rel.addend} || Rel <- Labels]),
+ %% Lookup all relocations pertaining to each symbol
+ NamesValues = [{Name, lookup_range(Value, Value+Size, RelocTree)}
+ || #elf_sym{name=Name, value=Value, size=Size} <- Tables],
case lists:keytake("table_closures", 1, NamesValues) of
false -> %% No closures in the code, no closure table
{NamesValues, []};
@@ -186,6 +182,17 @@ correlate_labels(Tables, Labels) ->
{SwitchesNV, ClosureTableNV}
end.
+%% Fetches all values with a key in [Low, Hi)
+-spec lookup_range(_::K, _::K, gb_trees:tree(K,V)) -> [_::V].
+lookup_range(Low, Hi, Tree) ->
+ lookup_range_1(Hi, gb_trees:iterator_from(Low, Tree)).
+
+lookup_range_1(Hi, Iter0) ->
+ case gb_trees:next(Iter0) of
+ {Key, Value, Iter} when Key < Hi -> [Value | lookup_range_1(Hi, Iter)];
+ _ -> []
+ end.
+
%% @doc Create a gb_tree which contains information about the labels that used
%% for switch's jump tables. The keys of the gb_tree are of the form
%% {MFA, Label} and the values are the actual Offsets.
@@ -213,40 +220,80 @@ insert_to_labelmap([{Key, Value}|Rest], LabelMap) ->
insert_to_labelmap(Rest, LabelMap)
end.
+%% Find any LLVM-generated constants and add them to the constant table
+extract_constants(RelocsDict0, ConstTab0, Obj) ->
+ TextRelocs = elf_format:extract_rela(Obj, ?TEXT),
+ AnonConstSections =
+ lists:usort([{Sec, Offset}
+ || #elf_rel{symbol=#elf_sym{type=section, section=Sec},
+ addend=Offset} <- TextRelocs]),
+ lists:foldl(
+ fun({#elf_shdr{name=Name, type=progbits, addralign=Align, entsize=EntSize,
+ size=Size} = Section, Offset}, {RelocsDict1, ConstTab1})
+ when EntSize > 0, 0 =:= Size rem EntSize, 0 =:= Offset rem EntSize ->
+ SectionBin = elf_format:section_contents(Section, Obj),
+ Constant = binary:part(SectionBin, Offset, EntSize),
+ {ConstTab, ConstLbl} =
+ hipe_consttab:insert_binary_const(ConstTab1, Align, Constant),
+ {dict:store({anon, Name, Offset}, {constant, ConstLbl}, RelocsDict1),
+ ConstTab}
+ end, {RelocsDict0, ConstTab0}, AnonConstSections).
+
%% @doc Correlate object file relocation symbols with info from translation to
%% llvm code.
fix_relocations(Relocs, RelocsDict, MFA) ->
- fix_relocs(Relocs, RelocsDict, MFA, []).
-
-fix_relocs([], _, _, RelocAcc) -> RelocAcc;
-fix_relocs([{Name, Offset}|Rs], RelocsDict, {ModName,_,_}=MFA, RelocAcc) ->
+ lists:map(fun(Reloc) -> fix_reloc(Reloc, RelocsDict, MFA) end, Relocs).
+
+%% Relocation types and expected addends for x86 and amd64
+-define(PCREL_T, 'pc32').
+-define(PCREL_A, -4). %% Hard-coded in hipe_x86.c and hipe_amd64.c
+-ifdef(BIT32).
+-define(ABS_T, '32').
+-define(ABS_A, _). %% We support any addend
+-else.
+-define(ABS_T, '64').
+-define(ABS_A, 0).
+-endif.
+
+fix_reloc(#elf_rel{symbol=#elf_sym{name=Name, section=undefined, type=notype},
+ offset=Offset, type=?PCREL_T, addend=?PCREL_A},
+ RelocsDict, {ModName,_,_}) when Name =/= "" ->
case dict:fetch(Name, RelocsDict) of
- {atom, AtomName} ->
- fix_relocs(Rs, RelocsDict, MFA,
- [{?LOAD_ATOM, Offset, AtomName}|RelocAcc]);
- {constant, Label} ->
- fix_relocs(Rs, RelocsDict, MFA,
- [{?LOAD_ADDRESS, Offset, {constant, Label}}|RelocAcc]);
- {switch, _, JTabLab} -> %% Treat switch exactly as constant
- fix_relocs(Rs, RelocsDict, MFA,
- [{?LOAD_ADDRESS, Offset, {constant, JTabLab}}|RelocAcc]);
- {closure, _}=Closure ->
- fix_relocs(Rs, RelocsDict, MFA,
- [{?LOAD_ADDRESS, Offset, Closure}|RelocAcc]);
- {call, {bif, BifName, _}} ->
- fix_relocs(Rs, RelocsDict, MFA,
- [{?CALL_LOCAL, Offset, BifName}|RelocAcc]);
+ {call, {bif, BifName, _}} -> {?CALL_LOCAL, Offset, BifName};
%% MFA calls to functions in the same module are of type 3, while all
%% other MFA calls are of type 2.
- {call, {ModName,_F,_A}=CallMFA} ->
- fix_relocs(Rs, RelocsDict, MFA,
- [{?CALL_LOCAL, Offset, CallMFA}|RelocAcc]);
- {call, CallMFA} ->
- fix_relocs(Rs, RelocsDict, MFA,
- [{?CALL_REMOTE, Offset, CallMFA}|RelocAcc]);
- Other ->
- exit({?MODULE, fix_relocs,
- {"Relocation not in relocation dictionary", Other}})
+ %% XXX: Does this code break hot code loading (by transforming external
+ %% calls into local calls?)
+ {call, {ModName,_F,_A}=CallMFA} -> {?CALL_LOCAL, Offset, CallMFA};
+ {call, CallMFA} -> {?CALL_REMOTE, Offset, CallMFA}
+ end;
+fix_reloc(#elf_rel{symbol=#elf_sym{name=Name, section=undefined, type=notype},
+ offset=Offset, type=?ABS_T, addend=?ABS_A},
+ RelocsDict, _) when Name =/= "" ->
+ case dict:fetch(Name, RelocsDict) of
+ {atom, AtomName} -> {?LOAD_ATOM, Offset, AtomName};
+ {constant, Label} -> {?LOAD_ADDRESS, Offset, {constant, Label}};
+ {closure, _}=Closure -> {?LOAD_ADDRESS, Offset, Closure}
+ end;
+fix_reloc(#elf_rel{symbol=#elf_sym{name=Name, section=#elf_shdr{name=?TEXT},
+ type=func},
+ offset=Offset, type=?PCREL_T, addend=?PCREL_A},
+ RelocsDict, MFA) when Name =/= "" ->
+ case dict:fetch(Name, RelocsDict) of
+ {call, MFA} -> {?CALL_LOCAL, Offset, MFA}
+ end;
+fix_reloc(#elf_rel{symbol=#elf_sym{name=Name, section=#elf_shdr{name=?RODATA},
+ type=object},
+ offset=Offset, type=?ABS_T, addend=?ABS_A},
+ RelocsDict, _) when Name =/= "" ->
+ case dict:fetch(Name, RelocsDict) of
+ {switch, _, JTabLab} -> %% Treat switch exactly as constant
+ {?LOAD_ADDRESS, Offset, {constant, JTabLab}}
+ end;
+fix_reloc(#elf_rel{symbol=#elf_sym{type=section, section=#elf_shdr{name=Name}},
+ offset=Offset, type=?ABS_T, addend=Addend}, RelocsDict, _) ->
+ case dict:fetch({anon, Name, Addend}, RelocsDict) of
+ {constant, Label} -> {?LOAD_ADDRESS, Offset, {constant, Label}}
end.
%%------------------------------------------------------------------------------
@@ -271,20 +318,14 @@ get_sdescs(Elf) ->
T = SPCount * ?SP_ADDR_SIZE,
%% Pattern match fields of ".note.gc":
<<SPCount:(?bits(?SP_COUNT_SIZE))/integer-little, % Sanity check!
- SPAddrs:T/binary, % NOTE: In 64bit they are relocs!
+ _SPAddrs:T/binary, % NOTE: In 64bit they are relocs!
StkFrameSize:(?bits(?SP_STKFRAME_SIZE))/integer-little,
StkArity:(?bits(?SP_STKARITY_SIZE))/integer-little,
_LiveRootCount:(?bits(?SP_LIVEROOTCNT_SIZE))/integer-little, % Skip
Roots/binary>> = NoteGC_bin,
LiveRoots = get_liveroots(Roots, []),
- %% Extract information about the safe point addresses:
- SPOffs =
- case elf_format:is64bit() of
- true -> %% Find offsets in ".rela.note.gc":
- elf_format:get_rela_addends(RelaNoteGC);
- false -> %% Find offsets in SPAddrs (in ".note.gc"):
- get_spoffs(SPAddrs, [])
- end,
+ %% Extract the safe point offsets:
+ SPOffs = [A || #elf_rel{addend=A} <- RelaNoteGC],
%% Extract Exception Handler labels:
ExnHandlers = elf_format:get_exn_handlers(Elf),
%% Combine ExnHandlers and Safe point addresses (return addresses):
@@ -300,13 +341,6 @@ get_liveroots(<<Root:?bits(?LR_STKINDEX_SIZE)/integer-little,
MoreRoots/binary>>, Acc) ->
get_liveroots(MoreRoots, [Root | Acc]).
-%% @doc Extracts a bunch of integers (safepoint offsets) from a binary. Returns
-%% a tuple as need for stack descriptors.
-get_spoffs(<<>>, Acc) ->
- lists:reverse(Acc);
-get_spoffs(<<SPOff:?bits(?SP_ADDR_SIZE)/integer-little, More/binary>>, Acc) ->
- get_spoffs(More, [SPOff | Acc]).
-
combine_ras_and_exns(_, [], Acc) ->
lists:reverse(Acc);
combine_ras_and_exns(ExnHandlers, [RA | MoreRAs], Acc) ->
@@ -489,18 +523,3 @@ unique_folder(FunName, Arity, Options) ->
dir_exists(Filename) ->
{Flag, Info} = file:read_file_info(Filename),
(Flag =:= ok) andalso (element(3, Info) =:= directory).
-
-%% @doc Function that takes as arguments a list of integers and a list with
-%% numbers indicating how many items should each tuple have and splits
-%% the original list to a list of lists of integers (with the specified
-%% number of elements), i.e. [ [...], [...] ].
--spec split_list([integer()], [integer()]) -> [ [integer()] ].
-split_list(List, ElemsPerTuple) ->
- split_list(List, ElemsPerTuple, []).
-
--spec split_list([integer()], [integer()], [ [integer()] ]) -> [ [integer()] ].
-split_list([], [], Acc) ->
- lists:reverse(Acc);
-split_list(List, [NumOfElems | MoreNums], Acc) ->
- {L1, L2} = lists:split(NumOfElems, List),
- split_list(L2, MoreNums, [ L1 | Acc]).
diff --git a/lib/hipe/llvm/hipe_rtl_to_llvm.erl b/lib/hipe/llvm/hipe_rtl_to_llvm.erl
index d7d8d1b049..66b2e10fb8 100644
--- a/lib/hipe/llvm/hipe_rtl_to_llvm.erl
+++ b/lib/hipe/llvm/hipe_rtl_to_llvm.erl
@@ -13,6 +13,8 @@
-define(WORD_WIDTH, (?bytes_to_bits(hipe_rtl_arch:word_size()))).
-define(BRANCH_META_TAKEN, "0").
-define(BRANCH_META_NOT_TAKEN, "1").
+-define(FIRST_FREE_META_NO, 2).
+-define(HIPE_LITERALS_META, "hipe.literals").
%%------------------------------------------------------------------------------
%% @doc Main function for translating an RTL function to LLVM Assembly. Takes as
@@ -51,8 +53,9 @@ translate(RTL, Roots) ->
translate_instr_list(Code1, [], Relocs, Data),
%% Create LLVM code to declare relocation symbols as external symbols along
%% with local variables in order to use them as just any other variable
- {FinalRelocs, ExternalDecl, LocalVars} =
+ {FinalRelocs, ExternalDecl0, LocalVars} =
handle_relocations(Relocs1, Data, Fun),
+ ExternalDecl = add_literals_metadata(ExternalDecl0),
%% Pass on LLVM code in order to create Fail blocks and a landingpad
%% instruction to each one
LLVM_Code2 = add_landingpads(LLVM_Code1, FailLabels),
@@ -266,17 +269,18 @@ trans_alub_overflow(I, Sign, Relocs) ->
T2 = mk_temp(),
%% T1{1}: Boolean variable indicating overflow
I6 = hipe_llvm:mk_extractvalue(T2, ReturnType, T1, "1", []),
- case hipe_rtl:alub_cond(I) of
- Op when Op =:= overflow orelse Op =:= ltu ->
- True_label = mk_jump_label(hipe_rtl:alub_true_label(I)),
- False_label = mk_jump_label(hipe_rtl:alub_false_label(I)),
- MetaData = branch_metadata(hipe_rtl:alub_pred(I));
- not_overflow ->
- True_label = mk_jump_label(hipe_rtl:alub_false_label(I)),
- False_label = mk_jump_label(hipe_rtl:alub_true_label(I)),
- MetaData = branch_metadata(1 - hipe_rtl:alub_pred(I))
- end,
- I7 = hipe_llvm:mk_br_cond(T2, True_label, False_label, MetaData),
+ {TrueLabel, FalseLabel, MetaData} =
+ case hipe_rtl:alub_cond(I) of
+ Op when Op =:= overflow orelse Op =:= ltu ->
+ {mk_jump_label(hipe_rtl:alub_true_label(I)),
+ mk_jump_label(hipe_rtl:alub_false_label(I)),
+ branch_metadata(hipe_rtl:alub_pred(I))};
+ not_overflow ->
+ {mk_jump_label(hipe_rtl:alub_false_label(I)),
+ mk_jump_label(hipe_rtl:alub_true_label(I)),
+ branch_metadata(1 - hipe_rtl:alub_pred(I))}
+ end,
+ I7 = hipe_llvm:mk_br_cond(T2, TrueLabel, FalseLabel, MetaData),
{[I7, I6, I5, I4, I3, I2, I1], NewRelocs}.
trans_alub_op(I, Sign) ->
@@ -1457,8 +1461,8 @@ handle_relocations(Relocs, Data, Fun) ->
Relocs4 = dict:store("hipe_bifs.llvm_fix_pinned_regs.0",
{call, {hipe_bifs, llvm_fix_pinned_regs, 0}}, Relocs3),
BranchMetaData = [
- hipe_llvm:mk_branch_meta(?BRANCH_META_TAKEN, "99", "1")
- , hipe_llvm:mk_branch_meta(?BRANCH_META_NOT_TAKEN, "1", "99")
+ hipe_llvm:mk_meta(?BRANCH_META_TAKEN, ["branch_weights", 99, 1])
+ , hipe_llvm:mk_meta(?BRANCH_META_NOT_TAKEN, ["branch_weights", 1, 99])
],
ExternalDeclarations = AtomDecl ++ ClosureDecl ++ ConstDecl ++ FunDecl ++
ClosureLabelDecl ++ SwitchDecl ++ BranchMetaData,
@@ -1611,3 +1615,16 @@ load_constant(Label) ->
const_to_dict(Elem, Dict) ->
Name = "DL" ++ integer_to_list(Elem),
dict:store(Name, {'constant', Elem}, Dict).
+
+%% @doc Export the hipe literals that LLVM needs to generate the prologue as
+%% metadata.
+add_literals_metadata(ExternalDecls) ->
+ Pairs = [hipe_llvm:mk_meta(integer_to_list(?FIRST_FREE_META_NO),
+ ["P_NSP_LIMIT", ?P_NSP_LIMIT])
+ ,hipe_llvm:mk_meta(integer_to_list(?FIRST_FREE_META_NO + 1),
+ ["X86_LEAF_WORDS", ?X86_LEAF_WORDS])
+ ,hipe_llvm:mk_meta(integer_to_list(?FIRST_FREE_META_NO + 2),
+ ["AMD64_LEAF_WORDS", ?AMD64_LEAF_WORDS])
+ ],
+ [hipe_llvm:mk_meta(?HIPE_LITERALS_META, Pairs) |
+ Pairs ++ ExternalDecls].
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile
index 6b6cad3ed3..8ef31dbb46 100644
--- a/lib/hipe/main/Makefile
+++ b/lib/hipe/main/Makefile
@@ -70,7 +70,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
include ../native.mk
-ERL_COMPILE_FLAGS += +nowarn_shadow_vars +warn_missing_spec +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +nowarn_shadow_vars +warn_export_vars +warn_missing_spec +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/main/hipe.app.src b/lib/hipe/main/hipe.app.src
index aa86b6dc5b..f8487151d7 100644
--- a/lib/hipe/main/hipe.app.src
+++ b/lib/hipe/main/hipe.app.src
@@ -88,6 +88,7 @@
hipe_icode2rtl,
hipe_icode_bincomp,
hipe_icode_callgraph,
+ hipe_icode_call_elim,
hipe_icode_cfg,
hipe_icode_coordinator,
hipe_icode_ebb,
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 0e32da1d36..6c525dd143 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -200,8 +200,9 @@
compile/4,
compile_core/4,
file/1,
- file/2,
- llvm_support_available/0,
+ file/2,
+ get_llvm_version/0,
+ llvm_support_available/0,
load/1,
help/0,
help_hiper/0,
@@ -448,16 +449,16 @@ compile(Name, File, Opts0) when is_atom(Name) ->
true ->
case filename:find_src(filename:rootname(File, ".beam")) of
{error, _} ->
- ?error_msg("Cannot find source code for ~p.",[File]),
+ ?error_msg("Cannot find source code for ~p.", [File]),
?EXIT({cant_find_source_code});
{Source, CompOpts} ->
CoreOpts = [X || X = {core_transform, _} <- Opts],
- %%io:format("Using: ~w\n", [CoreOpts]),
+ %% io:format("Using: ~w\n", [CoreOpts]),
case compile:file(Source, CoreOpts ++ [to_core, binary|CompOpts]) of
{ok, _, Core} ->
compile_core(Name, Core, File, Opts);
Error ->
- ?error_msg("Error compiling ~p:\n~p.",[File, Error]),
+ ?error_msg("Error compiling ~p:\n~p.", [File, Error]),
?EXIT({cant_compile_source_code})
end
end;
@@ -469,7 +470,7 @@ compile(Name, File, Opts0) when is_atom(Name) ->
{ok, _, Core} ->
compile_core(Name, Core, File, Opts);
Error ->
- ?error_msg("Error compiling ~p:\n~p\n",[Source, Error]),
+ ?error_msg("Error compiling ~p:\n~p\n", [Source, Error]),
?EXIT({cant_compile_source_code, Error})
end;
Other when Other =:= false; Other =:= undefined ->
@@ -572,8 +573,7 @@ file(File, Options) when is_atom(File) ->
disasm(File) ->
case beam_disasm:file(File) of
#beam_file{labeled_exports = LabeledExports,
- compile_info = CompInfo,
- code = BeamCode} ->
+ compile_info = CompInfo, code = BeamCode} ->
CompOpts = proplists:get_value(options, CompInfo, []),
HCompOpts = case lists:keyfind(hipe, 1, CompOpts) of
{hipe, L} when is_list(L) -> L;
@@ -596,16 +596,16 @@ fix_beam_exports([], Exports) ->
Exports.
get_beam_icode(Mod, {BeamCode, Exports}, File, Options) ->
- ?option_time({ok, Icode} =
- (catch {ok, hipe_beam_to_icode:module(BeamCode, Options)}),
- "BEAM-to-Icode", Options),
+ {ok, Icode} =
+ ?option_time((catch {ok, hipe_beam_to_icode:module(BeamCode, Options)}),
+ "BEAM-to-Icode", Options),
BeamBin = get_beam_code(File),
{{Mod, Exports, Icode}, BeamBin}.
get_core_icode(Mod, Core, File, Options) ->
- ?option_time({ok, Icode} =
- (catch {ok, cerl_to_icode:module(Core, Options)}),
- "BEAM-to-Icode", Options),
+ {ok, Icode} =
+ ?option_time((catch {ok, cerl_to_icode:module(Core, Options)}),
+ "BEAM-to-Icode", Options),
NeedBeamCode = not proplists:get_bool(load, Options),
BeamBin =
case NeedBeamCode of
@@ -618,7 +618,7 @@ get_core_icode(Mod, Core, File, Options) ->
get_beam_code(Bin) when is_binary(Bin) -> Bin;
get_beam_code(FileName) ->
case erl_prim_loader:get_file(FileName) of
- {ok,Bin,_} ->
+ {ok, Bin, _} ->
Bin;
error ->
?EXIT(no_beam_file)
@@ -1165,6 +1165,9 @@ option_text(caller_save_spill_restore) ->
"Activates caller save register spills and restores";
option_text(debug) ->
"Outputs internal debugging information during compilation";
+option_text(icode_call_elim) ->
+ "Performs call elimination of BIFs that are side-effect free\n" ++
+ "only on some argument types";
option_text(icode_range) ->
"Performs integer range analysis on the Icode level";
option_text(icode_ssa_check) ->
@@ -1318,6 +1321,7 @@ opt_keys() ->
get_called_modules,
split_arith,
split_arith_unsafe,
+ icode_call_elim,
icode_inline_bifs,
icode_ssa_check,
icode_ssa_copy_prop,
@@ -1399,7 +1403,7 @@ o1_opts(TargetArch) ->
o2_opts(TargetArch) ->
Common = [icode_ssa_const_prop, icode_ssa_copy_prop, % icode_ssa_struct_reuse,
- icode_type, icode_inline_bifs, rtl_lcm,
+ icode_type, icode_inline_bifs, icode_call_elim, rtl_lcm,
rtl_ssa, rtl_ssa_const_prop,
spillmin_color, use_indexing, remove_comments,
concurrent_comp, binary_opt | o1_opts(TargetArch)],
@@ -1429,6 +1433,7 @@ opt_negations() ->
{no_icode_inline_bifs, icode_inline_bifs},
{no_icode_range, icode_range},
{no_icode_split_arith, icode_split_arith},
+ {no_icode_call_elim, icode_call_elim},
{no_icode_ssa_check, icode_ssa_check},
{no_icode_ssa_copy_prop, icode_ssa_copy_prop},
{no_icode_ssa_const_prop, icode_ssa_const_prop},
@@ -1479,18 +1484,25 @@ opt_expansions(TargetArch) ->
[{o1, o1_opts(TargetArch)},
{o2, o2_opts(TargetArch)},
{o3, o3_opts(TargetArch)},
- {to_llvm, llvm_opts(o3)},
- {{to_llvm, o0}, llvm_opts(o0)},
- {{to_llvm, o1}, llvm_opts(o1)},
- {{to_llvm, o2}, llvm_opts(o2)},
- {{to_llvm, o3}, llvm_opts(o3)},
+ {to_llvm, llvm_opts(o3, TargetArch)},
+ {{to_llvm, o0}, llvm_opts(o0, TargetArch)},
+ {{to_llvm, o1}, llvm_opts(o1, TargetArch)},
+ {{to_llvm, o2}, llvm_opts(o2, TargetArch)},
+ {{to_llvm, o3}, llvm_opts(o3, TargetArch)},
{x87, [x87, inline_fp]},
{inline_fp, case TargetArch of %% XXX: Temporary until x86 has sse2
x86 -> [x87, inline_fp];
_ -> [inline_fp] end}].
-llvm_opts(O) ->
- [to_llvm, {llvm_opt, O}, {llvm_llc, O}].
+llvm_opts(O, TargetArch) ->
+ Base = [to_llvm, {llvm_opt, O}, {llvm_llc, O}],
+ case TargetArch of
+ %% A llvm bug present in 3.4 through (at least) 3.8 miscompiles x86
+ %% functions that have floats are spilled to stack by clobbering the process
+ %% pointer (ebp) trying to realign the stack pointer.
+ x86 -> [no_inline_fp | Base];
+ _ -> Base
+ end.
%% This expands "basic" options, which may be tested early and cannot be
%% in conflict with options found in the source code.
@@ -1520,7 +1532,8 @@ expand_options(Opts, TargetArch) ->
proplists:normalize(Opts, [{negations, opt_negations()},
{aliases, opt_aliases()},
{expand, opt_basic_expansions()},
- {expand, opt_expansions(TargetArch)}]).
+ {expand, opt_expansions(TargetArch)},
+ {negations, opt_negations()}]).
-spec check_options(comp_options()) -> 'ok'.
@@ -1538,18 +1551,27 @@ check_options(Opts) ->
-spec llvm_support_available() -> boolean().
llvm_support_available() ->
- get_llvm_version() >= 3.4.
+ get_llvm_version() >= {3,4}.
+
+-type llvm_version() :: {Major :: integer(), Minor :: integer()}.
+-spec get_llvm_version() -> llvm_version() | {0, 0}.
get_llvm_version() ->
OptStr = os:cmd("opt -version"),
SubStr = "LLVM version ", N = length(SubStr),
case string:str(OptStr, SubStr) of
0 -> % No opt available
- 0.0;
+ {0, 0};
S ->
- case string:to_float(string:sub_string(OptStr, S + N)) of
- {error, _} -> 0.0; %XXX: Assumes no revision numbers in versioning
- {Float, _} -> Float
+ case string:tokens(string:sub_string(OptStr, S + N), ".") of
+ [MajorS, MinorS | _] ->
+ case {string:to_integer(MajorS), string:to_integer(MinorS)} of
+ {{Major, ""}, {Minor, _}}
+ when is_integer(Major), is_integer(Minor) ->
+ {Major, Minor};
+ _ -> {0, 0}
+ end;
+ _ -> {0, 0} %XXX: Assumes no revision numbers in versioning
end
end.
diff --git a/lib/hipe/main/hipe.hrl.src b/lib/hipe/main/hipe.hrl.src
index 3be824ac34..53b59f88f0 100644
--- a/lib/hipe/main/hipe.hrl.src
+++ b/lib/hipe/main/hipe.hrl.src
@@ -152,7 +152,7 @@
STMNT,
?untagged_msg(Msg ++ "~.2f s\n",[hipe_timing:stop_timer(Timer)/1000])).
-else.
--define(TIME_STMNT(STMNT,Msg,Timer),STMNT).
+-define(TIME_STMNT(STMNT,Msg,Timer), STMNT).
-endif.
-define(start_timer(Text), hipe_timing:start(Text, ?MODULE)).
@@ -162,22 +162,24 @@
-define(get_hipe_timer_val(Timer), get(Timer)).
-define(set_hipe_timer_val(Timer, Val), put(Timer, Val)).
-define(option_time(Stmnt, Text, Options),
- if true -> ?when_option(time, Options, ?start_timer(Text)),
- fun(R) ->
- ?when_option(time, Options, ?stop_timer(Text)),
- R
- end(Stmnt)end).
+ begin
+ ?when_option(time, Options, ?start_timer(Text)),
+ fun(R) ->
+ ?when_option(time, Options, ?stop_timer(Text)),
+ R
+ end(Stmnt)
+ end).
--define(option_start_time(Text,Options),
+-define(option_start_time(Text, Options),
?when_option(time, Options, ?start_timer(Text))).
--define(option_stop_time(Text,Options),
+-define(option_stop_time(Text, Options),
?when_option(time, Options, ?stop_timer(Text))).
-define(opt_start_timer(Text),
- hipe_timing:start_optional_timer(Text,?MODULE)).
+ hipe_timing:start_optional_timer(Text, ?MODULE)).
-define(opt_stop_timer(Text),
- hipe_timing:stop_optional_timer(Text,?MODULE)).
+ hipe_timing:stop_optional_timer(Text, ?MODULE)).
%%
%% Turn on instrumentation of the compiler.
@@ -187,15 +189,15 @@
-define(count_pre_ra_instructions(Options, NoInstrs),
?when_option(count_instrs, Options,
put(pre_ra_instrs,
- get(pre_ra_instrs)+ NoInstrs))).
+ get(pre_ra_instrs) + NoInstrs))).
-define(count_post_ra_instructions(Options, NoInstrs),
?when_option(count_instrs, Options,
put(post_ra_instrs,
- get(post_ra_instrs)+ NoInstrs))).
+ get(post_ra_instrs) + NoInstrs))).
-define(start_time_regalloc(Options),
?when_option(timeregalloc, Options,
- put(regalloctime1,erlang:statistics(runtime)))).
+ put(regalloctime1, erlang:statistics(runtime)))).
-define(stop_time_regalloc(Options),
?when_option(timeregalloc, Options,
put(regalloctime,
@@ -215,11 +217,11 @@
-define(count_pre_ra_temps(Options, NoTemps),
?when_option(count_temps, Options,
put(pre_ra_temps,
- get(pre_ra_temps)+ NoTemps))).
+ get(pre_ra_temps) + NoTemps))).
-define(count_post_ra_temps(Options, NoTemps),
?when_option(count_temps, Options,
put(post_ra_temps,
- get(post_ra_temps)+ NoTemps))).
+ get(post_ra_temps) + NoTemps))).
-define(inc_counter(Counter, Val),
case get(Counter) of
@@ -255,7 +257,7 @@
?count_post_ra_instructions(Options, NoInstrs),
?cons_counter(counter_mem_temps, get(counter_mfa_mem_temps)),
?cons_counter(ra_all_iterations_counter, get(ra_iteration_counter)),
- put(ra_iteration_counter,0),
+ put(ra_iteration_counter, 0),
?count_post_ra_temps(Options, NoTemps)
end).
@@ -264,12 +266,12 @@
put(spilledtemps, get(spilledtemps) + NoSpills))).
-define(optional_start_timer(Timer, Options),
- case lists:member(Timer, proplists:get_value(timers,Options++[{timers,[]}])) of
+ case lists:member(Timer, proplists:get_value(timers, Options++[{timers,[]}])) of
true -> ?start_hipe_timer(Timer);
false -> true
end).
-define(optional_stop_timer(Timer, Options),
- case lists:member(Timer, proplists:get_value(timers,Options++[{timers,[]}])) of
+ case lists:member(Timer, proplists:get_value(timers, Options++[{timers,[]}])) of
true -> ?stop_hipe_timer(Timer);
false -> true
end).
@@ -316,4 +318,4 @@
'unknown' | {'reg' | 'fp_reg' | 'spill',
non_neg_integer()}}].
-type hipe_temp_map() :: tuple().
--type hipe_spill_map() :: [{non_neg_integer(), {'spill',non_neg_integer()}}].
+-type hipe_spill_map() :: [{non_neg_integer(), {'spill', non_neg_integer()}}].
diff --git a/lib/hipe/main/hipe_main.erl b/lib/hipe/main/hipe_main.erl
index be5050e155..4b89feb48a 100644
--- a/lib/hipe/main/hipe_main.erl
+++ b/lib/hipe/main/hipe_main.erl
@@ -284,8 +284,9 @@ icode_ssa_type(IcodeSSA, MFA, Options, Servers) ->
false -> AnnIcode1
end,
AnnIcode3 = icode_range_analysis(AnnIcode2, MFA, Options, Servers),
- pp(AnnIcode3, MFA, icode, pp_range_icode, Options, Servers),
- hipe_icode_type:unannotate_cfg(AnnIcode3)
+ AnnIcode4 = icode_eliminate_safe_calls(AnnIcode3, Options),
+ pp(AnnIcode4, MFA, icode, pp_range_icode, Options, Servers),
+ hipe_icode_type:unannotate_cfg(AnnIcode4)
end.
icode_ssa_convert(IcodeCfg, Options) ->
@@ -295,7 +296,7 @@ icode_ssa_convert(IcodeCfg, Options) ->
icode_ssa_const_prop(IcodeSSA, Options) ->
case proplists:get_bool(icode_ssa_const_prop, Options) of
true ->
- ?option_time(Tmp=hipe_icode_ssa_const_prop:propagate(IcodeSSA),
+ Tmp = ?option_time(hipe_icode_ssa_const_prop:propagate(IcodeSSA),
"Icode SSA sparse conditional constant propagation", Options),
?option_time(hipe_icode_ssa:remove_dead_code(Tmp),
"Icode SSA dead code elimination pass 1", Options);
@@ -334,6 +335,15 @@ icode_range_analysis(IcodeSSA, MFA, Options, Servers) ->
IcodeSSA
end.
+icode_eliminate_safe_calls(IcodeSSA, Options) ->
+ case proplists:get_bool(icode_call_elim, Options) of
+ true ->
+ ?option_time(hipe_icode_call_elim:cfg(IcodeSSA),
+ "Icode SSA safe call elimination", Options);
+ false ->
+ IcodeSSA
+ end.
+
icode_ssa_dead_code_elimination(IcodeSSA, Options) ->
IcodeSSA1 = ?option_time(hipe_icode_ssa:remove_dead_code(IcodeSSA),
"Icode SSA dead code elimination pass 2",
diff --git a/lib/hipe/misc/Makefile b/lib/hipe/misc/Makefile
index 60d2861c62..72cfff21a8 100644
--- a/lib/hipe/misc/Makefile
+++ b/lib/hipe/misc/Makefile
@@ -69,7 +69,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars +warn_missing_spec +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/misc/hipe_consttab.erl b/lib/hipe/misc/hipe_consttab.erl
index f361edc79c..226b20fa46 100644
--- a/lib/hipe/misc/hipe_consttab.erl
+++ b/lib/hipe/misc/hipe_consttab.erl
@@ -87,7 +87,8 @@
% {NewTab, Lbl}
insert_sorted_block/4,
insert_block/3,
- %% insert_global_word/2,
+ insert_binary_const/3,
+ %% insert_global_word/2,
%% insert_global_block/4,
%% update_word/3, % update_word(ConstTab, Value) -> {NewTab, Lbl}
%% update_block/5,
@@ -196,6 +197,16 @@ insert_block({ConstTab, RefToLabels, NextLabel}, ElementType, InitList) ->
{ElementType,InitList}),
{insert_backrefs(NewTa, Id, ReferredLabels), Id}.
+%% @doc Inserts a binary constant literal into the const table.
+-spec insert_binary_const(hipe_consttab(), ct_alignment(), binary()) ->
+ {hipe_consttab(), hipe_constlbl()}.
+insert_binary_const(ConstTab, Alignment, Binary)
+ when (Alignment =:= 4 orelse Alignment =:= 8 orelse Alignment =:= 16
+ orelse Alignment =:= 32), is_binary(Binary),
+ size(Binary) rem Alignment =:= 0 ->
+ insert_const(ConstTab, block, Alignment, false,
+ {byte, binary_to_list(Binary)}).
+
%% @spec (ConstTab::hipe_consttab(), ElementType::element_type(),
%% InitList::block(), SortOrder) -> {hipe_consttab(), hipe_constlbl()}
diff --git a/lib/hipe/misc/hipe_consttab.hrl b/lib/hipe/misc/hipe_consttab.hrl
index d2dbbe509c..550da0455c 100644
--- a/lib/hipe/misc/hipe_consttab.hrl
+++ b/lib/hipe/misc/hipe_consttab.hrl
@@ -20,7 +20,7 @@
%%
%%-----------------------------------------------------------------------------
--type ct_alignment() :: 4 | 8.
+-type ct_alignment() :: 4 | 8 | 16 | 32.
-type hipe_constlbl() :: non_neg_integer().
-type hipe_consttab() :: {dict:dict(), [hipe_constlbl()], hipe_constlbl()}.
diff --git a/lib/hipe/opt/Makefile b/lib/hipe/opt/Makefile
index ec0d01b42e..684d6f45b4 100644
--- a/lib/hipe/opt/Makefile
+++ b/lib/hipe/opt/Makefile
@@ -64,7 +64,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec # +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars +warn_missing_spec # +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/ppc/Makefile b/lib/hipe/ppc/Makefile
index 576c089f15..1901dfa671 100644
--- a/lib/hipe/ppc/Makefile
+++ b/lib/hipe/ppc/Makefile
@@ -76,7 +76,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/regalloc/Makefile b/lib/hipe/regalloc/Makefile
index 2b94f5ecfe..aaa4418f37 100644
--- a/lib/hipe/regalloc/Makefile
+++ b/lib/hipe/regalloc/Makefile
@@ -77,7 +77,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars# +warn_missing_spec +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars #+warn_missing_spec +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
index e0ff225a25..b4cdf8b1f2 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
@@ -75,7 +75,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
include ../native.mk
-ERL_COMPILE_FLAGS += -Werror +inline +warn_unused_import +warn_exported_vars
+ERL_COMPILE_FLAGS += -Werror +inline +warn_unused_import +warn_export_vars
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/rtl/hipe_rtl.erl b/lib/hipe/rtl/hipe_rtl.erl
index 1d627ed024..0726827299 100644
--- a/lib/hipe/rtl/hipe_rtl.erl
+++ b/lib/hipe/rtl/hipe_rtl.erl
@@ -366,7 +366,7 @@
-export([subst_uses_llvm/2]).
--export_type([alub_cond/0]).
+-export_type([alub_cond/0, rtl/0]).
%%
%% RTL
@@ -384,6 +384,7 @@
label_range, %% {Min,Max} First and last name used for labels
info=[] %% A keylist with arbitrary information.
}).
+-opaque rtl() :: #rtl{}.
mk_rtl(Fun, ArgList, Closure, Leaf, Code, Data, VarRange, LabelRange) ->
#rtl{'fun'=Fun, arglist=ArgList, code=Code,
@@ -414,7 +415,9 @@ rtl_info_update(Rtl, Info) -> Rtl#rtl{info=Info}.
%% move
%%
-mk_move(Dst, Src) -> false = is_fpreg(Dst), false = is_fpreg(Src), #move{dst=Dst, src=Src}.
+mk_move(Dst, Src) ->
+ false = is_fpreg(Dst), false = is_fpreg(Src),
+ #move{dst=Dst, src=Src}.
move_dst(#move{dst=Dst}) -> Dst.
move_dst_update(M, NewDst) -> false = is_fpreg(NewDst), M#move{dst=NewDst}.
move_src(#move{src=Src}) -> Src.
diff --git a/lib/hipe/rtl/hipe_rtl_arith.inc b/lib/hipe/rtl/hipe_rtl_arith.inc
index 645bc83f9f..0c396c8e76 100644
--- a/lib/hipe/rtl/hipe_rtl_arith.inc
+++ b/lib/hipe/rtl/hipe_rtl_arith.inc
@@ -47,73 +47,80 @@ eval_alu(Op, Arg1, Arg2)
Res = (Arg1 - Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
- V = (Sign1 and (not Sign2) and (not N))
+ V = (Sign1 andalso (not Sign2) andalso (not N))
or
- ((not Sign1) and Sign2 and N),
- C = ((not Sign1) and Sign2)
+ ((not Sign1) andalso Sign2 andalso N),
+ C = ((not Sign1) andalso Sign2)
or
- (N and ((not Sign1) or Sign2));
+ (N andalso ((not Sign1) orelse Sign2)),
+ {Res, N, Z, V, C};
'add' ->
Res = (Arg1 + Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
- V = (Sign1 and Sign2 and (not N))
+ V = (Sign1 andalso Sign2 andalso (not N))
or
- ((not Sign1) and (not Sign2) and N),
- C = (Sign1 and Sign2)
+ ((not Sign1) andalso (not Sign2) andalso N),
+ C = (Sign1 andalso Sign2)
or
- ((not N) and (Sign1 or Sign2));
+ ((not N) andalso (Sign1 orelse Sign2)),
+ {Res, N, Z, V, C};
'mul' ->
FullRes = Arg1 * Arg2,
Res = FullRes band ?WORDMASK,
ResHi = FullRes bsr ?BITS,
N = sign_bit(Res),
Z = zero(Res),
- V = (N and (ResHi =/= -1)) or ((not N) and (ResHi =/= 0)),
- C = V;
+ V = (N andalso (ResHi =/= -1)) orelse ((not N) andalso (ResHi =/= 0)),
+ C = V,
+ {Res, N, Z, V, C};
'sra' ->
Res = (Arg1 bsr Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
V = 0,
- C = 0;
+ C = 0,
+ {Res, N, Z, V, C};
'srl' ->
Res = (Arg1 bsr Arg2) band shiftmask(Arg2),
N = sign_bit(Res),
Z = zero(Res),
V = 0,
- C = 0;
+ C = 0,
+ {Res, N, Z, V, C};
'sll' ->
Res = (Arg1 bsl Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
V = 0,
- C = 0;
+ C = 0,
+ {Res, N, Z, V, C};
'or' ->
Res = (Arg1 bor Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
V = 0,
- C = 0;
+ C = 0,
+ {Res, N, Z, V, C};
'and' ->
Res = (Arg1 band Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
V = 0,
- C = 0;
+ C = 0,
+ {Res, N, Z, V, C};
'xor' ->
Res = (Arg1 bxor Arg2) band ?WORDMASK,
N = sign_bit(Res),
Z = zero(Res),
V = 0,
- C = 0;
+ C = 0,
+ {Res, N, Z, V, C};
Op ->
- Res = N = Z = V = C = 0,
?EXIT({"unknown alu op", Op})
- end,
- {Res, N, Z, V, C};
+ end;
eval_alu(Op, Arg1, Arg2) ->
- ?EXIT({argument_overflow,Op,Arg1,Arg2}).
+ ?EXIT({argument_overflow, Op, Arg1, Arg2}).
%% Björn & Bjarni:
%% We need to be able to do evaluations based only on the bits, since
@@ -130,9 +137,9 @@ eval_cond_bits(Cond, N, Z, V, C) ->
'ne' ->
not Z;
'gt' ->
- not (Z or (N xor V));
+ not (Z orelse (N xor V));
'gtu' ->
- not (C or Z);
+ not (C orelse Z);
'ge' ->
not (N xor V);
'geu'->
@@ -142,9 +149,9 @@ eval_cond_bits(Cond, N, Z, V, C) ->
'ltu'->
C;
'le' ->
- Z or (N xor V);
+ Z orelse (N xor V);
'leu'->
- C or Z;
+ C orelse Z;
'overflow' ->
V;
'not_overflow' ->
diff --git a/lib/hipe/rtl/hipe_rtl_binary_construct.erl b/lib/hipe/rtl/hipe_rtl_binary_construct.erl
index 4403aa552f..367d76b24d 100644
--- a/lib/hipe/rtl/hipe_rtl_binary_construct.erl
+++ b/lib/hipe/rtl/hipe_rtl_binary_construct.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -19,25 +19,21 @@
%% %CopyrightEnd%
%%
%% ====================================================================
-%% Module : hipe_rtl_inline_bs_ops
+%% Module : hipe_rtl_binary_construct
%% Purpose :
%% Notes :
-%% History : * 2001-06-14 Erik Johansson ([email protected]): Created.
+%% History : Written mostly by Per Gustafsson
%% ====================================================================
%% Exports :
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-module(hipe_rtl_binary_construct).
+
-export([gen_rtl/7]).
--import(hipe_tagscheme, [set_field_from_term/3,
- get_field_from_term/3,
- set_field_from_pointer/3,
- get_field_from_pointer/3]).
-
--import(hipe_rtl_binary, [floorlog2/1,
- get_word_integer/4,
- make_size/4]).
+
+-import(hipe_rtl_binary, [get_word_integer/4]).
+
%%-------------------------------------------------------------------------
-include("../main/hipe.hrl").
@@ -50,7 +46,6 @@
-define(BYTE_SIZE, 8).
-define(MAX_BINSIZE, ((1 bsl ((hipe_rtl_arch:word_size()*?BYTE_SIZE)-3)) - 1)).
-
%% -------------------------------------------------------------------------
%% The code is generated as a list of lists, it will be flattened later.
%%
@@ -61,12 +56,12 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
{bs_put_string, String, SizeInBytes} ->
[NewOffset] = get_real(Dst),
[Base, Offset] = Args,
- put_string(NewOffset, ConstTab, String, SizeInBytes, Base, Offset,
+ put_string(NewOffset, ConstTab, String, SizeInBytes, Base, Offset,
TrueLblName);
- _ ->
- Code =
+ _ ->
+ Code =
case BsOP of
- {bs_init, Size, _Flags} ->
+ {bs_init, Size, _Flags} ->
[] = Args,
[Dst0, Base, Offset] = Dst,
case is_illegal_const(Size bsl 3) of
@@ -75,14 +70,14 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
false ->
const_init2(Size, Dst0, Base, Offset, TrueLblName)
end;
-
- {bs_init, _Flags} ->
+
+ {bs_init, _Flags} ->
[Size] = Args,
[Dst0, Base, Offset] = Dst,
- var_init2(Size, Dst0, Base, Offset, TrueLblName,
+ var_init2(Size, Dst0, Base, Offset, TrueLblName,
SystemLimitLblName, FalseLblName);
- {bs_init_bits, Size, _Flags} ->
+ {bs_init_bits, Size, _Flags} ->
[] = Args,
[Dst0, Base, Offset] = Dst,
case is_illegal_const(Size) of
@@ -91,19 +86,19 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
false ->
const_init_bits(Size, Dst0, Base, Offset, TrueLblName)
end;
-
- {bs_init_bits, _Flags} ->
+
+ {bs_init_bits, _Flags} ->
[Size] = Args,
[Dst0, Base, Offset] = Dst,
- var_init_bits(Size, Dst0, Base, Offset, TrueLblName,
+ var_init_bits(Size, Dst0, Base, Offset, TrueLblName,
SystemLimitLblName, FalseLblName);
-
+
{bs_put_binary_all, Unit, _Flags} ->
[Src, Base, Offset] = Args,
[NewOffset] = get_real(Dst),
put_binary_all(NewOffset, Src, Base, Offset, Unit,
TrueLblName, FalseLblName);
-
+
{bs_put_binary, Size, _Flags} ->
case is_illegal_const(Size) of
true ->
@@ -112,19 +107,19 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
[NewOffset] = get_real(Dst),
case Args of
[Src, Base, Offset] ->
- put_static_binary(NewOffset, Src, Size, Base, Offset,
+ put_static_binary(NewOffset, Src, Size, Base, Offset,
TrueLblName, FalseLblName);
[Src, Bits, Base, Offset] ->
- {SizeCode, SizeReg} = make_size(Size, Bits,
- SystemLimitLblName,
- FalseLblName),
- InCode = put_dynamic_binary(NewOffset, Src, SizeReg, Base,
+ {SizeCode, SizeReg} =
+ hipe_rtl_binary:make_size(Size, Bits, SystemLimitLblName,
+ FalseLblName),
+ InCode = put_dynamic_binary(NewOffset, Src, SizeReg, Base,
Offset, TrueLblName, FalseLblName),
SizeCode ++ InCode
end
end;
-
- {bs_put_float, Size, Flags, ConstInfo} ->
+
+ {bs_put_float, Size, Flags, ConstInfo} ->
[NewOffset] = get_real(Dst),
Aligned = aligned(Flags),
LittleEndian = littleendian(Flags),
@@ -134,106 +129,108 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
false ->
case Args of
[Src, Base, Offset] ->
- CCode = static_float_c_code(NewOffset, Src, Base, Offset, Size, Flags,
+ CCode = static_float_c_code(NewOffset, Src, Base, Offset, Size, Flags,
TrueLblName, FalseLblName),
- put_float(NewOffset, Src, Base, Offset, Size, CCode, Aligned,
+ put_float(NewOffset, Src, Base, Offset, Size, CCode, Aligned,
LittleEndian, ConstInfo, TrueLblName);
[Src, Bits, Base, Offset] ->
- {SizeCode, SizeReg} = make_size(Size, Bits,
- SystemLimitLblName,
- FalseLblName),
- InCode = float_c_code(NewOffset, Src, Base, Offset, SizeReg,
+ {SizeCode, SizeReg} =
+ hipe_rtl_binary:make_size(Size, Bits, SystemLimitLblName,
+ FalseLblName),
+ InCode = float_c_code(NewOffset, Src, Base, Offset, SizeReg,
Flags, TrueLblName, FalseLblName),
SizeCode ++ InCode
end
end;
- {bs_put_integer, Size, Flags, ConstInfo} ->
- Aligned = aligned(Flags),
+ {bs_put_integer, Size, Flags, ConstInfo} ->
+ Aligned = aligned(Flags),
LittleEndian = littleendian(Flags),
[NewOffset] = get_real(Dst),
case is_illegal_const(Size) of
true ->
[hipe_rtl:mk_goto(FalseLblName)];
false ->
- case ConstInfo of
+ case ConstInfo of
fail ->
[hipe_rtl:mk_goto(FalseLblName)];
- _ ->
- case Args of
- [Src, Base, Offset] ->
+ _ ->
+ case Args of
+ [Src, Base, Offset] ->
CCode = static_int_c_code(NewOffset, Src,
- Base, Offset, Size,
- Flags, TrueLblName,
+ Base, Offset, Size,
+ Flags, TrueLblName,
FalseLblName),
- put_static_int(NewOffset, Src, Base, Offset, Size,
- CCode, Aligned, LittleEndian, TrueLblName);
- [Src, Bits, Base, Offset] ->
- {SizeCode, SizeReg} = make_size(Size, Bits,
+ put_static_int(NewOffset, Src, Base, Offset, Size,
+ CCode, Aligned, LittleEndian, TrueLblName);
+ [Src, Bits, Base, Offset] ->
+ {SizeCode, SizeReg} =
+ hipe_rtl_binary:make_size(Size, Bits,
SystemLimitLblName,
FalseLblName),
CCode = int_c_code(NewOffset, Src, Base,
- Offset, SizeReg, Flags,
- TrueLblName, FalseLblName),
+ Offset, SizeReg, Flags,
+ TrueLblName, FalseLblName),
InCode =
- put_dynamic_int(NewOffset, Src, Base, Offset,
+ put_dynamic_int(NewOffset, Src, Base, Offset,
SizeReg, CCode, Aligned,
- LittleEndian, TrueLblName),
- SizeCode ++ InCode
- end
- end
+ LittleEndian, TrueLblName),
+ SizeCode ++ InCode
+ end
+ end
end;
-
- {unsafe_bs_put_integer, 0, _Flags, _ConstInfo} ->
- [NewOffset] = get_real(Dst),
+
+ {unsafe_bs_put_integer, 0, _Flags, _ConstInfo} ->
+ [NewOffset] = get_real(Dst),
case Args of
[_Src, _Base, Offset] ->
[hipe_rtl:mk_move(NewOffset,Offset),
- hipe_rtl:mk_goto(TrueLblName)];
- [_Src, _Bits, _Base, Offset] ->
+ hipe_rtl:mk_goto(TrueLblName)];
+ [_Src, _Bits, _Base, Offset] ->
[hipe_rtl:mk_move(NewOffset,Offset),
- hipe_rtl:mk_goto(TrueLblName)]
- end;
-
- {unsafe_bs_put_integer, Size, Flags, ConstInfo} ->
+ hipe_rtl:mk_goto(TrueLblName)]
+ end;
+
+ {unsafe_bs_put_integer, Size, Flags, ConstInfo} ->
case is_illegal_const(Size) of
true ->
[hipe_rtl:mk_goto(FalseLblName)];
false ->
Aligned = aligned(Flags),
- LittleEndian = littleendian(Flags),
- [NewOffset] = get_real(Dst),
- case ConstInfo of
+ LittleEndian = littleendian(Flags),
+ [NewOffset] = get_real(Dst),
+ case ConstInfo of
fail ->
- [hipe_rtl:mk_goto(FalseLblName)];
- _ ->
- case Args of
- [Src, Base, Offset] ->
+ [hipe_rtl:mk_goto(FalseLblName)];
+ _ ->
+ case Args of
+ [Src, Base, Offset] ->
CCode = static_int_c_code(NewOffset, Src,
- Base, Offset, Size,
- Flags, TrueLblName,
+ Base, Offset, Size,
+ Flags, TrueLblName,
FalseLblName),
- put_unsafe_static_int(NewOffset, Src, Base,
+ put_unsafe_static_int(NewOffset, Src, Base,
Offset, Size,
- CCode, Aligned, LittleEndian,
- TrueLblName);
- [Src, Bits, Base, Offset] ->
- {SizeCode, SizeReg} = make_size(Size, Bits,
- SystemLimitLblName,
- FalseLblName),
+ CCode, Aligned, LittleEndian,
+ TrueLblName);
+ [Src, Bits, Base, Offset] ->
+ {SizeCode, SizeReg} =
+ hipe_rtl_binary:make_size(Size, Bits,
+ SystemLimitLblName,
+ FalseLblName),
CCode = int_c_code(NewOffset, Src, Base,
- Offset, SizeReg, Flags,
- TrueLblName, FalseLblName),
+ Offset, SizeReg, Flags,
+ TrueLblName, FalseLblName),
InCode =
- put_unsafe_dynamic_int(NewOffset, Src, Base,
- Offset, SizeReg, CCode,
- Aligned, LittleEndian,
+ put_unsafe_dynamic_int(NewOffset, Src, Base,
+ Offset, SizeReg, CCode,
+ Aligned, LittleEndian,
TrueLblName),
- SizeCode ++ InCode
- end
+ SizeCode ++ InCode
+ end
end
- end;
-
+ end;
+
bs_utf8_size ->
case Dst of
[_DstVar] ->
@@ -276,13 +273,13 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
[hipe_rtl:mk_call([], bs_validate_unicode, Args,
TrueLblName, FalseLblName, not_remote)];
- bs_final ->
+ bs_final ->
Zero = hipe_rtl:mk_imm(0),
- [Src, Offset] = Args,
+ [Src, Offset] = Args,
[BitSize, ByteSize] = create_regs(2),
[ShortLbl, LongLbl] = create_lbls(2),
- case Dst of
- [DstVar] ->
+ case Dst of
+ [DstVar] ->
[hipe_rtl:mk_alub(BitSize, Offset, 'and', ?LOW_BITS, eq,
hipe_rtl:label_name(ShortLbl),
hipe_rtl:label_name(LongLbl)), ShortLbl,
@@ -292,11 +289,11 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
hipe_rtl:mk_alu(ByteSize, Offset, 'srl', ?BYTE_SHIFT),
hipe_tagscheme:mk_sub_binary(DstVar, ByteSize,
Zero, BitSize, Zero, Src),
- hipe_rtl:mk_goto(TrueLblName)];
+ hipe_rtl:mk_goto(TrueLblName)];
[] ->
- [hipe_rtl:mk_goto(TrueLblName)]
- end;
-
+ [hipe_rtl:mk_goto(TrueLblName)]
+ end;
+
bs_init_writable ->
Zero = hipe_rtl:mk_imm(0),
[Size] = Args,
@@ -306,29 +303,29 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
[hipe_rtl:mk_gctest(?PROC_BIN_WORDSIZE + ?SUB_BIN_WORDSIZE),
get_word_integer(Size, SizeReg, SystemLimitLblName, FalseLblName),
allocate_writable(DstVar, Base, SizeReg, Zero, Zero),
- hipe_rtl:mk_goto(TrueLblName)];
-
+ hipe_rtl:mk_goto(TrueLblName)];
+
{bs_private_append, _U, _F} ->
- [Size, Bin] = Args,
+ [Size, Bin] = Args,
[DstVar, Base, Offset] = Dst,
[ProcBin] = create_vars(1),
[SubSize, SizeReg, EndSubSize, EndSubBitSize] = create_regs(4),
SubBinSize = {sub_binary, binsize},
- [get_field_from_term({sub_binary, orig}, Bin, ProcBin),
- get_field_from_term(SubBinSize, Bin, SubSize),
+ [hipe_tagscheme:get_field_from_term({sub_binary, orig}, Bin, ProcBin),
+ hipe_tagscheme:get_field_from_term(SubBinSize, Bin, SubSize),
get_word_integer(Size, SizeReg, SystemLimitLblName, FalseLblName),
realloc_binary(SizeReg, ProcBin, Base),
calculate_sizes(Bin, SizeReg, Offset, EndSubSize, EndSubBitSize),
- set_field_from_term(SubBinSize, Bin, EndSubSize),
- set_field_from_term({sub_binary, bitsize}, Bin, EndSubBitSize),
+ hipe_tagscheme:set_field_from_term(SubBinSize, Bin, EndSubSize),
+ hipe_tagscheme:set_field_from_term({sub_binary, bitsize}, Bin, EndSubBitSize),
hipe_rtl:mk_move(DstVar, Bin),
hipe_rtl:mk_goto(TrueLblName)];
{bs_append, _U, _F, Unit, _Bla} ->
- [Size, Bin] = Args,
- [DstVar, Base, Offset] = Dst,
+ [Size, Bin] = Args,
+ [DstVar, Base, Offset] = Dst,
[ProcBin] = create_vars(1),
- [Flags, SizeReg, IsWritable, EndSubSize, EndSubBitSize] =
+ [Flags, SizeReg, IsWritable, EndSubSize, EndSubBitSize] =
create_regs(5),
[ContLbl,ContLbl2,ContLbl3,ContLbl4,WritableLbl,NotWritableLbl] =
Lbls = create_lbls(6),
@@ -339,24 +336,24 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
SubIsWritable = {sub_binary, is_writable},
[hipe_rtl:mk_gctest(?SUB_BIN_WORDSIZE + ?PROC_BIN_WORDSIZE),
get_word_integer(Size, SizeReg, SystemLimitLblName, FalseLblName),
- hipe_tagscheme:test_bitstr(Bin, ContLblName, FalseLblName, 0.99),
- ContLbl,
- hipe_tagscheme:test_subbinary(Bin,ContLbl2Name, NotWritable),
+ hipe_tagscheme:test_bitstr(Bin, ContLblName, FalseLblName, 0.99),
+ ContLbl,
+ hipe_tagscheme:test_subbinary(Bin,ContLbl2Name, NotWritable),
ContLbl2,
- get_field_from_term(SubIsWritable, Bin, IsWritable),
+ hipe_tagscheme:get_field_from_term(SubIsWritable, Bin, IsWritable),
hipe_rtl:mk_branch(IsWritable, 'ne', Zero,
ContLbl3Name, NotWritable),
ContLbl3,
- get_field_from_term({sub_binary, orig}, Bin, ProcBin),
- get_field_from_term({proc_bin, flags}, ProcBin, Flags),
+ hipe_tagscheme:get_field_from_term({sub_binary, orig}, Bin, ProcBin),
+ hipe_tagscheme:get_field_from_term({proc_bin, flags}, ProcBin, Flags),
hipe_rtl:mk_alub(Flags, Flags, 'and',
- hipe_rtl:mk_imm(?PB_IS_WRITABLE),
+ hipe_rtl:mk_imm(?PB_IS_WRITABLE),
eq, NotWritable, ContLbl4Name, 0.01),
ContLbl4,
calculate_sizes(Bin, SizeReg, Offset, EndSubSize, EndSubBitSize),
is_divisible(Offset, Unit, Writable, FalseLblName),
WritableLbl,
- set_field_from_term(SubIsWritable, Bin, Zero),
+ hipe_tagscheme:set_field_from_term(SubIsWritable, Bin, Zero),
realloc_binary(SizeReg, ProcBin, Base),
hipe_tagscheme:mk_sub_binary(DstVar, EndSubSize, Zero,
EndSubBitSize, Zero,
@@ -394,7 +391,7 @@ not_writable_code(Bin, SizeReg, Dst, Base, Offset, Unit,
allocate_writable(Dst, Base, UsedBytes, TotBytes, TotSize),
put_binary_all(Offset, Bin, Base, hipe_rtl:mk_imm(0), Unit,
TrueLblName, FalseLblName)].
-
+
allocate_writable(Dst, Base, UsedBytes, TotBytes, TotSize) ->
Zero = hipe_rtl:mk_imm(0),
[NextLbl] = create_lbls(1),
@@ -411,7 +408,7 @@ allocate_writable(Dst, Base, UsedBytes, TotBytes, TotSize) ->
hipe_tagscheme:mk_sub_binary(Dst, EndSubSize, Zero, EndSubBitSize,
Zero, hipe_rtl:mk_imm(1), ProcBin)].
-realloc_binary(SizeReg, ProcBin, Base) ->
+realloc_binary(SizeReg, ProcBin, Base) ->
[NoReallocLbl, ReallocLbl, NextLbl, ContLbl] = Lbls = create_lbls(4),
[NoReallocLblName, ReallocLblName, NextLblName, ContLblName] =
[hipe_rtl:label_name(Lbl) || Lbl <- Lbls],
@@ -422,36 +419,36 @@ realloc_binary(SizeReg, ProcBin, Base) ->
ProcBinValTag = {proc_bin, val},
ProcBinBytesTag = {proc_bin, bytes},
BinOrigSizeTag = {binary, orig_size},
- [get_field_from_term(ProcBinSizeTag, ProcBin, PBSize),
+ [hipe_tagscheme:get_field_from_term(ProcBinSizeTag, ProcBin, PBSize),
hipe_rtl:mk_alu(Tmp, SizeReg, 'add', ?LOW_BITS),
hipe_rtl:mk_alu(ByteSize, Tmp, 'srl', ?BYTE_SHIFT),
hipe_rtl:mk_alu(ResultingSize, ByteSize, 'add', PBSize),
- set_field_from_term(ProcBinSizeTag, ProcBin, ResultingSize),
- get_field_from_term(ProcBinFlagsTag, ProcBin, Flags),
+ hipe_tagscheme:set_field_from_term(ProcBinSizeTag, ProcBin, ResultingSize),
+ hipe_tagscheme:get_field_from_term(ProcBinFlagsTag, ProcBin, Flags),
hipe_rtl:mk_alu(Flags, Flags, 'or', hipe_rtl:mk_imm(?PB_ACTIVE_WRITER)),
- set_field_from_term(ProcBinFlagsTag, ProcBin, Flags),
- get_field_from_term(ProcBinValTag, ProcBin, BinPointer),
- get_field_from_pointer(BinOrigSizeTag, BinPointer, OrigSize),
+ hipe_tagscheme:set_field_from_term(ProcBinFlagsTag, ProcBin, Flags),
+ hipe_tagscheme:get_field_from_term(ProcBinValTag, ProcBin, BinPointer),
+ hipe_tagscheme:get_field_from_pointer(BinOrigSizeTag, BinPointer, OrigSize),
hipe_rtl:mk_branch(OrigSize, 'ltu', ResultingSize,
ReallocLblName, NoReallocLblName),
NoReallocLbl,
- get_field_from_term(ProcBinBytesTag, ProcBin, Base),
+ hipe_tagscheme:get_field_from_term(ProcBinBytesTag, ProcBin, Base),
hipe_rtl:mk_goto(ContLblName),
ReallocLbl,
hipe_rtl:mk_alu(NewSize, ResultingSize, 'sll', hipe_rtl:mk_imm(1)),
- hipe_rtl:mk_call([BinPointer], bs_reallocate, [BinPointer, NewSize],
+ hipe_rtl:mk_call([BinPointer], bs_reallocate, [BinPointer, NewSize],
NextLblName, [], not_remote),
NextLbl,
- set_field_from_pointer(BinOrigSizeTag, BinPointer, NewSize),
- set_field_from_term(ProcBinValTag, ProcBin, BinPointer),
+ hipe_tagscheme:set_field_from_pointer(BinOrigSizeTag, BinPointer, NewSize),
+ hipe_tagscheme:set_field_from_term(ProcBinValTag, ProcBin, BinPointer),
hipe_tagscheme:extract_binary_bytes(BinPointer, Base),
- set_field_from_term(ProcBinBytesTag, ProcBin, Base),
+ hipe_tagscheme:set_field_from_term(ProcBinBytesTag, ProcBin, Base),
ContLbl].
calculate_sizes(Bin, SizeReg, Offset, EndSubSize, EndSubBitSize) ->
[SubSize, SubBitSize, EndSize] = create_regs(3),
- [get_field_from_term({sub_binary, binsize}, Bin, SubSize),
- get_field_from_term({sub_binary, bitsize}, Bin, SubBitSize),
+ [hipe_tagscheme:get_field_from_term({sub_binary, binsize}, Bin, SubSize),
+ hipe_tagscheme:get_field_from_term({sub_binary, bitsize}, Bin, SubBitSize),
hipe_rtl:mk_alu(Offset, SubSize, 'sll', ?BYTE_SHIFT),
hipe_rtl:mk_alu(Offset, Offset, 'add', SubBitSize),
hipe_rtl:mk_alu(EndSize, Offset, 'add', SizeReg),
@@ -492,7 +489,7 @@ static_int_c_code(NewOffset, Src, Base, Offset, Size, Flags,
int_c_code(NewOffset, Src, Base, Offset, SizeReg, Flags,
TrueLblName, FalseLblName) ->
- put_c_code(bs_put_big_integer, NewOffset, Src, Base, Offset, SizeReg,
+ put_c_code(bs_put_big_integer, NewOffset, Src, Base, Offset, SizeReg,
Flags, TrueLblName, FalseLblName).
binary_c_code(NewOffset, Src, Base, Offset, Size, TrueLblName) ->
@@ -500,8 +497,8 @@ binary_c_code(NewOffset, Src, Base, Offset, Size, TrueLblName) ->
[SizeReg, FlagsReg] = create_regs(2),
[hipe_rtl:mk_move(FlagsReg, hipe_rtl:mk_imm(0)),
hipe_rtl:mk_move(SizeReg, Size),
- hipe_rtl:mk_call([], bs_put_bits, [Src, SizeReg, Base, Offset, FlagsReg],
- hipe_rtl:label_name(PassedLbl),[],not_remote),
+ hipe_rtl:mk_call([], bs_put_bits, [Src, SizeReg, Base, Offset, FlagsReg],
+ hipe_rtl:label_name(PassedLbl), [], not_remote),
PassedLbl,
hipe_rtl:mk_alu(NewOffset, Offset, add, SizeReg),
hipe_rtl:mk_goto(TrueLblName)].
@@ -511,7 +508,7 @@ put_c_code(Func, NewOffset, Src, Base, Offset, SizeReg, Flags,
PassedLbl = hipe_rtl:mk_new_label(),
[FlagsReg] = create_regs(1),
[hipe_rtl:mk_move(FlagsReg, hipe_rtl:mk_imm(Flags)),
- gen_test_sideffect_bs_call(Func, [Src, SizeReg, Base, Offset, FlagsReg],
+ gen_test_sideffect_bs_call(Func, [Src, SizeReg, Base, Offset, FlagsReg],
hipe_rtl:label_name(PassedLbl), FalseLblName),
PassedLbl,
hipe_rtl:mk_alu(NewOffset, Offset, add, SizeReg),
@@ -523,7 +520,7 @@ gen_test_sideffect_bs_call(Name, Args, TrueLblName, FalseLblName) ->
[hipe_rtl:mk_call([Tmp1], Name, Args,
hipe_rtl:label_name(RetLbl), [], not_remote),
RetLbl,
- hipe_rtl:mk_branch(Tmp1, eq, hipe_rtl:mk_imm(0),
+ hipe_rtl:mk_branch(Tmp1, eq, hipe_rtl:mk_imm(0),
FalseLblName, TrueLblName, 0.01)].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -544,7 +541,7 @@ create_unsafe_regs(0) ->
create_vars(X) when X > 0 ->
[hipe_rtl:mk_new_var()|create_vars(X-1)];
-create_vars(0) ->
+create_vars(0) ->
[].
create_lbls(X) when X > 0 ->
@@ -582,7 +579,7 @@ get_real(Dst) ->
%% The following functions are called from the translation switch:
%%
%% - put_string/7 creates code to copy a string to a binary
-%% starting at base+offset and ending at base+newoffset
+%% starting at base+offset and ending at base+newoffset
%%
%% - const_init2/6 initializes the creation of a binary of constant size
%%
@@ -609,10 +606,9 @@ put_string(NewOffset, ConstTab, String, SizeInBytes, Base, Offset, TLName) ->
[StringBase] = create_regs(1),
{NewTab, Lbl} = hipe_consttab:insert_block(ConstTab, byte, String),
{[hipe_rtl:mk_load_address(StringBase, Lbl, constant)|
- copy_string(StringBase, SizeInBytes, Base, Offset,
- NewOffset, TLName)],
+ copy_string(StringBase, SizeInBytes, Base, Offset, NewOffset, TLName)],
NewTab}.
-
+
const_init2(Size, Dst, Base, Offset, TrueLblName) ->
Log2WordSize = hipe_rtl_arch:log2_word_size(),
WordSize = hipe_rtl_arch:word_size(),
@@ -642,27 +638,29 @@ const_init_bits(Size, Dst, Base, Offset, TrueLblName) ->
TmpDst = hipe_rtl:mk_new_var(),
Zero = hipe_rtl:mk_imm(0),
{ExtraSpace, SubBinCode} =
- if (Size rem ?BYTE_SIZE) =:= 0 ->
- {0,[hipe_rtl:mk_move(Dst, TmpDst)]};
- true ->
+ case (Size rem ?BYTE_SIZE) =:= 0 of
+ true ->
+ {0, [hipe_rtl:mk_move(Dst, TmpDst)]};
+ false ->
{?SUB_BIN_WORDSIZE,
- hipe_tagscheme:mk_sub_binary(Dst, hipe_rtl:mk_imm(Size bsr 3), Zero,
+ hipe_tagscheme:mk_sub_binary(Dst, hipe_rtl:mk_imm(Size bsr 3), Zero,
hipe_rtl:mk_imm(Size band ?LOW_BITS_INT),
Zero, TmpDst)}
end,
BaseBinCode =
- if Size =< (?MAX_HEAP_BIN_SIZE * 8) ->
- ByteSize = (Size + 7) div 8,
- [hipe_rtl:mk_gctest(((ByteSize+ 3*WordSize-1) bsr Log2WordSize)+ ExtraSpace),
+ case Size =< (?MAX_HEAP_BIN_SIZE * 8) of
+ true ->
+ ByteSize = (Size + 7) div 8,
+ [hipe_rtl:mk_gctest(((ByteSize + 3*WordSize-1) bsr Log2WordSize) + ExtraSpace),
hipe_tagscheme:create_heap_binary(Base, ByteSize, TmpDst),
hipe_rtl:mk_move(Offset, Zero)];
- true ->
+ false ->
ByteSize = hipe_rtl:mk_new_reg(),
[hipe_rtl:mk_gctest(?PROC_BIN_WORDSIZE+ExtraSpace),
hipe_rtl:mk_move(Offset, Zero),
hipe_rtl:mk_move(ByteSize, hipe_rtl:mk_imm((Size+7) bsr 3)),
hipe_rtl:mk_call([Base], bs_allocate, [ByteSize],
- hipe_rtl:label_name(NextLbl),[],not_remote),
+ hipe_rtl:label_name(NextLbl), [], not_remote),
NextLbl,
hipe_tagscheme:create_refc_binary(Base, ByteSize, TmpDst)]
end,
@@ -671,12 +669,12 @@ const_init_bits(Size, Dst, Base, Offset, TrueLblName) ->
var_init2(Size, Dst, Base, Offset, TrueLblName, SystemLimitLblName, FalseLblName) ->
Log2WordSize = hipe_rtl_arch:log2_word_size(),
WordSize = hipe_rtl_arch:word_size(),
- [ContLbl,HeapLbl,REFCLbl,NextLbl] = create_lbls(4),
- [USize,Tmp] = create_unsafe_regs(2),
+ [ContLbl, HeapLbl, REFCLbl, NextLbl] = create_lbls(4),
+ [USize, Tmp] = create_unsafe_regs(2),
[get_word_integer(Size, USize, SystemLimitLblName, FalseLblName),
hipe_rtl:mk_branch(USize, leu, hipe_rtl:mk_imm(?MAX_BINSIZE),
- hipe_rtl:label_name(ContLbl),
- SystemLimitLblName),
+ hipe_rtl:label_name(ContLbl),
+ SystemLimitLblName),
ContLbl,
hipe_rtl:mk_move(Offset, hipe_rtl:mk_imm(0)),
hipe_rtl:mk_branch(USize, leu, hipe_rtl:mk_imm(?MAX_HEAP_BIN_SIZE),
@@ -698,20 +696,20 @@ var_init2(Size, Dst, Base, Offset, TrueLblName, SystemLimitLblName, FalseLblName
hipe_rtl:mk_goto(TrueLblName)].
var_init_bits(Size, Dst, Base, Offset, TrueLblName, SystemLimitLblName, FalseLblName) ->
- [HeapLbl,REFCLbl,NextLbl,NoSubLbl,SubLbl,
+ [HeapLbl, REFCLbl, NextLbl, NoSubLbl, SubLbl,
NoCreateSubBin, CreateSubBin, JoinLbl, JoinLbl2] = create_lbls(9),
- [USize,ByteSize,TotByteSize,OffsetBits] = create_regs(4),
+ [USize, ByteSize, TotByteSize, OffsetBits] = create_regs(4),
[TmpDst] = create_unsafe_regs(1),
Log2WordSize = hipe_rtl_arch:log2_word_size(),
WordSize = hipe_rtl_arch:word_size(),
- MaximumWords =
+ MaximumWords =
erlang:max((?MAX_HEAP_BIN_SIZE + 3*WordSize) bsr Log2WordSize,
?PROC_BIN_WORDSIZE) + ?SUB_BIN_WORDSIZE,
Zero = hipe_rtl:mk_imm(0),
[hipe_rtl:mk_gctest(MaximumWords),
get_word_integer(Size, USize, SystemLimitLblName, FalseLblName),
hipe_rtl:mk_alu(ByteSize, USize, srl, ?BYTE_SHIFT),
- hipe_rtl:mk_alub(OffsetBits, USize, 'and', ?LOW_BITS, eq,
+ hipe_rtl:mk_alub(OffsetBits, USize, 'and', ?LOW_BITS, eq,
hipe_rtl:label_name(NoSubLbl),
hipe_rtl:label_name(SubLbl)),
NoSubLbl,
@@ -721,20 +719,20 @@ var_init_bits(Size, Dst, Base, Offset, TrueLblName, SystemLimitLblName, FalseLbl
hipe_rtl:mk_alu(TotByteSize, ByteSize, 'add', hipe_rtl:mk_imm(1)),
JoinLbl,
hipe_rtl:mk_branch(TotByteSize, 'leu', hipe_rtl:mk_imm(?MAX_HEAP_BIN_SIZE),
- hipe_rtl:label_name(HeapLbl),
+ hipe_rtl:label_name(HeapLbl),
hipe_rtl:label_name(REFCLbl)),
HeapLbl,
hipe_tagscheme:create_heap_binary(Base, TotByteSize, TmpDst),
hipe_rtl:mk_goto(hipe_rtl:label_name(JoinLbl2)),
REFCLbl,
hipe_rtl:mk_call([Base], bs_allocate, [TotByteSize],
- hipe_rtl:label_name(NextLbl),[],not_remote),
+ hipe_rtl:label_name(NextLbl), [], not_remote),
NextLbl,
hipe_tagscheme:create_refc_binary(Base, TotByteSize, TmpDst),
JoinLbl2,
hipe_rtl:mk_move(Offset, Zero),
hipe_rtl:mk_branch(OffsetBits, 'eq', Zero,
- hipe_rtl:label_name(NoCreateSubBin),
+ hipe_rtl:label_name(NoCreateSubBin),
hipe_rtl:label_name(CreateSubBin)),
CreateSubBin,
hipe_tagscheme:mk_sub_binary(Dst, ByteSize, Zero, OffsetBits, Zero, TmpDst),
@@ -744,10 +742,10 @@ var_init_bits(Size, Dst, Base, Offset, TrueLblName, SystemLimitLblName, FalseLbl
hipe_rtl:mk_goto(TrueLblName)].
put_binary_all(NewOffset, Src, Base, Offset, Unit, TLName, FLName) ->
- [SrcBase,SrcOffset,NumBits] = create_regs(3),
+ [SrcBase, SrcOffset, NumBits] = create_regs(3),
[ContLbl] = create_lbls(1),
CCode = binary_c_code(NewOffset, Src, Base, Offset, NumBits, TLName),
- AlignedCode = copy_aligned_bytes(SrcBase, SrcOffset, NumBits, Base, Offset,
+ AlignedCode = copy_aligned_bytes(SrcBase, SrcOffset, NumBits, Base, Offset,
NewOffset, TLName),
[get_base_offset_size(Src, SrcBase, SrcOffset, NumBits,FLName),
is_divisible(NumBits, Unit, hipe_rtl:label_name(ContLbl), FLName),
@@ -755,11 +753,11 @@ put_binary_all(NewOffset, Src, Base, Offset, Unit, TLName, FLName) ->
|test_alignment(SrcOffset, NumBits, Offset, AlignedCode, CCode)].
test_alignment(SrcOffset, NumBits, Offset, AlignedCode, CCode) ->
- [Tmp] = create_regs(1),
- [AlignedLbl,CLbl] = create_lbls(2),
+ [Tmp] = create_regs(1),
+ [AlignedLbl, CLbl] = create_lbls(2),
[hipe_rtl:mk_alu(Tmp, SrcOffset, 'or', NumBits),
hipe_rtl:mk_alu(Tmp, Tmp, 'or', Offset),
- hipe_rtl:mk_alub(Tmp, Tmp, 'and', ?LOW_BITS, 'eq',
+ hipe_rtl:mk_alub(Tmp, Tmp, 'and', ?LOW_BITS, 'eq',
hipe_rtl:label_name(AlignedLbl),
hipe_rtl:label_name(CLbl)),
AlignedLbl,
@@ -768,12 +766,12 @@ test_alignment(SrcOffset, NumBits, Offset, AlignedCode, CCode) ->
CCode].
put_static_binary(NewOffset, Src, Size, Base, Offset, TLName, FLName) ->
- [SrcBase] = create_unsafe_regs(1),
+ [SrcBase] = create_unsafe_regs(1),
[SrcOffset, SrcSize] = create_regs(2),
case Size of
0 ->
get_base_offset_size(Src, SrcBase, SrcOffset, SrcSize, FLName) ++
- [hipe_rtl:mk_move(NewOffset, Offset),
+ [hipe_rtl:mk_move(NewOffset, Offset),
hipe_rtl:mk_goto(TLName)];
_ ->
SizeImm = hipe_rtl:mk_imm(Size),
@@ -789,13 +787,13 @@ put_dynamic_binary(NewOffset, Src, SizeReg, Base, Offset, TLName, FLName) ->
[SrcBase] = create_unsafe_regs(1),
[SrcOffset, SrcSize] = create_regs(2),
CCode = binary_c_code(NewOffset, Src, Base, Offset, SizeReg, TLName),
- AlignedCode = copy_aligned_bytes(SrcBase, SrcOffset, SizeReg, Base, Offset,
+ AlignedCode = copy_aligned_bytes(SrcBase, SrcOffset, SizeReg, Base, Offset,
NewOffset, TLName),
get_base_offset_size(Src, SrcBase, SrcOffset, SrcSize, FLName) ++
small_check(SizeReg, SrcSize, FLName) ++
test_alignment(SrcOffset, SizeReg, Offset, AlignedCode, CCode).
-put_float(NewOffset, Src, Base, Offset, 64, CCode, Aligned, LittleEndian,
+put_float(NewOffset, Src, Base, Offset, 64, CCode, Aligned, LittleEndian,
ConstInfo, TrueLblName) ->
[CLbl] = create_lbls(1),
case {Aligned, LittleEndian} of
@@ -829,12 +827,12 @@ put_static_int(NewOffset, Src, Base, Offset, Size, CCode, Aligned,
{false, true} ->
CCode;
{false, false} ->
- Init ++
+ Init ++
copy_offset_int_big(Base, Offset, NewOffset, Size, UntaggedSrc) ++
End
end.
-put_unsafe_static_int(NewOffset, Src, Base, Offset, Size, CCode, Aligned,
+put_unsafe_static_int(NewOffset, Src, Base, Offset, Size, CCode, Aligned,
LittleEndian, TrueLblName) ->
{Init, End, UntaggedSrc} = make_init_end(Src, TrueLblName),
case {Aligned, LittleEndian} of
@@ -849,7 +847,7 @@ put_unsafe_static_int(NewOffset, Src, Base, Offset, Size, CCode, Aligned,
{false, true} ->
CCode;
{false, false} ->
- Init ++
+ Init ++
copy_offset_int_big(Base, Offset, NewOffset, Size, UntaggedSrc) ++
End
end.
@@ -861,7 +859,7 @@ put_dynamic_int(NewOffset, Src, Base, Offset, SizeReg, CCode, Aligned,
true ->
case LittleEndian of
true ->
- Init ++
+ Init ++
copy_int_little(Base, Offset, NewOffset, SizeReg, UntaggedSrc) ++
End;
false ->
@@ -880,7 +878,7 @@ put_unsafe_dynamic_int(NewOffset, Src, Base, Offset, SizeReg, CCode, Aligned,
true ->
case LittleEndian of
true ->
- Init ++
+ Init ++
copy_int_little(Base, Offset, NewOffset, SizeReg, UntaggedSrc) ++
End;
false ->
@@ -891,7 +889,7 @@ put_unsafe_dynamic_int(NewOffset, Src, Base, Offset, SizeReg, CCode, Aligned,
false ->
CCode
end.
-
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
@@ -902,7 +900,7 @@ put_unsafe_dynamic_int(NewOffset, Src, Base, Offset, SizeReg, CCode, Aligned,
make_init_end(Src, CCode, TrueLblName) ->
[CLbl, SuccessLbl] = create_lbls(2),
[UntaggedSrc] = create_regs(1),
- Init = [hipe_tagscheme:test_fixnum(Src, hipe_rtl:label_name(SuccessLbl),
+ Init = [hipe_tagscheme:test_fixnum(Src, hipe_rtl:label_name(SuccessLbl),
hipe_rtl:label_name(CLbl), 0.99),
SuccessLbl,
hipe_tagscheme:untag_fixnum(UntaggedSrc,Src)],
@@ -915,28 +913,28 @@ make_init_end(Src, TrueLblName) ->
End = [hipe_rtl:mk_goto(TrueLblName)],
{Init, End, UntaggedSrc}.
-get_base_offset_size(Binary, SrcBase, SrcOffset, SrcSize, FLName) ->
+get_base_offset_size(Binary, SrcBase, SrcOffset, SrcSize, FLName) ->
[JoinLbl, EndLbl, SuccessLbl, SubLbl, OtherLbl, HeapLbl, REFCLbl] =
Lbls = create_lbls(7),
- [JoinLblName, EndLblName, SuccessLblName, SubLblName,
+ [JoinLblName, EndLblName, SuccessLblName, SubLblName,
OtherLblName, HeapLblName, REFCLblName] = get_label_names(Lbls),
- [BitSize,BitOffset] = create_regs(2),
+ [BitSize, BitOffset] = create_regs(2),
[Orig] = create_vars(1),
[hipe_tagscheme:test_bitstr(Binary, SuccessLblName, FLName, 0.99),
SuccessLbl,
- get_field_from_term({sub_binary,binsize}, Binary, SrcSize),
+ hipe_tagscheme:get_field_from_term({sub_binary,binsize}, Binary, SrcSize),
hipe_rtl:mk_alu(SrcSize, SrcSize, sll, ?BYTE_SHIFT),
hipe_tagscheme:test_subbinary(Binary, SubLblName, OtherLblName),
SubLbl,
- get_field_from_term({sub_binary,bitsize}, Binary, BitSize),
- get_field_from_term({sub_binary,offset}, Binary, SrcOffset),
+ hipe_tagscheme:get_field_from_term({sub_binary,bitsize}, Binary, BitSize),
+ hipe_tagscheme:get_field_from_term({sub_binary,offset}, Binary, SrcOffset),
hipe_rtl:mk_alu(SrcSize, SrcSize, add, BitSize),
- get_field_from_term({sub_binary,bitoffset}, Binary, BitOffset),
+ hipe_tagscheme:get_field_from_term({sub_binary,bitoffset}, Binary, BitOffset),
hipe_rtl:mk_alu(SrcOffset, SrcOffset, sll, ?BYTE_SHIFT),
hipe_rtl:mk_alu(SrcOffset, SrcOffset, add, BitOffset),
- get_field_from_term({sub_binary,orig}, Binary, Orig),
+ hipe_tagscheme:get_field_from_term({sub_binary,orig}, Binary, Orig),
hipe_rtl:mk_goto(JoinLblName),
- OtherLbl,
+ OtherLbl,
hipe_rtl:mk_move(SrcOffset, hipe_rtl:mk_imm(0)),
hipe_rtl:mk_move(Orig, Binary),
JoinLbl,
@@ -945,29 +943,29 @@ get_base_offset_size(Binary, SrcBase, SrcOffset, SrcSize, FLName) ->
hipe_rtl:mk_alu(SrcBase, Orig, add, hipe_rtl:mk_imm(?HEAP_BIN_DATA-2)),
hipe_rtl:mk_goto(EndLblName),
REFCLbl,
- get_field_from_term({proc_bin,bytes}, Orig, SrcBase),
+ hipe_tagscheme:get_field_from_term({proc_bin,bytes}, Orig, SrcBase),
EndLbl].
copy_aligned_bytes(CopyBase, CopyOffset, Size, Base, Offset, NewOffset, TrueLblName) ->
[BaseDst, BaseSrc] = create_unsafe_regs(2),
[Iter, Extra, BothOffset] = create_regs(3),
initializations(BaseSrc, BaseDst, BothOffset, CopyOffset, Offset, CopyBase, Base) ++
- [hipe_rtl:mk_alu(Extra, Size, 'and', ?LOW_BITS),
- hipe_rtl:mk_alu(Iter, Size, srl, ?BYTE_SHIFT),
+ [hipe_rtl:mk_alu(Extra, Size, 'and', ?LOW_BITS),
+ hipe_rtl:mk_alu(Iter, Size, srl, ?BYTE_SHIFT),
hipe_rtl:mk_alu(NewOffset, Offset, 'add', Size)] ++
easy_loop(BaseSrc, BaseDst, BothOffset, Iter, Extra, TrueLblName).
copy_string(StringBase, StringSize, BinBase, BinOffset, NewOffset, TrueLblName) ->
[TmpOffset,BothOffset,InitOffs] = create_regs(3),
[NewBinBase] = create_unsafe_regs(1),
- [EasyLbl,HardLbl] = create_lbls(2),
+ [EasyLbl, HardLbl] = create_lbls(2),
[hipe_rtl:mk_alu(TmpOffset, BinOffset, srl, ?BYTE_SHIFT),
hipe_rtl:mk_alu(NewBinBase, BinBase, add, TmpOffset),
hipe_rtl:mk_move(BothOffset, hipe_rtl:mk_imm(0)),
hipe_rtl:mk_alub(InitOffs, BinOffset, 'and', ?LOW_BITS, eq,
hipe_rtl:label_name(EasyLbl), hipe_rtl:label_name(HardLbl)),
EasyLbl,
- hipe_rtl:mk_alu(NewOffset, BinOffset, add,
+ hipe_rtl:mk_alu(NewOffset, BinOffset, add,
hipe_rtl:mk_imm(?bytes_to_bits(StringSize)))] ++
easy_loop(StringBase, NewBinBase, BothOffset,
hipe_rtl:mk_imm(StringSize), hipe_rtl:mk_imm(0), TrueLblName) ++
@@ -983,9 +981,9 @@ small_check(SizeVar, CopySize, FalseLblName) ->
hipe_rtl:label_name(SuccessLbl), FalseLblName),
SuccessLbl].
-easy_loop(BaseSrc, BaseDst, BothOffset, Iterations, Extra, TrueLblName) ->
- [Tmp1,Shift] = create_regs(2),
- [LoopLbl,TopLbl,EndLbl,ExtraLbl] = create_lbls(4),
+easy_loop(BaseSrc, BaseDst, BothOffset, Iterations, Extra, TrueLblName) ->
+ [Tmp1, Shift] = create_regs(2),
+ [LoopLbl, TopLbl, EndLbl, ExtraLbl] = create_lbls(4),
[TopLbl,
hipe_rtl:mk_branch(BothOffset, ne, Iterations, hipe_rtl:label_name(LoopLbl),
hipe_rtl:label_name(EndLbl), 0.99),
@@ -1005,17 +1003,17 @@ easy_loop(BaseSrc, BaseDst, BothOffset, Iterations, Extra, TrueLblName) ->
hipe_rtl:mk_store(BaseDst, BothOffset, Tmp1, byte),
hipe_rtl:mk_goto(TrueLblName)].
-hard_loop(BaseSrc, BaseDst, BothOffset, Iterations,
+hard_loop(BaseSrc, BaseDst, BothOffset, Iterations,
InitOffset, TrueLblName) ->
[Tmp1, Tmp2, OldByte, NewByte, SaveByte] = create_regs(5),
- [LoopLbl,EndLbl,TopLbl] = create_lbls(3),
+ [LoopLbl, EndLbl, TopLbl] = create_lbls(3),
[hipe_rtl:mk_load(OldByte, BaseDst, BothOffset, byte, unsigned),
- hipe_rtl:mk_alu(Tmp1, hipe_rtl:mk_imm(?BYTE_SIZE), sub, InitOffset),
+ hipe_rtl:mk_alu(Tmp1, hipe_rtl:mk_imm(?BYTE_SIZE), sub, InitOffset),
TopLbl,
- hipe_rtl:mk_branch(BothOffset, ne, Iterations,
- hipe_rtl:label_name(LoopLbl),
+ hipe_rtl:mk_branch(BothOffset, ne, Iterations,
+ hipe_rtl:label_name(LoopLbl),
hipe_rtl:label_name(EndLbl)),
- LoopLbl,
+ LoopLbl,
hipe_rtl:mk_load(NewByte, BaseSrc, BothOffset, byte, unsigned),
hipe_rtl:mk_alu(Tmp2, NewByte, srl, InitOffset),
hipe_rtl:mk_alu(SaveByte, OldByte, 'or', Tmp2),
@@ -1037,12 +1035,12 @@ initializations(BaseTmp1, BaseTmp2, BothOffset, CopyOffset, Offset, CopyBase, Ba
copy_int_little(Base, Offset, NewOffset, Size, Tmp1) when is_integer(Size) ->
[Tmp2,TmpOffset] = create_regs(2),
- ByteSize = Size div ?BYTE_SIZE,
- [hipe_rtl:mk_alu(TmpOffset, Offset, srl, ?BYTE_SHIFT),
- hipe_rtl:mk_alu(Tmp2, hipe_rtl:mk_imm(ByteSize), 'add', TmpOffset)] ++
-
+ ByteSize = Size div ?BYTE_SIZE,
+ [hipe_rtl:mk_alu(TmpOffset, Offset, srl, ?BYTE_SHIFT),
+ hipe_rtl:mk_alu(Tmp2, hipe_rtl:mk_imm(ByteSize), 'add', TmpOffset)] ++
+
little_loop(Tmp1, Tmp2, TmpOffset, Base) ++
-
+
case Size band 7 of
0 ->
[hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(Size))];
@@ -1051,18 +1049,16 @@ copy_int_little(Base, Offset, NewOffset, Size, Tmp1) when is_integer(Size) ->
hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(Size))]
end;
-
copy_int_little(Base, Offset, NewOffset, Size, Tmp1) ->
[Tmp2, Tmp3, Tmp4, TmpOffset] = create_regs(4),
-
[hipe_rtl:mk_alu(Tmp2, Size, srl, ?BYTE_SHIFT),
hipe_rtl:mk_alu(TmpOffset, Offset, srl, ?BYTE_SHIFT),
hipe_rtl:mk_alu(Tmp3, Tmp2, 'add', TmpOffset)] ++
-
+
little_loop(Tmp1, Tmp3, TmpOffset, Base) ++
-
+
[hipe_rtl:mk_alu(Tmp4, Size, 'and', ?LOW_BITS),
- hipe_rtl:mk_alu(Tmp4, hipe_rtl:mk_imm(?BYTE_SIZE), 'sub', Tmp4),
+ hipe_rtl:mk_alu(Tmp4, hipe_rtl:mk_imm(?BYTE_SIZE), 'sub', Tmp4),
hipe_rtl:mk_alu(Tmp1, Tmp1, sll, Tmp4),
hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
hipe_rtl:mk_alu(NewOffset, Offset, 'add', Size)].
@@ -1097,37 +1093,37 @@ copy_int_big(_Base, Offset, NewOffset, 0, _Tmp1) ->
[hipe_rtl:mk_move(NewOffset, Offset)];
copy_int_big(Base, Offset, NewOffset, ?BYTE_SIZE, Tmp1) ->
TmpOffset = hipe_rtl:mk_new_reg(),
- [hipe_rtl:mk_alu(TmpOffset, Offset, 'srl', hipe_rtl:mk_imm(3)),
- hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
- hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(8))];
+ [hipe_rtl:mk_alu(TmpOffset, Offset, 'srl', hipe_rtl:mk_imm(3)),
+ hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
+ hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(8))];
copy_int_big(Base, Offset, NewOffset, 2*?BYTE_SIZE, Tmp1) ->
TmpOffset = hipe_rtl:mk_new_reg(),
- [hipe_rtl:mk_alu(TmpOffset, Offset, 'srl', hipe_rtl:mk_imm(3)),
- hipe_rtl:mk_alu(TmpOffset, TmpOffset, 'add', hipe_rtl:mk_imm(1)),
- hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
- hipe_rtl:mk_alu(TmpOffset, TmpOffset, sub, hipe_rtl:mk_imm(1)),
- hipe_rtl:mk_alu(Tmp1, Tmp1, 'sra', hipe_rtl:mk_imm(8)),
- hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
- hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(16))];
+ [hipe_rtl:mk_alu(TmpOffset, Offset, 'srl', hipe_rtl:mk_imm(3)),
+ hipe_rtl:mk_alu(TmpOffset, TmpOffset, 'add', hipe_rtl:mk_imm(1)),
+ hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
+ hipe_rtl:mk_alu(TmpOffset, TmpOffset, sub, hipe_rtl:mk_imm(1)),
+ hipe_rtl:mk_alu(Tmp1, Tmp1, 'sra', hipe_rtl:mk_imm(8)),
+ hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
+ hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(16))];
copy_int_big(Base, Offset, NewOffset, 3*?BYTE_SIZE, Tmp1) ->
- TmpOffset = hipe_rtl:mk_new_reg(),
- [hipe_rtl:mk_alu(TmpOffset, Offset, srl, hipe_rtl:mk_imm(3)),
- hipe_rtl:mk_alu(TmpOffset, TmpOffset, add, hipe_rtl:mk_imm(2)),
- hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
- hipe_rtl:mk_alu(TmpOffset, TmpOffset, sub, hipe_rtl:mk_imm(1)),
- hipe_rtl:mk_alu(Tmp1, Tmp1, sra, hipe_rtl:mk_imm(8)),
- hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
- hipe_rtl:mk_alu(TmpOffset, TmpOffset, sub, hipe_rtl:mk_imm(1)),
- hipe_rtl:mk_alu(Tmp1, Tmp1, sra, hipe_rtl:mk_imm(8)),
- hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
- hipe_rtl:mk_alu(NewOffset, Offset, add, hipe_rtl:mk_imm(24))];
+ TmpOffset = hipe_rtl:mk_new_reg(),
+ [hipe_rtl:mk_alu(TmpOffset, Offset, srl, hipe_rtl:mk_imm(3)),
+ hipe_rtl:mk_alu(TmpOffset, TmpOffset, add, hipe_rtl:mk_imm(2)),
+ hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
+ hipe_rtl:mk_alu(TmpOffset, TmpOffset, sub, hipe_rtl:mk_imm(1)),
+ hipe_rtl:mk_alu(Tmp1, Tmp1, sra, hipe_rtl:mk_imm(8)),
+ hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
+ hipe_rtl:mk_alu(TmpOffset, TmpOffset, sub, hipe_rtl:mk_imm(1)),
+ hipe_rtl:mk_alu(Tmp1, Tmp1, sra, hipe_rtl:mk_imm(8)),
+ hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
+ hipe_rtl:mk_alu(NewOffset, Offset, add, hipe_rtl:mk_imm(24))];
copy_int_big(Base, Offset,NewOffset, 4*?BYTE_SIZE, Tmp1) ->
copy_big_word(Base, Offset, NewOffset, Tmp1);
copy_int_big(Base, Offset, NewOffset, Size, Tmp1) when is_integer(Size) ->
[OldOffset, TmpOffset, Bits] = create_regs(3),
ByteSize = (Size + 7) div ?BYTE_SIZE,
- case Size band 7 of
- 0 ->
+ case Size band 7 of
+ 0 ->
[hipe_rtl:mk_alu(OldOffset, Offset, sra, hipe_rtl:mk_imm(3)),
hipe_rtl:mk_alu(TmpOffset, OldOffset, add, hipe_rtl:mk_imm(ByteSize))];
Rest ->
@@ -1138,7 +1134,7 @@ copy_int_big(Base, Offset, NewOffset, Size, Tmp1) when is_integer(Size) ->
hipe_rtl:mk_alu(Tmp1, Tmp1, sra, hipe_rtl:mk_imm(Rest))]
end ++
big_loop(Tmp1, OldOffset, TmpOffset, Base) ++
- [hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(Size))];
+ [hipe_rtl:mk_alu(NewOffset, Offset, 'add', hipe_rtl:mk_imm(Size))];
copy_int_big(Base, Offset, NewOffset, Size, Tmp1) ->
Tmp2 = hipe_rtl:mk_new_reg(),
Tmp3 = hipe_rtl:mk_new_reg(),
@@ -1151,7 +1147,7 @@ copy_int_big(Base, Offset, NewOffset, Size, Tmp1) ->
[hipe_rtl:mk_alu(Tmp2, Size, 'srl', hipe_rtl:mk_imm(3)),
hipe_rtl:mk_alu(Tmp3, Offset, 'srl', hipe_rtl:mk_imm(3)),
hipe_rtl:mk_alu(TmpOffset, Tmp2, 'add', Tmp3),
- hipe_rtl:mk_alub(Tmp4, Size, 'and', hipe_rtl:mk_imm(7), 'eq',
+ hipe_rtl:mk_alub(Tmp4, Size, 'and', hipe_rtl:mk_imm(7), 'eq',
hipe_rtl:label_name(EvenLbl), hipe_rtl:label_name(OddLbl)),
OddLbl,
hipe_rtl:mk_alu(Tmp6, hipe_rtl:mk_imm(8), 'sub', Tmp4),
@@ -1159,9 +1155,7 @@ copy_int_big(Base, Offset, NewOffset, Size, Tmp1) ->
hipe_rtl:mk_store(Base, TmpOffset, Tmp5, byte),
EvenLbl,
hipe_rtl:mk_alu(Tmp1, Tmp1, srl, Tmp4)] ++
-
big_loop(Tmp1, Tmp3, TmpOffset, Base) ++
-
[hipe_rtl:mk_alu(NewOffset, Offset, 'add', Size)].
copy_big_word(Base, Offset, NewOffset, Word) ->
@@ -1224,8 +1218,8 @@ copy_offset_int_big(Base, Offset, NewOffset, Size, Tmp1)
hipe_rtl:mk_alu(Tmp6, Tmp6, 'and', ?LOW_BITS),
hipe_rtl:mk_alu(Tmp4, hipe_rtl:mk_imm(?BYTE_SIZE), 'sub', Tmp6),
hipe_rtl:mk_move(Tmp5, Tmp1),
- hipe_rtl:mk_alu(Tmp1, Tmp1, 'sll', Tmp6),
- hipe_rtl:mk_branch(TmpOffset, 'ne', Tmp3, hipe_rtl:label_name(NextLbl),
+ hipe_rtl:mk_alu(Tmp1, Tmp1, 'sll', Tmp6),
+ hipe_rtl:mk_branch(TmpOffset, 'ne', Tmp3, hipe_rtl:label_name(NextLbl),
hipe_rtl:label_name(EndLbl)),
NextLbl,
hipe_rtl:mk_store(Base, TmpOffset, Tmp1, byte),
@@ -1272,7 +1266,7 @@ copy_float_big(_Base, _Offset, _NewOffset, _Src, FalseLblName, _TrueLblName, fai
copy_float_big(Base, Offset, NewOffset, Src, _FalseLblName, TrueLblName,pass) ->
FloatLo = hipe_rtl:mk_new_reg(),
FloatHi = hipe_rtl:mk_new_reg(),
- TmpOffset =hipe_rtl:mk_new_reg(),
+ TmpOffset = hipe_rtl:mk_new_reg(),
hipe_tagscheme:unsafe_load_float(FloatLo, FloatHi, Src) ++
copy_big_word(Base, Offset, TmpOffset, FloatHi) ++
copy_big_word(Base, TmpOffset, NewOffset, FloatLo) ++
@@ -1285,7 +1279,7 @@ copy_float_big(Base, Offset, NewOffset, Src, FalseLblName, TrueLblName, var) ->
is_divisible(_Dividend, 1, SuccLbl, _FailLbl) ->
[hipe_rtl:mk_goto(SuccLbl)];
is_divisible(Dividend, Divisor, SuccLbl, FailLbl) ->
- Log2 = floorlog2(Divisor),
+ Log2 = hipe_rtl_binary:floorlog2(Divisor),
case Divisor =:= 1 bsl Log2 of
true -> %% Divisor is a power of 2
%% Test that the Log2-1 lowest bits are clear
diff --git a/lib/hipe/rtl/hipe_rtl_lcm.erl b/lib/hipe/rtl/hipe_rtl_lcm.erl
index ef866d0843..71bd06c0df 100644
--- a/lib/hipe/rtl/hipe_rtl_lcm.erl
+++ b/lib/hipe/rtl/hipe_rtl_lcm.erl
@@ -63,10 +63,10 @@ rtl_lcm(CFG, Options) ->
pp_debug("-------------------------------------------------~n",[]),
%% pp_debug( "~w~n", [MFA]),
-
+
%% A check if we should pretty print the result.
case proplists:get_bool(pp_rtl_lcm, Options) of
- true->
+ true ->
pp_debug("-------------------------------------------------~n",[]),
%% pp_debug("AllExpr: ~w~n", [AllExpr]),
pp_debug("AllExpr:~n", []),
@@ -76,21 +76,21 @@ rtl_lcm(CFG, Options) ->
_ ->
ok
end,
-
+
pp_debug("-------------------------------------------------~n",[]),
- ?option_time({CFG1, MoveSet} = perform_lcm(CFG, NodeInfo, EdgeInfo, ExprMap,
- IdMap, AllExpr, mk_edge_bb_map(),
+ {CFG1, MoveSet} = ?option_time(perform_lcm(CFG, NodeInfo, EdgeInfo, ExprMap,
+ IdMap, AllExpr, mk_edge_bb_map(),
?SETS:new(), Labels),
- "RTL LCM perform_lcm", Options),
+ "RTL LCM perform_lcm", Options),
%% Scan through list of moved expressions and replace their
%% assignments with the new temporary created for that expression
MoveList = ?SETS:to_list(MoveSet),
- ?option_time(CFG2 = moved_expr_replace_assignments(CFG1, ExprMap, IdMap,
+ CFG2 = ?option_time(moved_expr_replace_assignments(CFG1, ExprMap, IdMap,
MoveList),
- "RTL LCM moved_expr_replace_assignments", Options),
+ "RTL LCM moved_expr_replace_assignments", Options),
pp_debug("-------------------------------------------------~n~n",[]),
-
+
CFG2.
%%=============================================================================
@@ -466,10 +466,10 @@ expr_clear_dst(I) ->
%% easy access later.
lcm_precalc(CFG, Options) ->
%% Calculate use map and expression map.
- ?option_time({ExprMap, IdMap} = mk_expr_map(CFG),
- "RTL LCM mk_expr_map", Options),
- ?option_time(UseMap = mk_use_map(CFG, ExprMap),
- "RTL LCM mk_use_map", Options),
+ {ExprMap, IdMap} = ?option_time(mk_expr_map(CFG),
+ "RTL LCM mk_expr_map", Options),
+ UseMap = ?option_time(mk_use_map(CFG, ExprMap),
+ "RTL LCM mk_use_map", Options),
%% Labels = hipe_rtl_cfg:reverse_postorder(CFG),
Labels = hipe_rtl_cfg:labels(CFG),
%% StartLabel = hipe_rtl_cfg:start_label(CFG),
@@ -477,28 +477,28 @@ lcm_precalc(CFG, Options) ->
AllExpr = ?SETS:from_list(gb_trees:keys(IdMap)),
%% Calculate the data sets.
- ?option_time(NodeInfo0 = mk_node_info(Labels), "RTL LCM mk_node_info",
- Options),
+ NodeInfo0 = ?option_time(mk_node_info(Labels),
+ "RTL LCM mk_node_info", Options),
%% ?option_time(EdgeInfo0 = mk_edge_info(), "RTL LCM mk_edge_info",
%% Options),
EdgeInfo0 = mk_edge_info(),
- ?option_time(NodeInfo1 = calc_up_exp(CFG, ExprMap, NodeInfo0, Labels),
- "RTL LCM calc_up_exp", Options),
- ?option_time(NodeInfo2 = calc_down_exp(CFG, ExprMap, NodeInfo1, Labels),
- "RTL LCM calc_down_exp", Options),
- ?option_time(NodeInfo3 = calc_killed_expr(CFG, NodeInfo2, UseMap, AllExpr,
+ NodeInfo1 = ?option_time(calc_up_exp(CFG, ExprMap, NodeInfo0, Labels),
+ "RTL LCM calc_up_exp", Options),
+ NodeInfo2 = ?option_time(calc_down_exp(CFG, ExprMap, NodeInfo1, Labels),
+ "RTL LCM calc_down_exp", Options),
+ NodeInfo3 = ?option_time(calc_killed_expr(CFG, NodeInfo2, UseMap, AllExpr,
IdMap, Labels),
- "RTL LCM calc_killed_exp", Options),
- ?option_time(NodeInfo4 = calc_avail(CFG, NodeInfo3),
- "RTL LCM calc_avail", Options),
- ?option_time(NodeInfo5 = calc_antic(CFG, NodeInfo4, AllExpr),
- "RTL LCM calc_antic", Options),
- ?option_time(EdgeInfo1 = calc_earliest(CFG, NodeInfo5, EdgeInfo0, Labels),
- "RTL LCM calc_earliest", Options),
- ?option_time({NodeInfo6, EdgeInfo2} = calc_later(CFG, NodeInfo5, EdgeInfo1),
- "RTL LCM calc_later", Options),
- ?option_time(NodeInfo7 = calc_delete(CFG, NodeInfo6, Labels),
- "RTL LCM calc_delete", Options),
+ "RTL LCM calc_killed_exp", Options),
+ NodeInfo4 = ?option_time(calc_avail(CFG, NodeInfo3),
+ "RTL LCM calc_avail", Options),
+ NodeInfo5 = ?option_time(calc_antic(CFG, NodeInfo4, AllExpr),
+ "RTL LCM calc_antic", Options),
+ EdgeInfo1 = ?option_time(calc_earliest(CFG, NodeInfo5, EdgeInfo0, Labels),
+ "RTL LCM calc_earliest", Options),
+ {NodeInfo6, EdgeInfo2} = ?option_time(calc_later(CFG, NodeInfo5, EdgeInfo1),
+ "RTL LCM calc_later", Options),
+ NodeInfo7 = ?option_time(calc_delete(CFG, NodeInfo6, Labels),
+ "RTL LCM calc_delete", Options),
{NodeInfo7, EdgeInfo2, AllExpr, ExprMap, IdMap, Labels}.
%%%%%%%%%%%%%%%%%%% AVAILABLE IN/OUT FLOW ANALYSIS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -941,15 +941,16 @@ calc_insert_edge(NodeInfo, EdgeInfo, From, To) ->
calc_delete(_, NodeInfo, []) ->
NodeInfo;
calc_delete(CFG, NodeInfo, [Label|Labels]) ->
- case Label =:= hipe_rtl_cfg:start_label(CFG) of
- true ->
- NewNodeInfo = set_delete(NodeInfo, Label, ?SETS:new());
- false ->
- UpExp = up_exp(NodeInfo, Label),
- LaterIn = later_in(NodeInfo, Label),
- Delete = ?SETS:subtract(UpExp, LaterIn),
- NewNodeInfo = set_delete(NodeInfo, Label, Delete)
- end,
+ NewNodeInfo =
+ case Label =:= hipe_rtl_cfg:start_label(CFG) of
+ true ->
+ set_delete(NodeInfo, Label, ?SETS:new());
+ false ->
+ UpExp = up_exp(NodeInfo, Label),
+ LaterIn = later_in(NodeInfo, Label),
+ Delete = ?SETS:subtract(UpExp, LaterIn),
+ set_delete(NodeInfo, Label, Delete)
+ end,
calc_delete(CFG, NewNodeInfo, Labels).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/hipe/rtl/hipe_rtl_ssapre.erl b/lib/hipe/rtl/hipe_rtl_ssapre.erl
index e248457806..df1a4b9376 100644
--- a/lib/hipe/rtl/hipe_rtl_ssapre.erl
+++ b/lib/hipe/rtl/hipe_rtl_ssapre.erl
@@ -107,7 +107,7 @@ rtl_ssapre(RtlSSACfg, Options) ->
case XsiList of
[] ->
%% No Xsi
- ?option_time(?pp_debug("~n~n################ No Xsi Inserted ################~n",[]),"RTL A-SSAPRE No Xsi inserted (skip Downsafety and Will Be Available)",Options),
+ ?pp_debug("~n~n################ No Xsi Inserted ################~n",[]),
ok;
_ ->
?pp_debug("~n############ Downsafety ##########~n",[]),
@@ -126,7 +126,7 @@ rtl_ssapre(RtlSSACfg, Options) ->
?pp_debug("~n~n################ Xsi CFG ################~n",[]),pp_cfg(CFG2,XsiGraph),
init_redundancy_count(),
- ?option_time(FinalCFG=perform_code_motion(Labels,CFG2,XsiGraph),"RTL A-SSAPRE Code Motion",Options),
+ FinalCFG = ?option_time(perform_code_motion(Labels,CFG2,XsiGraph),"RTL A-SSAPRE Code Motion",Options),
?pp_debug("\n############ No more need for the Xsi Graph....Deleting...",[]),?GRAPH:delete(XsiGraph),
@@ -146,7 +146,7 @@ perform_Xsi_insertion(Cfg, Options) ->
init_counters(), %% Init counters for Bottoms and Temps
DigraphOpts = [cyclic, private],
XsiGraph = digraph:new(DigraphOpts),
- %% Be carefull, the digraph component is NOT garbage collected,
+ %% Be careful, the digraph component is NOT garbage collected,
%% so don't create 20 millions of instances!
%% finds the longest depth
%% Depth-first, preorder traversal over Basic Blocks.
@@ -154,13 +154,13 @@ perform_Xsi_insertion(Cfg, Options) ->
Labels = ?CFG:preorder(Cfg),
?pp_debug("~n~n############# Finding definitions for computation~n~n",[]),
- ?option_time({Cfg2,XsiGraph} = find_definition_for_computations(Labels,Cfg,XsiGraph),"RTL A-SSAPRE Xsi Insertion, searching from instructions",Options),
+ {Cfg2,XsiGraph} = ?option_time(find_definition_for_computations(Labels,Cfg,XsiGraph),"RTL A-SSAPRE Xsi Insertion, searching from instructions",Options),
%% Active List creation
GeneratorXsiList = lists:sort(?GRAPH:vertices(XsiGraph)),
?pp_debug("~n~n############# Inserted Xsis ~w",[GeneratorXsiList]),
?pp_debug("~n~n############# Finding operands~n",[]),
- ?option_time({Cfg3,XsiGraph} = find_operands(Cfg2,XsiGraph,GeneratorXsiList,0),"RTL A-SSAPRE Xsi Insertion, finding operands",Options),
+ {Cfg3,XsiGraph} = ?option_time(find_operands(Cfg2,XsiGraph,GeneratorXsiList,0),"RTL A-SSAPRE Xsi Insertion, finding operands",Options),
%% Creating the CFGGraph
?pp_debug("~n~n############# Creating CFG Graph",[]),
@@ -170,9 +170,9 @@ perform_Xsi_insertion(Cfg, Options) ->
?pp_debug("~nAdding a vertex for the start label: ~w",[StartLabel]),
?GRAPH:add_vertex(CFGGraph, StartLabel, #block{type = top}),
% Doing the others
- ?option_time(MPs=create_cfggraph(Others,Cfg3,CFGGraph,[],[],[],XsiGraph),"RTL A-SSAPRE Xsi Insertion, creating intermediate 'SSAPRE Graph'",Options),
+ MPs = ?option_time(create_cfggraph(Others,Cfg3,CFGGraph,[],[],[],XsiGraph),"RTL A-SSAPRE Xsi Insertion, creating intermediate 'SSAPRE Graph'",Options),
- %% Return the bloody collected information
+ %% Return the collected information
{Cfg3,XsiGraph,CFGGraph,MPs}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -221,22 +221,21 @@ find_definition_for_computations_in_block(BlockLabel,[Inst|Rest],Cfg,
?pp_debug(" Inserting Xsi: ",[]),pp_xsi(Xsi),
Label = Xsi#xsi.label,
- case BlockLabel =:= Label of
- false ->
- %% Insert the Xsi in the appropriate block
- Code = hipe_bb:code(?CFG:bb(Cfg,Label)),
- {BeforeCode,AfterCode} = split_for_xsi(lists:reverse(Code),[]),
- NewCode = BeforeCode++[XsiLink|AfterCode],
- NewBB = hipe_bb:mk_bb(NewCode),
- NewCfg = ?CFG:bb_add(Cfg,Label,NewBB),
- NewVisited = [NewInst|VisitedInstructions];
- _->
- {BeforeCode,AfterCode} = split_for_xsi(VisitedInstructions,[]),
- TempVisited = BeforeCode++[XsiLink|AfterCode],
- TempVisited2 = lists:reverse(TempVisited),
- NewVisited = [NewInst|TempVisited2],
- NewCfg = Cfg
- end,
+ {NewCfg, NewVisited} =
+ case BlockLabel =:= Label of
+ false ->
+ %% Insert the Xsi in the appropriate block
+ Code = hipe_bb:code(?CFG:bb(Cfg,Label)),
+ {BeforeCode,AfterCode} = split_for_xsi(lists:reverse(Code),[]),
+ NewCode = BeforeCode++[XsiLink|AfterCode],
+ NewBB = hipe_bb:mk_bb(NewCode),
+ {?CFG:bb_add(Cfg,Label,NewBB), [NewInst|VisitedInstructions]};
+ _->
+ {BeforeCode,AfterCode} = split_for_xsi(VisitedInstructions,[]),
+ TempVisited = BeforeCode++[XsiLink|AfterCode],
+ TempVisited2 = lists:reverse(TempVisited),
+ {Cfg, [NewInst|TempVisited2]}
+ end,
find_definition_for_computations_in_block(BlockLabel, Rest, NewCfg,
NewVisited, XsiGraph)
end;
@@ -787,14 +786,15 @@ create_cfggraph([Label|Ls],Cfg,CFGGraph,ToBeFactorizedAcc,MPAcc,LateEdges,XsiGra
Defs = get_defs_in_non_merge_block(Code, []),
?pp_debug("~nAdding a vertex for ~w", [Label]),
Succs = ?CFG:succ(Cfg, Label),
- case Succs of
- [] -> %% Exit point
- ?GRAPH:add_vertex(CFGGraph, Label, #block{type = exit}),
- NewToBeFactorizedAcc = ToBeFactorizedAcc;
- _ -> %% Split point
- ?GRAPH:add_vertex(CFGGraph,Label,#block{type=not_mp,attributes={P,Succs}}),
- NewToBeFactorizedAcc = [Label|ToBeFactorizedAcc]
- end,
+ NewToBeFactorizedAcc =
+ case Succs of
+ [] -> %% Exit point
+ ?GRAPH:add_vertex(CFGGraph, Label, #block{type = exit}),
+ ToBeFactorizedAcc;
+ _ -> %% Split point
+ ?GRAPH:add_vertex(CFGGraph,Label,#block{type=not_mp,attributes={P,Succs}}),
+ [Label|ToBeFactorizedAcc]
+ end,
?pp_debug("~nAdding an edge ~w -> ~w (~w)",[P,Label,Defs]),
case ?GRAPH:add_edge(CFGGraph,P,Label,Defs) of
{error,Reason} ->
@@ -862,56 +862,53 @@ add_edges_for_mp([P|Ps], Label, LateEdges) ->
%% Doesn't do anything so far
add_map_and_uses([], _Key, Maps, Uses) ->
- {Maps,Uses};
+ {Maps, Uses};
add_map_and_uses([XsiOp|Ops], Key, Maps, Uses) ->
- case XsiOp#xsi_op.op of
- #bottom{} ->
- Set = case gb_trees:lookup(XsiOp,Maps) of
- {value, V} ->
- ?SETS:add_element(Key,V);
- none ->
- ?SETS:from_list([Key])
- end,
- NewMaps = gb_trees:enter(XsiOp,Set,Maps),
- NewUses = Uses;
- #temp{} ->
- Set = case gb_trees:lookup(XsiOp,Maps) of
- {value, V} ->
- ?SETS:add_element(Key,V);
- none ->
- ?SETS:from_list([Key])
- end,
- NewMaps = gb_trees:enter(XsiOp,Set,Maps),
- Pred = XsiOp#xsi_op.pred,
- OOP = XsiOp#xsi_op.op,
- SSet = case gb_trees:lookup(Pred,Uses) of
- {value, VV} ->
- ?SETS:add_element(OOP#temp.key,VV);
- none ->
- ?SETS:from_list([OOP#temp.key])
- end,
- NewUses = gb_trees:enter(Pred,SSet,Uses);
- #eop{} ->
- Set = case gb_trees:lookup(XsiOp,Maps) of
- {value, V} ->
- ?SETS:add_element(Key,V);
- none ->
- ?SETS:from_list([Key])
- end,
- NewMaps = gb_trees:enter(XsiOp,Set,Maps),
- Pred = XsiOp#xsi_op.pred,
- Op = XsiOp#xsi_op.op,
- SSet = case gb_trees:lookup(Pred,Uses) of
- {value, VV} ->
- ?SETS:add_element(Op#eop.stopped_by,VV);
- none ->
- ?SETS:from_list([Op#eop.stopped_by])
- end,
- NewUses = gb_trees:enter(Pred,SSet,Uses);
- _->
- NewMaps = Maps,
- NewUses = Uses
- end,
+ {NewMaps, NewUses} =
+ case XsiOp#xsi_op.op of
+ #bottom{} ->
+ Set = case gb_trees:lookup(XsiOp, Maps) of
+ {value, V} ->
+ ?SETS:add_element(Key, V);
+ none ->
+ ?SETS:from_list([Key])
+ end,
+ {gb_trees:enter(XsiOp, Set, Maps), Uses};
+ #temp{} ->
+ Set = case gb_trees:lookup(XsiOp, Maps) of
+ {value, V} ->
+ ?SETS:add_element(Key, V);
+ none ->
+ ?SETS:from_list([Key])
+ end,
+ Pred = XsiOp#xsi_op.pred,
+ OOP = XsiOp#xsi_op.op,
+ SSet = case gb_trees:lookup(Pred, Uses) of
+ {value, VV} ->
+ ?SETS:add_element(OOP#temp.key, VV);
+ none ->
+ ?SETS:from_list([OOP#temp.key])
+ end,
+ {gb_trees:enter(XsiOp, Set, Maps), gb_trees:enter(Pred, SSet, Uses)};
+ #eop{} ->
+ Set = case gb_trees:lookup(XsiOp, Maps) of
+ {value, V} ->
+ ?SETS:add_element(Key, V);
+ none ->
+ ?SETS:from_list([Key])
+ end,
+ Pred = XsiOp#xsi_op.pred,
+ Op = XsiOp#xsi_op.op,
+ SSet = case gb_trees:lookup(Pred, Uses) of
+ {value, VV} ->
+ ?SETS:add_element(Op#eop.stopped_by, VV);
+ none ->
+ ?SETS:from_list([Op#eop.stopped_by])
+ end,
+ {gb_trees:enter(XsiOp, Set, Maps), gb_trees:enter(Pred, SSet, Uses)};
+ _->
+ {Maps, Uses}
+ end,
add_map_and_uses(Ops, Key, NewMaps, NewUses).
post_process([], _CFGGraph) -> ok;
@@ -1162,37 +1159,38 @@ code_motion_in_block(L,[Inst|Insts],Cfg,XsiG,Visited,InsertionsAcc) ->
#pre_candidate{} ->
Def = Inst#pre_candidate.def,
Alu = Inst#pre_candidate.alu,
- case Def of
- bottom ->
- InstToAdd = Alu;
- #temp{} ->
- Key = Def#temp.key,
- {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
- case Xsi#xsi.wba of
- true ->
- %% Turn into a move
- Dst = ?RTL:alu_dst(Alu),
- Move = ?RTL:mk_move(Dst,Def#temp.var),
- pp_instr(Inst#pre_candidate.alu,nil), ?pp_debug(" ==> ",[]), pp_instr(Move,nil),
- %% Counting redundancies
- redundancy_add(),
- InstToAdd = Move;
- _ ->
- InstToAdd = Alu
- end;
- _ -> %% Def is a real variable
- %% Turn into a move
- Dst = ?RTL:alu_dst(Alu),
- Move = ?RTL:mk_move(Dst,Def),
- pp_instr(Alu,nil), ?pp_debug(" ==> ",[]), pp_instr(Move,nil),
- %% Counting redundancies
- redundancy_add(),
- InstToAdd = Move
- end,
+ InstToAdd =
+ case Def of
+ bottom ->
+ Alu;
+ #temp{} ->
+ Key = Def#temp.key,
+ {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
+ case Xsi#xsi.wba of
+ true ->
+ %% Turn into a move
+ Dst = ?RTL:alu_dst(Alu),
+ Move = ?RTL:mk_move(Dst,Def#temp.var),
+ pp_instr(Inst#pre_candidate.alu,nil), ?pp_debug(" ==> ",[]), pp_instr(Move,nil),
+ %% Counting redundancies
+ redundancy_add(),
+ Move;
+ _ ->
+ Alu
+ end;
+ _ -> %% Def is a real variable
+ %% Turn into a move
+ Dst = ?RTL:alu_dst(Alu),
+ Move = ?RTL:mk_move(Dst,Def),
+ pp_instr(Alu,nil), ?pp_debug(" ==> ",[]), pp_instr(Move,nil),
+ %% Counting redundancies
+ redundancy_add(),
+ Move
+ end,
code_motion_in_block(L,Insts,Cfg,XsiG,[InstToAdd|Visited],InsertionsAcc);
#xsi_link{} ->
Key = Inst#xsi_link.num,
- {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
+ {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
case Xsi#xsi.wba of
true ->
%% Xsi is a WBA, it might trigger insertions
@@ -1235,139 +1233,133 @@ get_insertions([],OpAcc,InsertionsAcc,_Visited,_Expr,_XsiG) ->
get_insertions([XsiOp|Ops],OpAcc,InsertionsAcc,Visited,Expr,XsiG) ->
Pred = XsiOp#xsi_op.pred,
Op = XsiOp#xsi_op.op,
- case Op of
- #bottom{} ->
- case gb_trees:lookup(Pred,InsertionsAcc) of
- {value,Insertion} ->
- From = Insertion#insertion.from,
- case lists:keyfind(Op, 1, From) of
- false ->
- ?pp_debug("~nThere has been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
- Dst = Op#bottom.var,
- Expr2 = ?RTL:alu_dst_update(Expr,Dst),
- Inst = manufacture_computation(Pred,Expr2,Visited),
- Code = Insertion#insertion.code,
- NewInsertion = Insertion#insertion{from=[{Op,Dst}|From],code=[Inst|Code]},
- NewInsertionsAcc = gb_trees:update(Pred,NewInsertion,InsertionsAcc);
- {_, Val} ->
- ?pp_debug("~nThere has been insertions along the edge L~w already, and for that operand too | Op=",[Pred]),pp_arg(Op),
- Dst = Val,
- NewInsertionsAcc = InsertionsAcc
- end;
- none ->
- ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course)| Op=",[Pred]),pp_arg(Op),
- Dst = Op#bottom.var,
- Expr2 = ?RTL:alu_dst_update(Expr,Dst),
- Inst = manufacture_computation(Pred,Expr2,Visited),
- NewInsertion = #insertion{from=[{Op,Dst}],code=[Inst]},
- NewInsertionsAcc = gb_trees:insert(Pred,NewInsertion,InsertionsAcc)
- end;
- #const_expr{} ->
- case gb_trees:lookup(Pred,InsertionsAcc) of
- {value,Insertion} ->
- From = Insertion#insertion.from,
- case lists:keyfind(Op, 1, From) of
- false ->
- ?pp_debug("~nThere have been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
- Dst = Op#const_expr.var,
- Val = Op#const_expr.value,
- Inst = ?RTL:mk_move(Dst,Val),
- Code = Insertion#insertion.code,
- NewInsertion = Insertion#insertion{from=[{Op,Dst}|From],code=[Inst|Code]},
- NewInsertionsAcc = gb_trees:update(Pred,NewInsertion,InsertionsAcc);
- {_, Val} ->
- ?pp_debug("~nThere have been insertions along the edge L~w already, and for that operand too | Op=",[Pred]),pp_arg(Op),
- Dst = Val,
- NewInsertionsAcc = InsertionsAcc
- end;
- none ->
- ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course)| Op=",[Pred]),pp_arg(Op),
- Dst = Op#const_expr.var,
- Val = Op#const_expr.value,
- Inst = ?RTL:mk_move(Dst,Val),
- NewInsertion = #insertion{from=[{Op,Dst}],code=[Inst]},
- NewInsertionsAcc = gb_trees:insert(Pred,NewInsertion,InsertionsAcc)
- end;
- #eop{} ->
- %% We treat expressions like bottoms
- %% The value must be recomputed, and therefore not available...
- case gb_trees:lookup(Pred,InsertionsAcc) of
- {value,Insertion} ->
- From = Insertion#insertion.from,
- case lists:keyfind(Op, 1, From) of
- false ->
- ?pp_debug("~nThere has been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
- Dst = Op#eop.var,
- Expr2 = ?RTL:alu_dst_update(Expr,Dst),
- Inst = manufacture_computation(Pred,Expr2,Visited),
- Code = Insertion#insertion.code,
- NewInsertion = Insertion#insertion{from=[{Op,Dst}|From],code=[Inst|Code]},
- NewInsertionsAcc = gb_trees:update(Pred,NewInsertion,InsertionsAcc);
- {_, Val} ->
- ?pp_debug("~nThere has been insertions along the edge L~w already, and for that operand too | Op=",[Pred]),pp_arg(Op),
- Dst = Val,
- NewInsertionsAcc = InsertionsAcc
- end;
- none ->
- ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course)| Op=",[Pred]),pp_arg(Op),
- Dst = Op#eop.var,
- Expr2 = ?RTL:alu_dst_update(Expr,Dst),
- Inst = manufacture_computation(Pred,Expr2,Visited),
- NewInsertion = #insertion{from=[{Op,Dst}],code=[Inst]},
- NewInsertionsAcc = gb_trees:insert(Pred,NewInsertion,InsertionsAcc)
- end;
- #temp{} ->
- case gb_trees:lookup(Pred,InsertionsAcc) of
- {value,Insertion} ->
- From = Insertion#insertion.from,
- case lists:keyfind(Op, 1, From) of
- false ->
- ?pp_debug("~nThere has been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
- Key = Op#temp.key,
- {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
- case Xsi#xsi.wba of
- true ->
- ?pp_debug("~nBut the operand is a WBA Xsi: no need for insertion",[]),
- Dst = Op#temp.var,
- NewInsertionsAcc = InsertionsAcc;
- _ ->
- ?pp_debug("~nBut the operand is a NOT WBA Xsi: we must make an insertion",[]),
- Dst = ?RTL:mk_new_var(),
- Expr2 = ?RTL:alu_dst_update(Expr,Dst),
- Inst = manufacture_computation(Pred,Expr2,Visited),
- Code = Insertion#insertion.code,
- NewInsertion = Insertion#insertion{from=[{Op,Dst}|From],code=[Inst|Code]},
- NewInsertionsAcc = gb_trees:update(Pred,NewInsertion,InsertionsAcc)
- end;
- {_, Val} ->
- ?pp_debug("~nThere has been insertions along the edge L~w already, and for that operand too (Op=~w)",[Pred,Op]),
- ?pp_debug("~nThis means, this temp is a WBA Xsi's definition",[]),
- Dst = Val,
- NewInsertionsAcc = InsertionsAcc
- end;
- none ->
- ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course | Op=",[Pred]),pp_arg(Op),
- Key = Op#temp.key,
- {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
- case Xsi#xsi.wba of
- true ->
- ?pp_debug("~nBut the operand is a WBA Xsi: no need for insertion",[]),
- Dst = Op#temp.var,
- NewInsertionsAcc = InsertionsAcc;
- _ ->
- ?pp_debug("~nBut the operand is a NOT WBA Xsi: we must make an insertion",[]),
- Dst = ?RTL:mk_new_var(),
- Expr2 = ?RTL:alu_dst_update(Expr,Dst),
- Inst = manufacture_computation(Pred,Expr2,Visited),
- NewInsertion = #insertion{from=[{Op,Dst}],code=[Inst]},
- NewInsertionsAcc = gb_trees:insert(Pred,NewInsertion,InsertionsAcc)
- end
- end;
- _ ->
- ?pp_debug("~nThe operand (Op=",[]),pp_arg(Op),?pp_debug(") is a real variable, no need for insertion along L~w",[Pred]),
- Dst = Op,
- NewInsertionsAcc = InsertionsAcc
- end,
+ {Dst, NewInsertionsAcc} =
+ case Op of
+ #bottom{} ->
+ case gb_trees:lookup(Pred,InsertionsAcc) of
+ {value,Insertion} ->
+ From = Insertion#insertion.from,
+ case lists:keyfind(Op, 1, From) of
+ false ->
+ ?pp_debug("~nThere has been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
+ D = Op#bottom.var,
+ Expr2 = ?RTL:alu_dst_update(Expr,D),
+ Inst = manufacture_computation(Pred,Expr2,Visited),
+ Code = Insertion#insertion.code,
+ NewInsertion = Insertion#insertion{from=[{Op,D}|From],code=[Inst|Code]},
+ {D, gb_trees:update(Pred, NewInsertion, InsertionsAcc)};
+ {_, Val} ->
+ ?pp_debug("~nThere has been insertions along the edge L~w already, and for that operand too | Op=",[Pred]),pp_arg(Op),
+ {Val, InsertionsAcc}
+ end;
+ none ->
+ ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course)| Op=",[Pred]),pp_arg(Op),
+ D = Op#bottom.var,
+ Expr2 = ?RTL:alu_dst_update(Expr, D),
+ Inst = manufacture_computation(Pred,Expr2,Visited),
+ NewInsertion = #insertion{from=[{Op,D}],code=[Inst]},
+ {D, gb_trees:insert(Pred,NewInsertion, InsertionsAcc)}
+ end;
+ #const_expr{} ->
+ case gb_trees:lookup(Pred,InsertionsAcc) of
+ {value,Insertion} ->
+ From = Insertion#insertion.from,
+ case lists:keyfind(Op, 1, From) of
+ false ->
+ ?pp_debug("~nThere have been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
+ D = Op#const_expr.var,
+ Val = Op#const_expr.value,
+ Inst = ?RTL:mk_move(D, Val),
+ Code = Insertion#insertion.code,
+ NewInsertion = Insertion#insertion{from=[{Op,D}|From],code=[Inst|Code]},
+ {D, gb_trees:update(Pred,NewInsertion,InsertionsAcc)};
+ {_, Val} ->
+ ?pp_debug("~nThere have been insertions along the edge L~w already, and for that operand too | Op=",[Pred]),pp_arg(Op),
+ {Val, InsertionsAcc}
+ end;
+ none ->
+ ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course)| Op=",[Pred]),pp_arg(Op),
+ D = Op#const_expr.var,
+ Val = Op#const_expr.value,
+ Inst = ?RTL:mk_move(D, Val),
+ NewInsertion = #insertion{from=[{Op,D}],code=[Inst]},
+ {D, gb_trees:insert(Pred,NewInsertion, InsertionsAcc)}
+ end;
+ #eop{} ->
+ %% We treat expressions like bottoms
+ %% The value must be recomputed, and therefore not available...
+ case gb_trees:lookup(Pred,InsertionsAcc) of
+ {value,Insertion} ->
+ From = Insertion#insertion.from,
+ case lists:keyfind(Op, 1, From) of
+ false ->
+ ?pp_debug("~nThere has been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
+ D = Op#eop.var,
+ Expr2 = ?RTL:alu_dst_update(Expr, D),
+ Inst = manufacture_computation(Pred,Expr2,Visited),
+ Code = Insertion#insertion.code,
+ NewInsertion = Insertion#insertion{from=[{Op,D}|From],code=[Inst|Code]},
+ {D, gb_trees:update(Pred,NewInsertion, InsertionsAcc)};
+ {_, Val} ->
+ ?pp_debug("~nThere has been insertions along the edge L~w already, and for that operand too | Op=",[Pred]),pp_arg(Op),
+ {Val, InsertionsAcc}
+ end;
+ none ->
+ ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course)| Op=",[Pred]),pp_arg(Op),
+ D = Op#eop.var,
+ Expr2 = ?RTL:alu_dst_update(Expr, D),
+ Inst = manufacture_computation(Pred,Expr2,Visited),
+ NewInsertion = #insertion{from=[{Op,D}],code=[Inst]},
+ {D, gb_trees:insert(Pred, NewInsertion, InsertionsAcc)}
+ end;
+ #temp{} ->
+ case gb_trees:lookup(Pred,InsertionsAcc) of
+ {value,Insertion} ->
+ From = Insertion#insertion.from,
+ case lists:keyfind(Op, 1, From) of
+ false ->
+ ?pp_debug("~nThere has been insertions along the edge L~w already, but not for that operand | Op=",[Pred]),pp_arg(Op),
+ Key = Op#temp.key,
+ {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
+ case Xsi#xsi.wba of
+ true ->
+ ?pp_debug("~nBut the operand is a WBA Xsi: no need for insertion",[]),
+ {Op#temp.var, InsertionsAcc};
+ _ ->
+ ?pp_debug("~nBut the operand is a NOT WBA Xsi: we must make an insertion",[]),
+ D = ?RTL:mk_new_var(),
+ Expr2 = ?RTL:alu_dst_update(Expr, D),
+ Inst = manufacture_computation(Pred,Expr2,Visited),
+ Code = Insertion#insertion.code,
+ NewInsertion = Insertion#insertion{from=[{Op,D}|From],code=[Inst|Code]},
+ {D, gb_trees:update(Pred, NewInsertion, InsertionsAcc)}
+ end;
+ {_, Val} ->
+ ?pp_debug("~nThere has been insertions along the edge L~w already, and for that operand too (Op=~w)",[Pred,Op]),
+ ?pp_debug("~nThis means, this temp is a WBA Xsi's definition",[]),
+ {Val, InsertionsAcc}
+ end;
+ none ->
+ ?pp_debug("~nThere has been no insertion along the edge L~w, (and not for that operand, of course | Op=",[Pred]),pp_arg(Op),
+ Key = Op#temp.key,
+ {_V,Xsi} = ?GRAPH:vertex(XsiG,Key),
+ case Xsi#xsi.wba of
+ true ->
+ ?pp_debug("~nBut the operand is a WBA Xsi: no need for insertion",[]),
+ {Op#temp.var, InsertionsAcc};
+ _ ->
+ ?pp_debug("~nBut the operand is a NOT WBA Xsi: we must make an insertion",[]),
+ D = ?RTL:mk_new_var(),
+ Expr2 = ?RTL:alu_dst_update(Expr, D),
+ Inst = manufacture_computation(Pred,Expr2,Visited),
+ NewInsertion = #insertion{from=[{Op,D}],code=[Inst]},
+ {D, gb_trees:insert(Pred, NewInsertion, InsertionsAcc)}
+ end
+ end;
+ _ ->
+ ?pp_debug("~nThe operand (Op=",[]),pp_arg(Op),?pp_debug(") is a real variable, no need for insertion along L~w",[Pred]),
+ {Op, InsertionsAcc}
+ end,
NewXsiOp = XsiOp#xsi_op{op=Dst},
get_insertions(Ops, [NewXsiOp|OpAcc], NewInsertionsAcc, Visited, Expr, XsiG).
diff --git a/lib/hipe/sparc/Makefile b/lib/hipe/sparc/Makefile
index 9fea887ebd..0e36a43d8e 100644
--- a/lib/hipe/sparc/Makefile
+++ b/lib/hipe/sparc/Makefile
@@ -76,7 +76,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/test/Makefile b/lib/hipe/test/Makefile
index 09f4fd2129..544888719f 100644
--- a/lib/hipe/test/Makefile
+++ b/lib/hipe/test/Makefile
@@ -6,7 +6,8 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# ----------------------------------------------------
MODULES= \
- hipe_SUITE
+ hipe_SUITE \
+ opt_verify_SUITE
# .erl files for these modules are automatically generated
GEN_MODULES= \
@@ -79,4 +80,4 @@ release_tests_spec: make_emakefile
@tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
cd "$(RELSYSDIR)";\
erlc hipe_testsuite_driver.erl;\
- erl -noshell -run hipe_testsuite_driver create_all_suites -s erlang halt
+ erl -noshell -run hipe_testsuite_driver create_all_suites $(GEN_MODULES) -s erlang halt
diff --git a/lib/hipe/test/hipe_testsuite_driver.erl b/lib/hipe/test/hipe_testsuite_driver.erl
index 64c5c0a7c9..03ec7adfd0 100644
--- a/lib/hipe/test/hipe_testsuite_driver.erl
+++ b/lib/hipe/test/hipe_testsuite_driver.erl
@@ -1,6 +1,6 @@
-module(hipe_testsuite_driver).
--export([create_all_suites/0, run/3]).
+-export([create_all_suites/1, run/3]).
-include_lib("kernel/include/file.hrl").
@@ -16,25 +16,17 @@
outputfile :: file:io_device(),
testcases :: [testcase()]}).
--spec create_all_suites() -> 'ok'.
+-spec create_all_suites([string()]) -> 'ok'.
-create_all_suites() ->
- {ok, Cwd} = file:get_cwd(),
- Suites = get_suites(Cwd),
+create_all_suites(SuitesWithSuiteSuffix) ->
+ Suites = get_suites(SuitesWithSuiteSuffix),
lists:foreach(fun create_suite/1, Suites).
--spec get_suites(file:filename()) -> [string()].
+-spec get_suites([string()]) -> [string()].
-get_suites(Dir) ->
- case file:list_dir(Dir) of
- {error, _} -> [];
- {ok, Filenames} ->
- FullFilenames = [filename:join(Dir, F) || F <- Filenames],
- Dirs = [suffix(filename:basename(F), ?suite_data) ||
- F <- FullFilenames,
- file_type(F) =:= {ok, 'directory'}],
- [S || {yes, S} <- Dirs]
- end.
+get_suites(SuitesWithSuiteSuffix) ->
+ Prefixes = [suffix(F, ?suite_suffix) || F <- SuitesWithSuiteSuffix],
+ [S || {yes, S} <- Prefixes].
suffix(String, Suffix) ->
case string:rstr(String, Suffix) of
diff --git a/lib/hipe/test/opt_verify_SUITE.erl b/lib/hipe/test/opt_verify_SUITE.erl
new file mode 100644
index 0000000000..61952e81d7
--- /dev/null
+++ b/lib/hipe/test/opt_verify_SUITE.erl
@@ -0,0 +1,62 @@
+-module(opt_verify_SUITE).
+
+-compile([export_all]).
+
+all() ->
+ [call_elim].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ case erlang:system_info(hipe_architecture) of
+ undefined -> {skip, "HiPE not available or enabled"};
+ _ -> Config
+ end.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+call_elim_test_file(Config, FileName, Option) ->
+ PrivDir = test_server:lookup_config(priv_dir, Config),
+ TempOut = test_server:temp_name(filename:join(PrivDir, "call_elim_out")),
+ {ok, TestCase} = compile:file(FileName),
+ {ok, TestCase} = hipe:c(TestCase, [Option, {pp_range_icode, {file, TempOut}}]),
+ {ok, Icode} = file:read_file(TempOut),
+ ok = file:delete(TempOut),
+ Icode.
+
+substring_count(Icode, Substring) ->
+ substring_count(Icode, Substring, 0).
+substring_count(Icode, Substring, N) ->
+ case string:str(Icode, Substring) of
+ 0 -> N;
+ I -> substring_count(lists:nthtail(I, Icode), Substring, N+1)
+ end.
+
+call_elim() ->
+ [{doc, "Test that the call elimination optimization pass is ok"}].
+call_elim(Config) ->
+ DataDir = test_server:lookup_config(data_dir, Config),
+ F1 = filename:join(DataDir, "call_elim_test.erl"),
+ Icode1 = call_elim_test_file(Config, F1, icode_call_elim),
+ 0 = substring_count(binary:bin_to_list(Icode1), "is_key"),
+ Icode2 = call_elim_test_file(Config, F1, no_icode_call_elim),
+ true = (0 /= substring_count(binary:bin_to_list(Icode2), "is_key")),
+ F2 = filename:join(DataDir, "call_elim_test_branches_no_opt_poss.erl"),
+ Icode3 = call_elim_test_file(Config, F2, icode_call_elim),
+ 3 = substring_count(binary:bin_to_list(Icode3), "is_key"),
+ Icode4 = call_elim_test_file(Config, F2, no_icode_call_elim),
+ 3 = substring_count(binary:bin_to_list(Icode4), "is_key"),
+ F3 = filename:join(DataDir, "call_elim_test_branches_opt_poss.erl"),
+ Icode5 = call_elim_test_file(Config, F3, icode_call_elim),
+ 0 = substring_count(binary:bin_to_list(Icode5), "is_key"),
+ Icode6 = call_elim_test_file(Config, F3, no_icode_call_elim),
+ 3 = substring_count(binary:bin_to_list(Icode6), "is_key"),
+ ok.
diff --git a/lib/hipe/test/opt_verify_SUITE_data/call_elim_test.erl b/lib/hipe/test/opt_verify_SUITE_data/call_elim_test.erl
new file mode 100644
index 0000000000..8b725f8ffe
--- /dev/null
+++ b/lib/hipe/test/opt_verify_SUITE_data/call_elim_test.erl
@@ -0,0 +1,12 @@
+-module(call_elim_test).
+
+-export([test/0]).
+
+test() ->
+ true = has_1_field(#{1=>true}),
+ true = has_1_field(#{1=>"hej", b=>2}),
+ true = has_1_field(#{b=>3, 1=>4}),
+ ok.
+
+has_1_field(#{1:=_}) -> true;
+has_1_field(#{}) -> false.
diff --git a/lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_no_opt_poss.erl b/lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_no_opt_poss.erl
new file mode 100644
index 0000000000..7ffae86797
--- /dev/null
+++ b/lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_no_opt_poss.erl
@@ -0,0 +1,32 @@
+-module(call_elim_test_branches_no_opt_poss).
+
+-export([test/1]).
+
+test(A) ->
+ if A > 0 ->
+ false = has_a_field(#{b=>true}),
+ true = has_a_field(#{b=>1, a=>"2"}),
+ false = has_a_field(#{b=>5, c=>4}),
+ false = has_tuple_field(#{{ab, 2}=><<"qq">>, 1 =>0}),
+ false = has_tuple_field(#{up =>down, {ab, 2}=>[]}),
+ false = has_tuple_field(#{{ab, 2}=>42});
+ A =< 0 ->
+ true = has_a_field(#{a=>q, 'A' =>nej}),
+ true = has_a_field(#{a=>"hej", false=>true}),
+ true = has_a_field(#{a=>3}),
+ true = has_tuple_field(#{{ab, 1}=>q, 'A' =>nej}),
+ true = has_tuple_field(#{{ab, 1}=>"hej", false=>true}),
+ true = has_tuple_field(#{{ab, 1}=>3})
+ end,
+ true = has_nil_field(#{[] =>3, b=>"seven"}),
+ true = has_nil_field(#{"seventeen"=>17}),
+ ok.
+
+has_tuple_field(#{{ab, 1}:=_}) -> true;
+has_tuple_field(#{}) -> false.
+
+has_a_field(#{a:=_}) -> true;
+has_a_field(#{}) -> false.
+
+has_nil_field(#{[]:=_}) -> true;
+has_nil_field(#{}) -> false.
diff --git a/lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_opt_poss.erl b/lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_opt_poss.erl
new file mode 100644
index 0000000000..c8ddfa1e75
--- /dev/null
+++ b/lib/hipe/test/opt_verify_SUITE_data/call_elim_test_branches_opt_poss.erl
@@ -0,0 +1,32 @@
+-module(call_elim_test_branches_opt_poss).
+
+-export([test/1]).
+
+test(A) ->
+ if A > 0 ->
+ true = has_a_field(#{a=>true}),
+ true = has_a_field(#{b=>1, a=>"2"}),
+ true = has_a_field(#{a=>5, c=>4}),
+ true = has_tuple_field(#{{ab, 1}=><<"qq">>, 1 =>0}),
+ true = has_tuple_field(#{up =>down, {ab, 1}=>[]}),
+ true = has_tuple_field(#{{ab, 1}=>42});
+ A =< 0 ->
+ true = has_a_field(#{a=>q, 'A' =>nej}),
+ true = has_a_field(#{a=>"hej", false=>true}),
+ true = has_a_field(#{a=>3}),
+ true = has_tuple_field(#{{ab, 1}=>q, 'A' =>nej}),
+ true = has_tuple_field(#{{ab, 1}=>"hej", false=>true}),
+ true = has_tuple_field(#{{ab, 1}=>3})
+ end,
+ true = has_nil_field(#{[] =>3, b =>"seven"}),
+ true = has_nil_field(#{"seventeen"=>17, []=>nil}),
+ ok.
+
+has_tuple_field(#{{ab, 1}:=_}) -> true;
+has_tuple_field(#{}) -> false.
+
+has_a_field(#{a:=_}) -> true;
+has_a_field(#{}) -> false.
+
+has_nil_field(#{[]:=_}) -> true;
+has_nil_field(#{}) -> false.
diff --git a/lib/hipe/tools/Makefile b/lib/hipe/tools/Makefile
index 4e3b93d464..7a62896c31 100644
--- a/lib/hipe/tools/Makefile
+++ b/lib/hipe/tools/Makefile
@@ -65,7 +65,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars +warn_missing_spec +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile
index 32135d60dd..66e9421c25 100644
--- a/lib/hipe/util/Makefile
+++ b/lib/hipe/util/Makefile
@@ -69,7 +69,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_missing_spec +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars +warn_missing_spec +warn_untyped_record
# ----------------------------------------------------
# Targets
diff --git a/lib/hipe/x86/Makefile b/lib/hipe/x86/Makefile
index e8a73bbc42..93f8b955dd 100644
--- a/lib/hipe/x86/Makefile
+++ b/lib/hipe/x86/Makefile
@@ -84,7 +84,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +warn_exported_vars
+ERL_COMPILE_FLAGS += -Werror +warn_export_vars
# ----------------------------------------------------
# Targets
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index c2ca511795..bbf25f8e90 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -106,8 +106,8 @@
-type common_reason() :: 'econn' | 'eclosed' | term().
-type file_write_error_reason() :: term(). % See file:write for more info
--define(DBG(F,A), 'n/a').
-%%-define(DBG(F,A), io:format(F,A)).
+%%-define(DBG(F,A), 'n/a').
+-define(DBG(F,A), io:format(F,A)).
%%%=========================================================================
%%% API - CLIENT FUNCTIONS
@@ -1383,12 +1383,18 @@ handle_call({_, {transfer_chunk, Bin}}, _, #state{chunk = true} = State) ->
send_data_message(State, Bin),
{reply, ok, State};
+handle_call({_, {transfer_chunk, _}}, _, #state{chunk = false} = State) ->
+ {reply, {error, echunk}, State};
+
handle_call({_, chunk_end}, From, #state{chunk = true} = State) ->
close_data_connection(State),
activate_ctrl_connection(State),
{noreply, State#state{client = From, dsock = undefined,
caller = end_chunk_transfer, chunk = false}};
+handle_call({_, chunk_end}, _, #state{chunk = false} = State) ->
+ {reply, {error, echunk}, State};
+
handle_call({_, {quote, Cmd}}, From, #state{chunk = false} = State) ->
send_ctrl_message(State, mk_cmd(Cmd, [])),
activate_ctrl_connection(State),
@@ -1769,12 +1775,12 @@ handle_ctrl_result({pos_compl, _Lines},
{LSock, Caller}}} = State) ->
handle_caller(State#state{caller = Caller, dsock = {lsock, LSock}});
-handle_ctrl_result({Status, Lines},
+handle_ctrl_result({Status, _Lines},
#state{mode = active,
caller = {setup_data_connection, {LSock, _}}}
= State) ->
- close_connection(LSock),
- ctrl_result_response(Status, State, {error, Lines});
+ close_connection({tcp,LSock}),
+ ctrl_result_response(Status, State, {error, Status});
%% Data connection setup passive mode
handle_ctrl_result({pos_compl, Lines},
@@ -1965,7 +1971,7 @@ handle_ctrl_result(_, #state{caller = {handle_dir_data_third_phase, DirData},
{noreply, State#state{client = undefined, caller = undefined}};
handle_ctrl_result({Status, _}, #state{caller = cd} = State) ->
- ctrl_result_response(Status, State, {error, epath});
+ ctrl_result_response(Status, State, {error, Status});
handle_ctrl_result(Status={epath, _}, #state{caller = {dir,_}} = State) ->
ctrl_result_response(Status, State, {error, epath});
@@ -1980,11 +1986,11 @@ handle_ctrl_result({pos_interm, _}, #state{caller = {rename, NewFile}}
handle_ctrl_result({Status, _},
#state{caller = {rename, _}} = State) ->
- ctrl_result_response(Status, State, {error, epath});
+ ctrl_result_response(Status, State, {error, Status});
handle_ctrl_result({Status, _},
#state{caller = rename_second_phase} = State) ->
- ctrl_result_response(Status, State, {error, epath});
+ ctrl_result_response(Status, State, {error, Status});
%%--------------------------------------------------------------------------
%% File handling - recv_bin
@@ -2095,7 +2101,7 @@ handle_ctrl_result({pos_prel, _}, #state{caller = {transfer_data, Bin}}
%% Default
handle_ctrl_result({Status, Lines}, #state{client = From} = State)
when From =/= undefined ->
- ctrl_result_response(Status, State, {error, Lines}).
+ ctrl_result_response(Status, State, {error, Status}).
%%--------------------------------------------------------------------------
%% Help functions to handle_ctrl_result
@@ -2113,7 +2119,6 @@ ctrl_result_response(Status, #state{client = From} = State, _)
(Status =:= epnospc) orelse
(Status =:= efnamena) orelse
(Status =:= econn) ->
-%Status == etnospc; Status == epnospc; Status == econn ->
gen_server:reply(From, {error, Status}),
%% {stop, normal, {error, Status}, State#state{client = undefined}};
{stop, normal, State#state{client = undefined}};
@@ -2378,6 +2383,7 @@ close_ctrl_connection(#state{csock = Socket}) -> close_connection(Socket).
close_data_connection(#state{dsock = undefined}) -> ok;
close_data_connection(#state{dsock = Socket}) -> close_connection(Socket).
+close_connection({lsock,Socket}) -> gen_tcp:close(Socket);
close_connection({tcp, Socket}) -> gen_tcp:close(Socket);
close_connection({ssl, Socket}) -> ssl:close(Socket).
diff --git a/lib/inets/src/ftp/ftp_response.erl b/lib/inets/src/ftp/ftp_response.erl
index 32db2dfe66..7533bc4550 100644
--- a/lib/inets/src/ftp/ftp_response.erl
+++ b/lib/inets/src/ftp/ftp_response.erl
@@ -194,5 +194,6 @@ interpret_status(?TRANS_NEG_COMPL,_,_) -> trans_neg_compl;
interpret_status(?PERM_NEG_COMPL,?FILE_SYSTEM,0) -> epath;
interpret_status(?PERM_NEG_COMPL,?FILE_SYSTEM,2) -> epnospc;
interpret_status(?PERM_NEG_COMPL,?FILE_SYSTEM,3) -> efnamena;
+interpret_status(?PERM_NEG_COMPL,?AUTH_ACC,0) -> elogin;
interpret_status(?PERM_NEG_COMPL,_,_) -> perm_neg_compl.
diff --git a/lib/inets/test/Makefile b/lib/inets/test/Makefile
index 65983c528d..ffc512050a 100644
--- a/lib/inets/test/Makefile
+++ b/lib/inets/test/Makefile
@@ -151,7 +151,6 @@ MODULES = \
inets_test_lib \
erl_make_certs \
ftp_SUITE \
- ftp_suite_lib \
ftp_format_SUITE \
http_format_SUITE \
httpc_SUITE \
@@ -169,8 +168,6 @@ MODULES = \
httpd_test_lib \
inets_sup_SUITE \
inets_SUITE \
- inets_app_test \
- inets_appup_test \
tftp_test_lib \
tftp_SUITE \
uri_SUITE \
diff --git a/lib/inets/test/ftp_SUITE.erl b/lib/inets/test/ftp_SUITE.erl
index cc40377ebf..a8d39e3fe7 100644
--- a/lib/inets/test/ftp_SUITE.erl
+++ b/lib/inets/test/ftp_SUITE.erl
@@ -42,18 +42,25 @@
-define(BAD_USER, "baduser").
-define(BAD_DIR, "baddirectory").
-go() -> ct:run_test([{suite,"ftp_SUITE"}, {logdir,"LOG"}]).
-gos() -> ct:run_test([{suite,"ftp_SUITE"}, {group,ftps_passive}, {logdir,"LOG"}]).
+-record(progress, {
+ current = 0,
+ total
+ }).
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
+suite() ->
+ [{timetrap,{seconds,20}}].
+
all() ->
[
{group, ftp_passive},
{group, ftp_active},
{group, ftps_passive},
- {group, ftps_active}
+ {group, ftps_active},
+ error_ehost,
+ clean_shutdown
].
groups() ->
@@ -90,7 +97,13 @@ ftp_tests()->
recv_chunk,
type,
quote,
- ip_v6_disabled
+ error_elogin,
+ progress_report_send,
+ progress_report_recv,
+ not_owner,
+ unexpected_call,
+ unexpected_cast,
+ unexpected_bang
].
%%--------------------------------------------------------------------
@@ -117,9 +130,9 @@ ftp_tests()->
-define(default_ftp_servers,
[{"vsftpd",
fun(__CONF__) ->
- DataDir = ?config(data_dir,__CONF__),
+ DataDir = proplists:get_value(data_dir,__CONF__),
ConfFile = filename:join(DataDir, "vsftpd.conf"),
- PrivDir = ?config(priv_dir,__CONF__),
+ PrivDir = proplists:get_value(priv_dir,__CONF__),
AnonRoot = PrivDir,
Cmd = ["vsftpd "++filename:join(DataDir,"vsftpd.conf"),
" -oftpd_banner=erlang_otp_testing",
@@ -145,7 +158,7 @@ ftp_tests()->
fun(_StartResult) -> os:cmd("kill `ps ax | grep erlang_otp_testing | awk '/vsftpd/{print $1}'`")
end,
fun(__CONF__) ->
- AnonRoot = ?config(priv_dir,__CONF__),
+ AnonRoot = proplists:get_value(priv_dir,__CONF__),
[{id2ftp, fun(Id) -> filename:join(AnonRoot,Id) end},
{id2ftp_result,fun(Id) -> filename:join(AnonRoot,Id) end} | __CONF__]
end,
@@ -161,9 +174,9 @@ init_per_suite(Config) ->
false ->
{skip, "No ftp server found"};
{ok,Data} ->
- TstDir = filename:join(?config(priv_dir,Config), "test"),
+ TstDir = filename:join(proplists:get_value(priv_dir,Config), "test"),
file:make_dir(TstDir),
- make_cert_files(dsa, rsa, "server-", ?config(data_dir,Config)),
+ make_cert_files(dsa, rsa, "server-", proplists:get_value(data_dir,Config)),
start_ftpd([{test_dir,TstDir},
{ftpd_data,Data}
| Config])
@@ -181,42 +194,49 @@ init_per_group(_Group, Config) -> Config.
end_per_group(_Group, Config) -> Config.
%%--------------------------------------------------------------------
-init_per_testcase(Case, Config0) ->
- Group = proplists:get_value(name,?config(tc_group_properties,Config0)),
- try ?MODULE:Case(doc) of
- Msg -> ct:comment(Msg)
- catch
- _:_-> ok
- end,
+init_per_testcase(Case, Config0) ->
+ Group = proplists:get_value(name, proplists:get_value(tc_group_properties,Config0)),
TLS = [{tls,[{reuse_sessions,true}]}],
ACTIVE = [{mode,active}],
PASSIVE = [{mode,passive}],
- ExtraOpts = [verbose],
+ CaseOpts = case Case of
+ progress_report_send -> [{progress, {?MODULE,progress,#progress{}}}];
+ progress_report_recv -> [{progress, {?MODULE,progress,#progress{}}}];
+ _ -> []
+ end,
+ ExtraOpts = [verbose | CaseOpts],
Config =
case Group of
- ftp_active -> ftp__open(Config0, ACTIVE ++ExtraOpts);
- ftps_active -> ftp__open(Config0, TLS++ ACTIVE ++ExtraOpts);
- ftp_passive -> ftp__open(Config0, PASSIVE ++ExtraOpts);
- ftps_passive -> ftp__open(Config0, TLS++PASSIVE ++ExtraOpts)
+ ftp_active -> ftp__open(Config0, ACTIVE ++ ExtraOpts);
+ ftps_active -> ftp__open(Config0, TLS++ ACTIVE ++ ExtraOpts);
+ ftp_passive -> ftp__open(Config0, PASSIVE ++ ExtraOpts);
+ ftps_passive -> ftp__open(Config0, TLS++PASSIVE ++ ExtraOpts);
+ undefined -> Config0
end,
case Case of
- user -> Config;
- bad_user -> Config;
+ user -> Config;
+ bad_user -> Config;
+ error_elogin -> Config;
+ error_ehost -> Config;
+ clean_shutdown -> Config;
_ ->
- Pid = ?config(ftp,Config),
+ Pid = proplists:get_value(ftp,Config),
ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS(atom_to_list(Group)++"-"++atom_to_list(Case)) ),
- ok = ftp:cd(Pid, ?config(priv_dir,Config)),
+ ok = ftp:cd(Pid, proplists:get_value(priv_dir,Config)),
Config
end.
end_per_testcase(user, _Config) -> ok;
end_per_testcase(bad_user, _Config) -> ok;
+end_per_testcase(error_elogin, _Config) -> ok;
+end_per_testcase(error_ehost, _Config) -> ok;
+end_per_testcase(clean_shutdown, _Config) -> ok;
end_per_testcase(_Case, Config) ->
- case ?config(tc_status,Config) of
+ case proplists:get_value(tc_status,Config) of
ok -> ok;
_ ->
- try ftp:latest_ctrl_response(?config(ftp,Config))
+ try ftp:latest_ctrl_response(proplists:get_value(ftp,Config))
of
{ok,S} -> ct:log("***~n*** Latest ctrl channel response:~n*** ~p~n***",[S])
catch
@@ -228,51 +248,57 @@ end_per_testcase(_Case, Config) ->
%%--------------------------------------------------------------------
%% Test Cases --------------------------------------------------------
%%--------------------------------------------------------------------
-user(doc) -> ["Open an ftp connection to a host, and logon as anonymous ftp, then logoff"];
+user() -> [
+ {doc, "Open an ftp connection to a host, and logon as anonymous ftp,"
+ " then logoff"}].
user(Config) ->
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS("")),% logon
ok = ftp:close(Pid), % logoff
{error,eclosed} = ftp:pwd(Pid), % check logoff result
ok.
%%-------------------------------------------------------------------------
-bad_user(doc) -> ["Open an ftp connection to a host, and logon with bad user."];
+bad_user() ->
+ [{doc, "Open an ftp connection to a host, and logon with bad user."}].
bad_user(Config) ->
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{error, euser} = ftp:user(Pid, ?BAD_USER, ?FTP_PASS("")),
ok.
%%-------------------------------------------------------------------------
-pwd(doc) -> ["Test ftp:pwd/1 & ftp:lpwd/1"];
+pwd() ->
+ [{doc, "Test ftp:pwd/1 & ftp:lpwd/1"}].
pwd(Config0) ->
Config = set_state([reset], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{ok, PWD} = ftp:pwd(Pid),
{ok, PathLpwd} = ftp:lpwd(Pid),
PWD = id2ftp_result("", Config),
PathLpwd = id2ftp_result("", Config).
%%-------------------------------------------------------------------------
-cd(doc) -> ["Open an ftp connection, log on as anonymous ftp, and cd to a"
- "directory and to a non-existent directory."];
+cd() ->
+ ["Open an ftp connection, log on as anonymous ftp, and cd to a"
+ "directory and to a non-existent directory."].
cd(Config0) ->
Dir = "test",
Config = set_state([reset,{mkdir,Dir}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:cd(Pid, id2ftp(Dir,Config)),
{ok, PWD} = ftp:pwd(Pid),
ExpectedPWD = id2ftp_result(Dir, Config),
PWD = ExpectedPWD,
- {error, epath} = ftp:cd(Pid, ?BAD_DIR).
+ {error, epath} = ftp:cd(Pid, ?BAD_DIR),
+ ok.
%%-------------------------------------------------------------------------
-lcd(doc) ->
- ["Test api function ftp:lcd/2"];
+lcd() ->
+ [{doc, "Test api function ftp:lcd/2"}].
lcd(Config0) ->
Dir = "test",
Config = set_state([reset,{mkdir,Dir}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:lcd(Pid, id2ftp(Dir,Config)),
{ok, PWD} = ftp:lpwd(Pid),
ExpectedPWD = id2ftp_result(Dir, Config),
@@ -280,19 +306,20 @@ lcd(Config0) ->
{error, epath} = ftp:lcd(Pid, ?BAD_DIR).
%%-------------------------------------------------------------------------
-ls(doc) -> ["Open an ftp connection; ls the current directory, and the "
- "\"test\" directory. We assume that ls never fails, since "
- "it's output is meant to be read by humans. "];
+ls() ->
+ [{doc, "Open an ftp connection; ls the current directory, and the "
+ "\"test\" directory. We assume that ls never fails, since "
+ "it's output is meant to be read by humans. "}].
ls(Config0) ->
Config = set_state([reset,{mkdir,"test"}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{ok, _R1} = ftp:ls(Pid),
{ok, _R2} = ftp:ls(Pid, id2ftp("test",Config)),
%% neither nlist nor ls operates on a directory
%% they operate on a pathname, which *can* be a
%% directory, but can also be a filename or a group
%% of files (including wildcards).
- case ?config(wildcard_support, Config) of
+ case proplists:get_value(wildcard_support, Config) of
true ->
{ok, _R3} = ftp:ls(Pid, id2ftp("te*",Config));
_ ->
@@ -300,20 +327,21 @@ ls(Config0) ->
end.
%%-------------------------------------------------------------------------
-nlist(doc) -> ["Open an ftp connection; nlist the current directory, and the "
+nlist() ->
+ [{doc,"Open an ftp connection; nlist the current directory, and the "
"\"test\" directory. Nlist does not behave consistenly over "
"operating systems. On some it is an error to have an empty "
- "directory."];
+ "directory."}].
nlist(Config0) ->
Config = set_state([reset,{mkdir,"test"}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{ok, _R1} = ftp:nlist(Pid),
{ok, _R2} = ftp:nlist(Pid, id2ftp("test",Config)),
%% neither nlist nor ls operates on a directory
%% they operate on a pathname, which *can* be a
%% directory, but can also be a filename or a group
%% of files (including wildcards).
- case ?config(wildcard_support, Config) of
+ case proplists:get_value(wildcard_support, Config) of
true ->
{ok, _R3} = ftp:nlist(Pid, id2ftp("te*",Config));
_ ->
@@ -321,141 +349,176 @@ nlist(Config0) ->
end.
%%-------------------------------------------------------------------------
-rename(doc) -> ["Rename a file."];
+rename() ->
+ [{doc, "Rename a file."}].
rename(Config0) ->
Contents = <<"ftp_SUITE test ...">>,
OldFile = "old.txt",
NewFile = "new.txt",
Config = set_state([reset,{mkfile,OldFile,Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:rename(Pid,
id2ftp(OldFile,Config),
id2ftp(NewFile,Config)),
true = (chk_file(NewFile,Contents,Config)
- and chk_no_file([OldFile],Config)).
-
+ and chk_no_file([OldFile],Config)),
+ {error,epath} = ftp:rename(Pid,
+ id2ftp("non_existing_file",Config),
+ id2ftp(NewFile,Config)),
+ ok.
%%-------------------------------------------------------------------------
-send(doc) -> ["Transfer a file with ftp using send/2."];
+send() ->
+ [{doc, "Transfer a file with ftp using send/2."}].
send(Config0) ->
Contents = <<"ftp_SUITE test ...">>,
SrcDir = "data",
File = "file.txt",
Config = set_state([reset,{mkfile,[SrcDir,File],Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
-chk_no_file([File],Config),
-chk_file([SrcDir,File],Contents,Config),
+ chk_no_file([File],Config),
+ chk_file([SrcDir,File],Contents,Config),
ok = ftp:lcd(Pid, id2ftp(SrcDir,Config)),
ok = ftp:cd(Pid, id2ftp("",Config)),
ok = ftp:send(Pid, File),
+ chk_file(File, Contents, Config),
- chk_file(File, Contents, Config).
+ {error,epath} = ftp:send(Pid, "non_existing_file"),
+ ok.
%%-------------------------------------------------------------------------
-send_3(doc) -> ["Transfer a file with ftp using send/3."];
+send_3() ->
+ [{doc, "Transfer a file with ftp using send/3."}].
send_3(Config0) ->
Contents = <<"ftp_SUITE test ...">>,
Dir = "incoming",
File = "file.txt",
RemoteFile = "remfile.txt",
Config = set_state([reset,{mkfile,File,Contents},{mkdir,Dir}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:cd(Pid, id2ftp(Dir,Config)),
ok = ftp:lcd(Pid, id2ftp("",Config)),
ok = ftp:send(Pid, File, RemoteFile),
+ chk_file([Dir,RemoteFile], Contents, Config),
- chk_file([Dir,RemoteFile], Contents, Config).
+ {error,epath} = ftp:send(Pid, "non_existing_file", RemoteFile),
+ ok.
%%-------------------------------------------------------------------------
-send_bin(doc) -> ["Send a binary."];
+send_bin() ->
+ [{doc, "Send a binary."}].
send_bin(Config0) ->
BinContents = <<"ftp_SUITE test ...">>,
File = "file.txt",
Config = set_state([reset], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{error, enotbinary} = ftp:send_bin(Pid, "some string", id2ftp(File,Config)),
ok = ftp:send_bin(Pid, BinContents, id2ftp(File,Config)),
- chk_file(File, BinContents, Config).
+ chk_file(File, BinContents, Config),
+ {error, efnamena} = ftp:send_bin(Pid, BinContents, "/nothere"),
+ ok.
%%-------------------------------------------------------------------------
-send_chunk(doc) -> ["Send a binary using chunks."];
+send_chunk() ->
+ [{doc, "Send a binary using chunks."}].
send_chunk(Config0) ->
- Contents = <<"ftp_SUITE test ...">>,
+ Contents1 = <<"1: ftp_SUITE test ...">>,
+ Contents2 = <<"2: ftp_SUITE test ...">>,
File = "file.txt",
Config = set_state([reset,{mkdir,"incoming"}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:send_chunk_start(Pid, id2ftp(File,Config)),
+ {error, echunk} = ftp:send_chunk_start(Pid, id2ftp(File,Config)),
{error, echunk} = ftp:cd(Pid, "incoming"),
{error, enotbinary} = ftp:send_chunk(Pid, "some string"),
- ok = ftp:send_chunk(Pid, Contents),
- ok = ftp:send_chunk(Pid, Contents),
+ ok = ftp:send_chunk(Pid, Contents1),
+ ok = ftp:send_chunk(Pid, Contents2),
ok = ftp:send_chunk_end(Pid),
- chk_file(File, <<Contents/binary,Contents/binary>>, Config).
+ chk_file(File, <<Contents1/binary,Contents2/binary>>, Config),
+
+ {error, echunk} = ftp:send_chunk(Pid, Contents1),
+ {error, echunk} = ftp:send_chunk_end(Pid),
+ {error, efnamena} = ftp:send_chunk_start(Pid, "/"),
+ ok.
%%-------------------------------------------------------------------------
-delete(doc) -> ["Delete a file."];
+delete() ->
+ [{doc, "Delete a file."}].
delete(Config0) ->
Contents = <<"ftp_SUITE test ...">>,
File = "file.txt",
Config = set_state([reset,{mkfile,File,Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:delete(Pid, id2ftp(File,Config)),
- chk_no_file([File], Config).
+ chk_no_file([File], Config),
+ {error,epath} = ftp:delete(Pid, id2ftp(File,Config)),
+ ok.
%%-------------------------------------------------------------------------
-mkdir(doc) -> ["Make a remote directory."];
+mkdir() ->
+ [{doc, "Make a remote directory."}].
mkdir(Config0) ->
NewDir = "new_dir",
Config = set_state([reset], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:mkdir(Pid, id2ftp(NewDir,Config)),
- chk_dir([NewDir], Config).
+ chk_dir([NewDir], Config),
+ {error,epath} = ftp:mkdir(Pid, id2ftp(NewDir,Config)),
+ ok.
%%-------------------------------------------------------------------------
-rmdir(doc) -> ["Remove a directory."];
+rmdir() ->
+ [{doc, "Remove a directory."}].
rmdir(Config0) ->
Dir = "dir",
Config = set_state([reset,{mkdir,Dir}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:rmdir(Pid, id2ftp(Dir,Config)),
- chk_no_dir([Dir], Config).
+ chk_no_dir([Dir], Config),
+ {error,epath} = ftp:rmdir(Pid, id2ftp(Dir,Config)),
+ ok.
%%-------------------------------------------------------------------------
-append(doc) -> ["Append a local file twice to a remote file"];
+append() ->
+ [{doc, "Append a local file twice to a remote file"}].
append(Config0) ->
SrcFile = "f_src.txt",
DstFile = "f_dst.txt",
Contents = <<"ftp_SUITE test ...">>,
Config = set_state([reset,{mkfile,SrcFile,Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:append(Pid, id2ftp(SrcFile,Config), id2ftp(DstFile,Config)),
ok = ftp:append(Pid, id2ftp(SrcFile,Config), id2ftp(DstFile,Config)),
- chk_file(DstFile, <<Contents/binary,Contents/binary>>, Config).
+ chk_file(DstFile, <<Contents/binary,Contents/binary>>, Config),
+ {error,epath} = ftp:append(Pid, id2ftp("non_existing_file",Config), id2ftp(DstFile,Config)),
+ ok.
%%-------------------------------------------------------------------------
-append_bin(doc) -> ["Append a local file twice to a remote file using append_bin"];
+append_bin() ->
+ [{doc, "Append a local file twice to a remote file using append_bin"}].
append_bin(Config0) ->
DstFile = "f_dst.txt",
Contents = <<"ftp_SUITE test ...">>,
Config = set_state([reset], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:append_bin(Pid, Contents, id2ftp(DstFile,Config)),
ok = ftp:append_bin(Pid, Contents, id2ftp(DstFile,Config)),
chk_file(DstFile, <<Contents/binary,Contents/binary>>, Config).
%%-------------------------------------------------------------------------
-append_chunk(doc) -> ["Append chunks."];
+append_chunk() ->
+ [{doc, "Append chunks."}].
append_chunk(Config0) ->
File = "f_dst.txt",
Contents = [<<"ER">>,<<"LE">>,<<"RL">>],
Config = set_state([reset], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:append_chunk_start(Pid, id2ftp(File,Config)),
{error, enotbinary} = ftp:append_chunk(Pid, binary_to_list(lists:nth(1,Contents))),
ok = ftp:append_chunk(Pid,lists:nth(1,Contents)),
@@ -465,53 +528,62 @@ append_chunk(Config0) ->
chk_file(File, <<"ERLERL">>, Config).
%%-------------------------------------------------------------------------
-recv(doc) -> ["Receive a file using recv/2"];
+recv() ->
+ [{doc, "Receive a file using recv/2"}].
recv(Config0) ->
File = "f_dst.txt",
SrcDir = "a_dir",
Contents = <<"ftp_SUITE test ...">>,
Config = set_state([reset, {mkfile,[SrcDir,File],Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:cd(Pid, id2ftp(SrcDir,Config)),
ok = ftp:lcd(Pid, id2ftp("",Config)),
ok = ftp:recv(Pid, File),
- chk_file(File, Contents, Config).
+ chk_file(File, Contents, Config),
+ {error,epath} = ftp:recv(Pid, "non_existing_file"),
+ ok.
%%-------------------------------------------------------------------------
-recv_3(doc) -> ["Receive a file using recv/3"];
+recv_3() ->
+ [{doc,"Receive a file using recv/3"}].
recv_3(Config0) ->
DstFile = "f_src.txt",
SrcFile = "f_dst.txt",
Contents = <<"ftp_SUITE test ...">>,
Config = set_state([reset, {mkfile,SrcFile,Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:cd(Pid, id2ftp("",Config)),
ok = ftp:recv(Pid, SrcFile, id2abs(DstFile,Config)),
chk_file(DstFile, Contents, Config).
%%-------------------------------------------------------------------------
-recv_bin(doc) -> ["Receive a file as a binary."];
+recv_bin() ->
+ [{doc, "Receive a file as a binary."}].
recv_bin(Config0) ->
File = "f_dst.txt",
Contents = <<"ftp_SUITE test ...">>,
Config = set_state([reset, {mkfile,File,Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{ok,Received} = ftp:recv_bin(Pid, id2ftp(File,Config)),
- find_diff(Received, Contents).
+ find_diff(Received, Contents),
+ {error,epath} = ftp:recv_bin(Pid, id2ftp("non_existing_file",Config)),
+ ok.
%%-------------------------------------------------------------------------
-recv_chunk(doc) -> ["Receive a file using chunk-wise."];
+recv_chunk() ->
+ [{doc, "Receive a file using chunk-wise."}].
recv_chunk(Config0) ->
File = "big_file.txt",
Contents = list_to_binary( lists:duplicate(1000, lists:seq(0,255)) ),
Config = set_state([reset, {mkfile,File,Contents}], Config0),
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
{{error, "ftp:recv_chunk_start/2 not called"},_} = recv_chunk(Pid, <<>>),
ok = ftp:recv_chunk_start(Pid, id2ftp(File,Config)),
{ok, ReceivedContents, _Ncunks} = recv_chunk(Pid, <<>>),
find_diff(ReceivedContents, Contents).
-recv_chunk(Pid, Acc) -> recv_chunk(Pid, Acc, 0).
+recv_chunk(Pid, Acc) ->
+ recv_chunk(Pid, Acc, 0).
recv_chunk(Pid, Acc, N) ->
case ftp:recv_chunk(Pid) of
@@ -521,18 +593,18 @@ recv_chunk(Pid, Acc, N) ->
end.
%%-------------------------------------------------------------------------
-type(doc) -> ["Test that we can change btween ASCCI and binary transfer mode"];
+type() ->
+ [{doc,"Test that we can change btween ASCCI and binary transfer mode"}].
type(Config) ->
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
ok = ftp:type(Pid, ascii),
ok = ftp:type(Pid, binary),
ok = ftp:type(Pid, ascii),
{error, etype} = ftp:type(Pid, foobar).
%%-------------------------------------------------------------------------
-quote(doc) -> [""];
quote(Config) ->
- Pid = ?config(ftp, Config),
+ Pid = proplists:get_value(ftp, Config),
["257 \""++_Rest] = ftp:quote(Pid, "pwd"), %% 257
[_| _] = ftp:quote(Pid, "help"),
%% This negativ test causes some ftp servers to hang. This test
@@ -541,48 +613,154 @@ quote(Config) ->
%% = ftp:quote(Pid, "list"),
ok.
+%%-------------------------------------------------------------------------
+progress_report_send() ->
+ [{doc, "Test the option progress for ftp:send/[2,3]"}].
+progress_report_send(Config) when is_list(Config) ->
+ ReportPid =
+ spawn_link(?MODULE, progress_report_receiver_init, [self(), 1]),
+ send(Config),
+ receive
+ {ReportPid, ok} ->
+ ok
+ end.
+
+%%-------------------------------------------------------------------------
+progress_report_recv() ->
+ [{doc, "Test the option progress for ftp:recv/[2,3]"}].
+progress_report_recv(Config) when is_list(Config) ->
+ ReportPid =
+ spawn_link(?MODULE, progress_report_receiver_init, [self(), 3]),
+ recv(Config),
+ receive
+ {ReportPid, ok} ->
+ ok
+ end.
+
+%%-------------------------------------------------------------------------
+
+not_owner() ->
+ [{doc, "Test what happens if a process that not owns the connection tries "
+ "to use it"}].
+not_owner(Config) when is_list(Config) ->
+ Pid = proplists:get_value(ftp, Config),
+
+ Parent = self(),
+ OtherPid = spawn_link(
+ fun() ->
+ {error, not_connection_owner} = ftp:pwd(Pid),
+ ftp:close(Pid),
+ Parent ! {self(), ok}
+ end),
+ receive
+ {OtherPid, ok} ->
+ {ok, _} = ftp:pwd(Pid)
+ end.
+
+%%-------------------------------------------------------------------------
+
+
+unexpected_call()->
+ [{doc, "Test that behaviour of the ftp process if the api is abused"}].
+unexpected_call(Config) when is_list(Config) ->
+ Flag = process_flag(trap_exit, true),
+ Pid = proplists:get_value(ftp, Config),
+
+ %% Serious programming fault, connetion will be shut down
+ case (catch gen_server:call(Pid, {self(), foobar, 10}, infinity)) of
+ {error, {connection_terminated, 'API_violation'}} ->
+ ok;
+ Unexpected1 ->
+ exit({unexpected_result, Unexpected1})
+ end,
+ ct:sleep(500),
+ undefined = process_info(Pid, status),
+ process_flag(trap_exit, Flag).
%%-------------------------------------------------------------------------
-ip_v6_disabled(doc) -> ["Test ipv4 command PORT"];
-ip_v6_disabled(_Config) ->
- %%% FIXME!!!! What is this???
- ok.%% send(Config).
+unexpected_cast()->
+ [{doc, "Test that behaviour of the ftp process if the api is abused"}].
+unexpected_cast(Config) when is_list(Config) ->
+ Flag = process_flag(trap_exit, true),
+ Pid = proplists:get_value(ftp, Config),
+ %% Serious programming fault, connetion will be shut down
+ gen_server:cast(Pid, {self(), foobar, 10}),
+ ct:sleep(500),
+ undefined = process_info(Pid, status),
+ process_flag(trap_exit, Flag).
%%-------------------------------------------------------------------------
-%% big_one(doc) ->
-%% ["Create a local file and transfer it to the remote host into the "
-%% "the \"incoming\" directory, remove "
-%% "the local file. Then open a new connection; cd to \"incoming\", "
-%% "lcd to the private directory; receive the file; delete the "
-%% "remote file; close connection; check that received file is in "
-%% "the correct directory; cleanup." ];
-%% big_one(Config) ->
-%% Pid = ?config(ftp, Config),
-%% do_recv(Pid, Config).
-%% do_recv(Pid, Config) ->
-%% PrivDir = ?config(priv_dir, Config),
-%% File = ?config(file, Config),
-%% Newfile = ?config(new_file, Config),
-%% AbsFile = filename:absname(File, PrivDir),
-%% Contents = "ftp_SUITE:recv test ...",
-%% ok = file:write_file(AbsFile, list_to_binary(Contents)),
-%% ok = ftp:cd(Pid, "incoming"),
-%% ftp:delete(Pid, File), % reset
-%% ftp:lcd(Pid, PrivDir),
-%% ok = ftp:send(Pid, File),
-%% ok = file:delete(AbsFile), % cleanup
-%% test_server:sleep(100),
-%% ok = ftp:lcd(Pid, PrivDir),
-%% ok = ftp:recv(Pid, File),
-%% {ok, Files} = file:list_dir(PrivDir),
-%% true = lists:member(File, Files),
-%% ok = file:delete(AbsFile), % cleanup
-%% ok = ftp:recv(Pid, File, Newfile),
-%% ok = ftp:delete(Pid, File), % cleanup
-%% ok.
+unexpected_bang()->
+ [{doc, "Test that connection ignores unexpected bang"}].
+unexpected_bang(Config) when is_list(Config) ->
+ Flag = process_flag(trap_exit, true),
+ Pid = proplists:get_value(ftp, Config),
+ %% Could be an innocent misstake the connection lives.
+ Pid ! foobar,
+ ct:sleep(500),
+ {status, _} = process_info(Pid, status),
+ process_flag(trap_exit, Flag).
+
+%%-------------------------------------------------------------------------
+
+clean_shutdown() ->
+ [{doc, "Test that owning process that exits with reason "
+ "'shutdown' does not cause an error message. OTP 6035"}].
+
+clean_shutdown(Config) ->
+ Parent = self(),
+ HelperPid = spawn(
+ fun() ->
+ ftp__open(Config, [verbose]),
+ Parent ! ok,
+ receive
+ nothing -> ok
+ end
+ end),
+ receive
+ ok ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ LogFile = filename:join([PrivDir,"ticket_6035.log"]),
+ error_logger:logfile({open, LogFile}),
+ exit(HelperPid, shutdown),
+ timer:sleep(2000),
+ error_logger:logfile(close),
+ case is_error_report_6035(LogFile) of
+ true -> ok;
+ false -> {fail, "Bad logfile"}
+ end
+ end.
+%%%----------------------------------------------------------------
+%%% Error codes not tested elsewhere
+error_elogin(Config0) ->
+ Dir = "test",
+ OldFile = "old.txt",
+ NewFile = "new.txt",
+ SrcDir = "data",
+ File = "file.txt",
+ Config = set_state([reset,
+ {mkdir,Dir},
+ {mkfile,OldFile,<<"Contents..">>},
+ {mkfile,[SrcDir,File],<<"Contents..">>}], Config0),
+
+ Pid = proplists:get_value(ftp, Config),
+ ok = ftp:lcd(Pid, id2ftp(SrcDir,Config)),
+ {error,elogin} = ftp:send(Pid, File),
+ ok = ftp:lcd(Pid, id2ftp("",Config)),
+ {error,elogin} = ftp:pwd(Pid),
+ {error,elogin} = ftp:cd(Pid, id2ftp(Dir,Config)),
+ {error,elogin} = ftp:rename(Pid,
+ id2ftp(OldFile,Config),
+ id2ftp(NewFile,Config)),
+ ok.
+
+error_ehost(_Config) ->
+ {error, ehost} = ftp:open("nohost.nodomain"),
+ ok.
+
%%--------------------------------------------------------------------
%% Internal functions -----------------------------------------------
%%--------------------------------------------------------------------
@@ -676,13 +854,9 @@ chk_no_dir(PathList, Config) ->
ct:fail("Unexpected error for ~p: ~p",[Path,Error])
end.
-
-%%--------------------------------------------------------------------
%%--------------------------------------------------------------------
-%% find a suitable ftpd
-%%
find_executable(Config) ->
- FTPservers = case ?config(ftpservers,Config) of
+ FTPservers = case proplists:get_value(ftpservers,Config) of
undefined -> ?default_ftp_servers;
L -> L
end,
@@ -694,11 +868,9 @@ find_executable(Config) ->
not_available({Name,_StartCmd,_ChkUp,_StopCommand,_ConfigUpd,_Host,_Port}) ->
os:find_executable(Name) == false.
-%%--------------------------------------------------------------------
-%% start/stop of ftpd
-%%
+
start_ftpd(Config) ->
- {Name,StartCmd,_ChkUp,_StopCommand,ConfigRewrite,Host,Port} = ?config(ftpd_data, Config),
+ {Name,StartCmd,_ChkUp,_StopCommand,ConfigRewrite,Host,Port} = proplists:get_value(ftpd_data, Config),
case StartCmd(Config) of
{ok,StartResult} ->
[{ftpd_host,Host},
@@ -709,38 +881,31 @@ start_ftpd(Config) ->
end.
stop_ftpd(Config) ->
- {_Name,_StartCmd,_ChkUp,StopCommand,_ConfigUpd,_Host,_Port} = ?config(ftpd_data, Config),
- StopCommand(?config(ftpd_start_result,Config)).
+ {_Name,_StartCmd,_ChkUp,StopCommand,_ConfigUpd,_Host,_Port} = proplists:get_value(ftpd_data, Config),
+ StopCommand(proplists:get_value(ftpd_start_result,Config)).
ps_ftpd(Config) ->
- {_Name,_StartCmd,ChkUp,_StopCommand,_ConfigUpd,_Host,_Port} = ?config(ftpd_data, Config),
- ct:log( ChkUp(?config(ftpd_start_result,Config)) ).
+ {_Name,_StartCmd,ChkUp,_StopCommand,_ConfigUpd,_Host,_Port} = proplists:get_value(ftpd_data, Config),
+ ct:log( ChkUp(proplists:get_value(ftpd_start_result,Config)) ).
ftpd_running(Config) ->
- {_Name,_StartCmd,ChkUp,_StopCommand,_ConfigUpd,_Host,_Port} = ?config(ftpd_data, Config),
- ChkUp(?config(ftpd_start_result,Config)).
+ {_Name,_StartCmd,ChkUp,_StopCommand,_ConfigUpd,_Host,_Port} = proplists:get_value(ftpd_data, Config),
+ ChkUp(proplists:get_value(ftpd_start_result,Config)).
-%%--------------------------------------------------------------------
-%% start/stop of ftpc
-%%
ftp__open(Config, Options) ->
- Host = ?config(ftpd_host,Config),
- Port = ?config(ftpd_port,Config),
+ Host = proplists:get_value(ftpd_host,Config),
+ Port = proplists:get_value(ftpd_port,Config),
ct:log("Host=~p, Port=~p",[Host,Port]),
{ok,Pid} = ftp:open(Host, [{port,Port} | Options]),
[{ftp,Pid}|Config].
ftp__close(Config) ->
- ok = ftp:close(?config(ftp,Config)),
+ ok = ftp:close(proplists:get_value(ftp,Config)),
Config.
-%%--------------------------------------------------------------------
-%%
split(Cs) -> string:tokens(Cs, "\r\n").
-%%--------------------------------------------------------------------
-%%
find_diff(Bin1, Bin2) ->
case find_diff(Bin1, Bin2, 1) of
{error, {diff,Pos,RC,LC}} ->
@@ -753,15 +918,14 @@ find_diff(Bin1, Bin2) ->
find_diff(A, A, _) -> true;
find_diff(<<H,T1/binary>>, <<H,T2/binary>>, Pos) -> find_diff(T1, T2, Pos+1);
find_diff(RC, LC, Pos) -> {error, {diff, Pos, RC, LC}}.
-%%--------------------------------------------------------------------
-%%
+
set_state(Ops, Config) when is_list(Ops) -> lists:foldl(fun set_state/2, Config, Ops);
set_state(reset, Config) ->
rm('*', id2abs("",Config)),
- PrivDir = ?config(priv_dir,Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
file:set_cwd(PrivDir),
- ftp:lcd(?config(ftp,Config),PrivDir),
+ ftp:lcd(proplists:get_value(ftp,Config),PrivDir),
set_state({mkdir,""},Config);
set_state({mkdir,Id}, Config) ->
Abs = id2abs(Id, Config),
@@ -787,7 +951,6 @@ mk_path(F, Pfx) ->
AbsName
end.
-
rm('*', Pfx) ->
{ok,Fs} = file:list_dir(Pfx),
lists:foreach(fun(F) -> rm(F, Pfx) end, Fs);
@@ -805,17 +968,88 @@ rm(F, Pfx) ->
ok
end.
-%%--------------------------------------------------------------------
-%%
-
-id2abs(Id, Conf) -> filename:join(?config(priv_dir,Conf),ids(Id)).
-id2ftp(Id, Conf) -> (?config(id2ftp,Conf))(ids(Id)).
-id2ftp_result(Id, Conf) -> (?config(id2ftp_result,Conf))(ids(Id)).
+id2abs(Id, Conf) -> filename:join(proplists:get_value(priv_dir,Conf),ids(Id)).
+id2ftp(Id, Conf) -> (proplists:get_value(id2ftp,Conf))(ids(Id)).
+id2ftp_result(Id, Conf) -> (proplists:get_value(id2ftp_result,Conf))(ids(Id)).
ids([[_|_]|_]=Ids) -> filename:join(Ids);
ids(Id) -> Id.
-is_expected_absName(Id, File, Conf) -> File = (?config(id2abs,Conf))(Id).
-is_expected_ftpInName(Id, File, Conf) -> File = (?config(id2ftp,Conf))(Id).
-is_expected_ftpOutName(Id, File, Conf) -> File = (?config(id2ftp_result,Conf))(Id).
+is_expected_absName(Id, File, Conf) -> File = (proplists:get_value(id2abs,Conf))(Id).
+is_expected_ftpInName(Id, File, Conf) -> File = (proplists:get_value(id2ftp,Conf))(Id).
+is_expected_ftpOutName(Id, File, Conf) -> File = (proplists:get_value(id2ftp_result,Conf))(Id).
+
+
+%%%----------------------------------------------------------------
+%%% Help functions for the option '{progress,Progress}'
+%%%
+
+%%%----------------
+%%% Callback:
+
+progress(#progress{} = P, _File, {file_size, Total} = M) ->
+ ct:pal("Progress: ~p",[M]),
+ progress_report_receiver ! start,
+ P#progress{total = Total};
+
+progress(#progress{current = Current} = P, _File, {transfer_size, 0} = M) ->
+ ct:pal("Progress: ~p",[M]),
+ progress_report_receiver ! finish,
+ case P#progress.total of
+ unknown -> P;
+ Current -> P;
+ Total -> ct:fail({error, {progress, {total,Total}, {current,Current}}}),
+ P
+ end;
+
+progress(#progress{current = Current} = P, _File, {transfer_size, Size} = M) ->
+ ct:pal("Progress: ~p",[M]),
+ progress_report_receiver ! update,
+ P#progress{current = Current + Size};
+
+progress(P, _File, M) ->
+ ct:pal("Progress **** Strange: ~p",[M]),
+ P.
+
+
+%%%----------------
+%%% Help process that counts the files transferred:
+
+progress_report_receiver_init(Parent, N) ->
+ register(progress_report_receiver, self()),
+ progress_report_receiver_expect_N_files(Parent, N).
+
+progress_report_receiver_expect_N_files(_Parent, 0) ->
+ ct:pal("progress_report got all files!", []);
+progress_report_receiver_expect_N_files(Parent, N) ->
+ ct:pal("progress_report expects ~p more files",[N]),
+ receive
+ start -> ok
+ end,
+ progress_report_receiver_loop(Parent, N-1).
+
+
+progress_report_receiver_loop(Parent, N) ->
+ ct:pal("progress_report expect update | finish. N = ~p",[N]),
+ receive
+ update ->
+ ct:pal("progress_report got update",[]),
+ progress_report_receiver_loop(Parent, N);
+ finish ->
+ ct:pal("progress_report got finish, send ~p to ~p",[{self(),ok}, Parent]),
+ Parent ! {self(), ok},
+ progress_report_receiver_expect_N_files(Parent, N)
+ end.
+
+%%%----------------------------------------------------------------
+%%% Help functions for bug OTP-6035
+
+is_error_report_6035(LogFile) ->
+ case file:read_file(LogFile) of
+ {ok, Bin} ->
+ nomatch =/= binary:match(Bin, <<"=ERROR REPORT====">>);
+ _ ->
+ false
+ end.
+
diff --git a/lib/inets/test/ftp_format_SUITE.erl b/lib/inets/test/ftp_format_SUITE.erl
index cbe12e566b..a33b31f46f 100644
--- a/lib/inets/test/ftp_format_SUITE.erl
+++ b/lib/inets/test/ftp_format_SUITE.erl
@@ -24,18 +24,13 @@
-include_lib("common_test/include/ct.hrl").
-include("ftp_internal.hrl").
-%% Test server specific exports
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,
- init_per_testcase/2, end_per_testcase/2]).
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
-%% Test cases must be exported.
--export([ ftp_150/1,
- ftp_200/1, ftp_220/1, ftp_226/1, ftp_257/1, ftp_331/1, ftp_425/1,
- ftp_other_status_codes/1, ftp_multiple_lines/1,
- ftp_multipel_ctrl_messages/1, format_error/1]).
-
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds,5}}
+ ].
all() ->
[{group, ftp_response}, format_error].
@@ -60,23 +55,16 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_, Config) ->
- Dog = test_server:timetrap(?t:minutes(1)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- [{watchdog, Dog} | NewConfig].
-
-end_per_testcase(_, Config) ->
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_, _) ->
ok.
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
-ftp_150(doc) ->
- ["Especially check that respons can be devided in a random place."];
-ftp_150(suite) ->
- [];
+ftp_150() ->
+ [{doc, "Especially check that respons can be devided in a random place."}].
ftp_150(Config) when is_list(Config) ->
FtpResponse = ["150 ASCII data conn", "ection for /bin/ls ",
"(134.138.177", ".89,50434) (0 bytes).\r\n"],
@@ -84,14 +72,11 @@ ftp_150(Config) when is_list(Config) ->
"150 ASCII data connection for /bin/ls "
"(134.138.177.89,50434) (0 bytes).\r\n" = Msg =
parse(ftp_response, parse_lines, [[], start], FtpResponse),
- {pos_prel, _} = ftp_response:interpret(Msg),
- ok.
-
-ftp_200(doc) ->
- ["Especially check that respons can be devided after the first status "
- "code character and in the end delimiter."];
-ftp_200(suite) ->
- [];
+ {pos_prel, _} = ftp_response:interpret(Msg).
+
+ftp_200() ->
+ [{doc, "Especially check that respons can be devided after the first status "
+ "code character and in the end delimiter."}].
ftp_200(Config) when is_list(Config) ->
FtpResponse = ["2", "00 PORT command successful.", [?CR], [?LF]],
@@ -100,11 +85,9 @@ ftp_200(Config) when is_list(Config) ->
{pos_compl, _} = ftp_response:interpret(Msg),
ok.
-ftp_220(doc) ->
- ["Especially check that respons can be devided after the "
- "first with space "];
-ftp_220(suite) ->
- [];
+ftp_220() ->
+ [{doc, "Especially check that respons can be devided after the "
+ "first with space "}].
ftp_220(Config) when is_list(Config) ->
FtpResponse = ["220 ","fingon FTP server (SunOS 5.8) ready.\r\n"],
@@ -113,11 +96,9 @@ ftp_220(Config) when is_list(Config) ->
{pos_compl, _} = ftp_response:interpret(Msg),
ok.
-ftp_226(doc) ->
- ["Especially check that respons can be devided after second status code"
- " character and in the end delimiter."];
-ftp_226(suite) ->
- [];
+ftp_226() ->
+ [{doc, "Especially check that respons can be devided after second status code"
+ " character and in the end delimiter."}].
ftp_226(Config) when is_list(Config) ->
FtpResponse = ["22" "6 Transfer complete.\r", [?LF]],
@@ -126,10 +107,8 @@ ftp_226(Config) when is_list(Config) ->
{pos_compl, _} = ftp_response:interpret(Msg),
ok.
-ftp_257(doc) ->
- ["Especially check that quoted chars do not cause a problem."];
-ftp_257(suite) ->
- [];
+ftp_257() ->
+ [{doc, "Especially check that quoted chars do not cause a problem."}].
ftp_257(Config) when is_list(Config) ->
FtpResponse = ["257 \"/\" is current directory.\r\n"],
@@ -138,11 +117,9 @@ ftp_257(Config) when is_list(Config) ->
{pos_compl, _} = ftp_response:interpret(Msg),
ok.
-ftp_331(doc) ->
- ["Especially check that respons can be devided after the third status "
- " status code character."];
-ftp_331(suite) ->
- [];
+ftp_331() ->
+ [{doc, "Especially check that respons can be devided after the third status "
+ " status code character."}].
ftp_331(Config) when is_list(Config) ->
%% Brake before white space after code
FtpResponse =
@@ -153,10 +130,8 @@ ftp_331(Config) when is_list(Config) ->
{pos_interm, _} = ftp_response:interpret(Msg),
ok.
-ftp_425(doc) ->
- ["Especially check a message that was received in only one part."];
-ftp_425(suite) ->
- [];
+ftp_425() ->
+ [{doc, "Especially check a message that was received in only one part."}].
ftp_425(Config) when is_list(Config) ->
FtpResponse =
["425 Can't build data connection: Connection refused.\r\n"],
@@ -166,10 +141,8 @@ ftp_425(Config) when is_list(Config) ->
{trans_neg_compl, _} = ftp_response:interpret(Msg),
ok.
-ftp_multiple_lines(doc) ->
- ["Especially check multiple lines devided in significant places"];
-ftp_multiple_lines(suite) ->
- [];
+ftp_multiple_lines() ->
+ [{doc, "Especially check multiple lines devided in significant places"}].
ftp_multiple_lines(Config) when is_list(Config) ->
FtpResponse = ["21", "4","-The",
" following commands are recognized:\r\n"
@@ -247,13 +220,11 @@ ftp_multiple_lines(Config) when is_list(Config) ->
FtpResponse2),
ok.
-ftp_other_status_codes(doc) ->
- ["Check that other valid status codes, than the ones above, are handled"
+ftp_other_status_codes() ->
+ [{doc, "Check that other valid status codes, than the ones above, are handled"
"by ftp_response:interpret/1. Note there are som ftp status codes"
"that will not be received with the current ftp instruction support,"
- "they are not included here."];
-ftp_other_status_codes(suite) ->
- [];
+ "they are not included here."}].
ftp_other_status_codes(Config) when is_list(Config) ->
%% 1XX
@@ -282,18 +253,16 @@ ftp_other_status_codes(Config) when is_list(Config) ->
{perm_neg_compl, _ } = ftp_response:interpret("501 Foobar\r\n"),
{perm_neg_compl, _ } = ftp_response:interpret("503 Foobar\r\n"),
{perm_neg_compl, _ } = ftp_response:interpret("504 Foobar\r\n"),
- {perm_neg_compl, _ } = ftp_response:interpret("530 Foobar\r\n"),
+ {elogin, _ } = ftp_response:interpret("530 Foobar\r\n"),
{perm_neg_compl, _ } = ftp_response:interpret("532 Foobar\r\n"),
{epath, _ } = ftp_response:interpret("550 Foobar\r\n"),
{epnospc, _ } = ftp_response:interpret("552 Foobar\r\n"),
{efnamena, _ } = ftp_response:interpret("553 Foobar\r\n"),
ok.
-ftp_multipel_ctrl_messages(doc) ->
- ["The ftp server may send more than one control message as a reply,"
- "check that they are handled one at the time."];
-ftp_multipel_ctrl_messages(suite) ->
- [];
+ftp_multipel_ctrl_messages() ->
+ [{doc, "The ftp server may send more than one control message as a reply,"
+ "check that they are handled one at the time."}].
ftp_multipel_ctrl_messages(Config) when is_list(Config) ->
FtpResponse = ["200 PORT command successful.\r\n200 Foobar\r\n"],
@@ -306,10 +275,6 @@ ftp_multipel_ctrl_messages(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-format_error(doc) ->
- [""];
-format_error(suite) ->
- [];
format_error(Config) when is_list(Config) ->
"Synchronisation error during chunk sending." =
ftp:formaterror(echunk),
@@ -346,7 +311,7 @@ parse(Module, Function, [AccLines, StatusCode], [Data | Rest]) ->
{continue, {NewData, NewAccLines, NewStatusCode}} ->
case Rest of
[] ->
- test_server:fail({wrong_input, Data, Rest});
+ ct:fail({wrong_input, Data, Rest});
[_ | _] ->
parse(Module, Function, [NewAccLines, NewStatusCode],
[binary_to_list(NewData) ++ hd(Rest) | tl(Rest)])
diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl
deleted file mode 100644
index 0f82b1c1c3..0000000000
--- a/lib/inets/test/ftp_suite_lib.erl
+++ /dev/null
@@ -1,1695 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2016. All Rights Reserved.
-%%
-%% Licensed under the Apache License, Version 2.0 (the "License");
-%% you may not use this file except in compliance with the License.
-%% You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-
--module(ftp_suite_lib).
-
-
--include_lib("common_test/include/ct.hrl").
--include("inets_test_lib.hrl").
-
-%% Test server specific exports
-% -export([init_per_testcase/2, end_per_testcase/2]).
-
--compile(export_all).
-
-
--record(progress, {
- current = 0,
- total
- }).
-
-
-
--define(FTP_USER, "anonymous").
--define(FTP_PASS, passwd()).
--define(FTP_PORT, 21).
-
--define(BAD_HOST, "badhostname").
--define(BAD_USER, "baduser").
--define(BAD_DIR, "baddirectory").
-
--ifdef(ftp_debug_client).
--define(ftp_open(Host, Flags),
- do_ftp_open(Host, [{debug, debug},
- {timeout, timer:seconds(15)} | Flags])).
--else.
--ifdef(ftp_trace_client).
--define(ftp_open(Host, Flags),
- do_ftp_open(Host, [{debug, trace},
- {timeout, timer:seconds(15)} | Flags])).
--else.
--define(ftp_open(Host, Flags),
- do_ftp_open(Host, [{verbose, true},
- {timeout, timer:seconds(15)} | Flags])).
--endif.
--endif.
-
-%% -- Tickets --
-
-tickets(doc) ->
- "Test cases for reported bugs";
-tickets(suite) ->
- [ticket_6035].
-
-%% --
-
-ftpd_init(FtpdTag, Config) ->
- %% Get the host name(s) of FTP server
- Hosts =
- case ct:get_config(ftpd_hosts) of
- undefined ->
- ftpd_hosts(data_dir(Config));
- H ->
- H
- end,
- p("ftpd_init -> "
- "~n Hosts: ~p"
- "~n Config: ~p"
- "~n FtpdTag: ~p", [Hosts, Config, FtpdTag]),
- %% Get the first host that actually have a running FTP server
- case lists:keysearch(FtpdTag, 1, Hosts) of
- {value, {_, TagHosts}} when is_list(TagHosts) ->
- inets:start(),
- case (catch get_ftpd_host(TagHosts)) of
- {ok, Host} ->
- inets:stop(),
- [{ftp_remote_host, Host}|Config];
- _ ->
- inets:stop(),
- Reason = lists:flatten(
- io_lib:format("Could not find a valid "
- "FTP server for ~p (~p)",
- [FtpdTag, TagHosts])),
- {skip, Reason}
- end;
- _ ->
- Reason = lists:flatten(
- io_lib:format("No host(s) running FTPD server "
- "for ~p", [FtpdTag])),
- {skip, Reason}
- end.
-
-ftpd_fin(Config) ->
- lists:keydelete(ftp_remote_host, 1, Config).
-
-get_ftpd_host([]) ->
- {error, no_host};
-get_ftpd_host([Host|Hosts]) ->
- p("get_ftpd_host -> entry with"
- "~n Host: ~p"
- "~n", [Host]),
- case (catch ftp:open(Host, [{port, ?FTP_PORT}, {timeout, 20000}])) of
- {ok, Pid} ->
- (catch ftp:close(Pid)),
- {ok, Host};
- _ ->
- get_ftpd_host(Hosts)
- end.
-
-
-%%--------------------------------------------------------------------
-
-dirty_select_ftpd_host(Config) ->
- Hosts =
- case ct:get_config(ftpd_hosts) of
- undefined ->
- ftpd_hosts(data_dir(Config));
- H ->
- H
- end,
- dirty_select_ftpd_host2(Hosts).
-
-dirty_select_ftpd_host2([]) ->
- throw({error, not_found});
-dirty_select_ftpd_host2([{PlatformTag, Hosts} | PlatformHosts]) ->
- case dirty_select_ftpd_host3(Hosts) of
- none ->
- dirty_select_ftpd_host2(PlatformHosts);
- {ok, Host} ->
- {PlatformTag, Host}
- end.
-
-dirty_select_ftpd_host3([]) ->
- none;
-dirty_select_ftpd_host3([Host|Hosts]) when is_list(Host) ->
- case dirty_select_ftpd_host4(Host) of
- true ->
- {ok, Host};
- false ->
- dirty_select_ftpd_host3(Hosts)
- end;
-dirty_select_ftpd_host3([_|Hosts]) ->
- dirty_select_ftpd_host3(Hosts).
-
-%% This is a very simple and dirty test that there is a
-%% (FTP) deamon on the other end.
-dirty_select_ftpd_host4(Host) ->
- Port = 21,
- IpFam = inet,
- Opts = [IpFam, binary, {packet, 0}, {active, false}],
- Timeout = ?SECS(5),
- case gen_tcp:connect(Host, Port, Opts, Timeout) of
- {ok, Sock} ->
- gen_tcp:close(Sock),
- true;
- _Error ->
- false
- end.
-
-
-%%--------------------------------------------------------------------
-
-test_filenames() ->
- {ok, Host} = inet:gethostname(),
- File = Host ++ "_ftp_test.txt",
- NewFile = "new_" ++ File,
- {File, NewFile}.
-
-%%--------------------------------------------------------------------
-%% Function: init_per_testcase(Case, Config) -> Config
-%% 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.
-%%
-%% Description: Initiation before each test case
-%%
-%% Note: This function is free to add any key/value pairs to the Config
-%% variable, but should NOT alter/remove any existing entries.
-%%--------------------------------------------------------------------
-init_per_testcase(Case, Config)
- when (Case =:= open) orelse
- (Case =:= open_port) ->
- put(ftp_testcase, Case),
- io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE, Case]),
- inets:start(),
- NewConfig = data_dir(Config),
- watch_dog(NewConfig);
-
-init_per_testcase(Case, Config) ->
- put(ftp_testcase, Case),
- do_init_per_testcase(Case, Config).
-
-do_init_per_testcase(Case, Config)
- when (Case =:= passive_user) ->
- io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE,Case]),
- inets:start(),
- NewConfig = close_connection(watch_dog(Config)),
- Host = ftp_host(Config),
- case (catch ?ftp_open(Host, [{mode, passive}])) of
- {ok, Pid} ->
- [{ftp, Pid} | data_dir(NewConfig)];
- {skip, _} = SKIP ->
- SKIP
- end;
-
-do_init_per_testcase(Case, Config)
- when (Case =:= active_user) ->
- io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE, Case]),
- inets:start(),
- NewConfig = close_connection(watch_dog(Config)),
- Host = ftp_host(Config),
- case (catch ?ftp_open(Host, [{mode, active}])) of
- {ok, Pid} ->
- [{ftp, Pid} | data_dir(NewConfig)];
- {skip, _} = SKIP ->
- SKIP
- end;
-
-do_init_per_testcase(Case, Config)
- when (Case =:= progress_report_send) orelse
- (Case =:= progress_report_recv) ->
- inets:start(),
- io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE, Case]),
- NewConfig = close_connection(watch_dog(Config)),
- Host = ftp_host(Config),
- Opts = [{port, ?FTP_PORT},
- {verbose, true},
- {progress, {?MODULE, progress, #progress{}}}],
- case ftp:open(Host, Opts) of
- {ok, Pid} ->
- ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS),
- [{ftp, Pid} | data_dir(NewConfig)];
- {skip, _} = SKIP ->
- SKIP
- end;
-
-do_init_per_testcase(Case, Config) ->
- io:format(user,"~n~n*** INIT ~w:~w ***~n~n", [?MODULE, Case]),
- inets:start(),
- NewConfig = close_connection(watch_dog(Config)),
- Host = ftp_host(Config),
- Opts1 =
- if
- ((Case =:= passive_ip_v6_disabled) orelse
- (Case =:= active_ip_v6_disabled)) ->
- [{ipfamily, inet}];
- true ->
- []
- end,
- Opts2 =
- case string:tokens(atom_to_list(Case), [$_]) of
- ["active" | _] ->
- [{mode, active} | Opts1];
- _ ->
- [{mode, passive} | Opts1]
- end,
- case (catch ?ftp_open(Host, Opts2)) of
- {ok, Pid} ->
- ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS),
- [{ftp, Pid} | data_dir(NewConfig)];
- {skip, _} = SKIP ->
- SKIP
- end.
-
-
-%%--------------------------------------------------------------------
-%% Function: end_per_testcase(Case, Config) -> _
-%% 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.
-%% Description: Cleanup after each test case
-%%--------------------------------------------------------------------
-end_per_testcase(_, Config) ->
- NewConfig = close_connection(Config),
- Dog = ?config(watchdog, NewConfig),
- inets:stop(),
- test_server:timetrap_cancel(Dog),
- ok.
-
-
-%%-------------------------------------------------------------------------
-%% Suites similar for all hosts.
-%%-------------------------------------------------------------------------
-
-passive(suite) ->
- [
- passive_user,
- passive_pwd,
- passive_cd,
- passive_lcd,
- passive_ls,
- passive_nlist,
- passive_rename,
- passive_delete,
- passive_mkdir,
- passive_send,
- passive_send_bin,
- passive_send_chunk,
- passive_append,
- passive_append_bin,
- passive_append_chunk,
- passive_recv,
- passive_recv_bin,
- passive_recv_chunk,
- passive_type,
- passive_quote,
- passive_ip_v6_disabled
- ].
-
-active(suite) ->
- [
- active_user,
- active_pwd,
- active_cd,
- active_lcd,
- active_ls,
- active_nlist,
- active_rename,
- active_delete,
- active_mkdir,
- active_send,
- active_send_bin,
- active_send_chunk,
- active_append,
- active_append_bin,
- active_append_chunk,
- active_recv,
- active_recv_bin,
- active_recv_chunk,
- active_type,
- active_quote,
- active_ip_v6_disabled
- ].
-
-
-
-%%-------------------------------------------------------------------------
-%% Test cases starts here.
-%%-------------------------------------------------------------------------
-
-open(doc) ->
- ["Open an ftp connection to a host and close the connection."
- "Also check that !-messages does not disturbe the connection"];
-open(suite) ->
- [];
-open(Config) when is_list(Config) ->
- Host = ftp_host(Config),
- (catch tc_open(Host)).
-
-
-tc_open(Host) ->
- p("tc_open -> entry with"
- "~n Host: ~p", [Host]),
- {ok, Pid} = ?ftp_open(Host, []),
- ok = ftp:close(Pid),
- p("tc_open -> try (ok) open 1"),
- {ok, Pid1} =
- ftp:open({option_list, [{host,Host},
- {port, ?FTP_PORT},
- {flags, [verbose]},
- {timeout, 30000}]}),
- ok = ftp:close(Pid1),
-
- p("tc_open -> try (fail) open 2"),
- {error, ehost} =
- ftp:open({option_list, [{port, ?FTP_PORT}, {flags, [verbose]}]}),
- {ok, Pid2} = ftp:open(Host),
- ok = ftp:close(Pid2),
-
- p("tc_open -> try (ok) open 3"),
- {ok, NewHost} = inet:getaddr(Host, inet),
- {ok, Pid3} = ftp:open(NewHost),
- ftp:user(Pid3, ?FTP_USER, ?FTP_PASS),
- Pid3 ! foobar,
- test_server:sleep(5000),
- {message_queue_len, 0} = process_info(self(), message_queue_len),
- ["200" ++ _] = ftp:quote(Pid3, "NOOP"),
- ok = ftp:close(Pid3),
-
- %% Bad input that has default values are ignored and the defult
- %% is used.
- p("tc_open -> try (ok) open 4"),
- {ok, Pid4} =
- ftp:open({option_list, [{host, Host},
- {port, badarg},
- {flags, [verbose]},
- {timeout, 30000}]}),
- test_server:sleep(100),
- ok = ftp:close(Pid4),
-
- p("tc_open -> try (ok) open 5"),
- {ok, Pid5} =
- ftp:open({option_list, [{host, Host},
- {port, ?FTP_PORT},
- {flags, [verbose]},
- {timeout, -42}]}),
- test_server:sleep(100),
- ok = ftp:close(Pid5),
-
- p("tc_open -> try (ok) open 6"),
- {ok, Pid6} =
- ftp:open({option_list, [{host, Host},
- {port, ?FTP_PORT},
- {flags, [verbose]},
- {mode, cool}]}),
- test_server:sleep(100),
- ok = ftp:close(Pid6),
-
- p("tc_open -> try (ok) open 7"),
- {ok, Pid7} =
- ftp:open(Host, [{port, ?FTP_PORT}, {verbose, true}, {timeout, 30000}]),
- ok = ftp:close(Pid7),
-
- p("tc_open -> try (ok) open 8"),
- {ok, Pid8} =
- ftp:open(Host, ?FTP_PORT),
- ok = ftp:close(Pid8),
-
- p("tc_open -> try (ok) open 9"),
- {ok, Pid9} =
- ftp:open(Host, [{port, ?FTP_PORT},
- {verbose, true},
- {timeout, 30000},
- {dtimeout, -99}]),
- ok = ftp:close(Pid9),
-
- p("tc_open -> try (ok) open 10"),
- {ok, Pid10} =
- ftp:open(Host, [{port, ?FTP_PORT},
- {verbose, true},
- {timeout, 30000},
- {dtimeout, "foobar"}]),
- ok = ftp:close(Pid10),
-
- p("tc_open -> try (ok) open 11"),
- {ok, Pid11} =
- ftp:open(Host, [{port, ?FTP_PORT},
- {verbose, true},
- {timeout, 30000},
- {dtimeout, 1}]),
- ok = ftp:close(Pid11),
-
- p("tc_open -> done"),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-open_port(doc) ->
- ["Open an ftp connection to a host with given port number "
- "and close the connection."]; % See also OTP-3892
-open_port(suite) ->
- [];
-open_port(Config) when is_list(Config) ->
- Host = ftp_host(Config),
- {ok, Pid} = ftp:open(Host, [{port, ?FTP_PORT}]),
- ok = ftp:close(Pid),
- {error, ehost} = ftp:open(?BAD_HOST, []),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-passive_user(doc) ->
- ["Open an ftp connection to a host, and logon as anonymous ftp."];
-passive_user(suite) ->
- [];
-passive_user(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- p("Pid: ~p",[Pid]),
- do_user(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_pwd(doc) ->
- ["Test ftp:pwd/1 & ftp:lpwd/1"];
-passive_pwd(suite) ->
- [];
-passive_pwd(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_pwd(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_cd(doc) ->
- ["Open an ftp connection, log on as anonymous ftp, and cd to the"
- "directory \"/pub\" and the to the non-existent directory."];
-passive_cd(suite) ->
- [];
-passive_cd(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_cd(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_lcd(doc) ->
- ["Test api function ftp:lcd/2"];
-passive_lcd(suite) ->
- [];
-passive_lcd(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- PrivDir = ?config(priv_dir, Config),
- do_lcd(Pid, PrivDir).
-
-
-%%-------------------------------------------------------------------------
-
-passive_ls(doc) ->
- ["Open an ftp connection; ls the current directory, and the "
- "\"incoming\" directory. We assume that ls never fails, since "
- "it's output is meant to be read by humans. "];
-passive_ls(suite) ->
- [];
-passive_ls(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_ls(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_nlist(doc) ->
- ["Open an ftp connection; nlist the current directory, and the "
- "\"incoming\" directory. Nlist does not behave consistenly over "
- "operating systems. On some it is an error to have an empty "
- "directory."];
-passive_nlist(suite) ->
- [];
-passive_nlist(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- WildcardSupport = ?config(wildcard_support, Config),
- do_nlist(Pid, WildcardSupport).
-
-
-%%-------------------------------------------------------------------------
-
-passive_rename(doc) ->
- ["Transfer a file to the server, and rename it; then remove it."];
-passive_rename(suite) ->
- [];
-passive_rename(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_rename(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_delete(doc) ->
- ["Transfer a file to the server, and then delete it"];
-passive_delete(suite) ->
- [];
-passive_delete(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_delete(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_mkdir(doc) ->
- ["Make a remote directory, cd to it, go to parent directory, and "
- "remove the directory."];
-passive_mkdir(suite) ->
- [];
-passive_mkdir(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_mkdir(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_send(doc) ->
- ["Create a local file in priv_dir; open an ftp connection to a host; "
- "logon as anonymous ftp; cd to the directory \"incoming\"; lcd to "
- "priv_dir; send the file; get a directory listing and check that "
- "the file is on the list;, delete the remote file; get another listing "
- "and check that the file is not on the list; close the session; "
- "delete the local file."];
-passive_send(suite) ->
- [];
-passive_send(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_append(doc) ->
- ["Create a local file in priv_dir; open an ftp connection to a host; "
- "logon as anonymous ftp; cd to the directory \"incoming\"; lcd to "
- "priv_dir; append the file to a file at the remote side that not exits"
- "this will create the file at the remote side. Then it append the file "
- "again. When this is done it recive the remote file and control that"
- "the content is doubled in it.After that it will remove the files"];
-passive_append(suite) ->
- [];
-passive_append(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_append(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_send_bin(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "send a binary; remove file; close the connection."];
-passive_send_bin(suite) ->
- [];
-passive_send_bin(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send_bin(Pid, Config).
-
-%%-------------------------------------------------------------------------
-
-passive_append_bin(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "append a binary twice; get the file and compare the content"
- "remove file; close the connection."];
-passive_append_bin(suite) ->
- [];
-passive_append_bin(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_append_bin(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_send_chunk(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "send chunks; remove file; close the connection."];
-passive_send_chunk(suite) ->
- [];
-passive_send_chunk(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send_chunk(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_append_chunk(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "append chunks;control content remove file; close the connection."];
-passive_append_chunk(suite) ->
- [];
-passive_append_chunk(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_append_chunk(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_recv(doc) ->
- ["Create a local file and transfer it to the remote host into the "
- "the \"incoming\" directory, remove "
- "the local file. Then open a new connection; cd to \"incoming\", "
- "lcd to the private directory; receive the file; delete the "
- "remote file; close connection; check that received file is in "
- "the correct directory; cleanup." ];
-passive_recv(suite) ->
- [];
-passive_recv(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_recv(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_recv_bin(doc) ->
- ["Send a binary to the remote host; and retreive "
- "the file; then remove the file."];
-passive_recv_bin(suite) ->
- [];
-passive_recv_bin(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_recv_bin(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_recv_chunk(doc) ->
- ["Send a binary to the remote host; Connect again, and retreive "
- "the file; then remove the file."];
-passive_recv_chunk(suite) ->
- [];
-passive_recv_chunk(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_recv_chunk(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-passive_type(doc) ->
- ["Test that we can change btween ASCCI and binary transfer mode"];
-passive_type(suite) ->
- [];
-passive_type(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_type(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_quote(doc) ->
- [""];
-passive_quote(suite) ->
- [];
-passive_quote(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_quote(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-passive_ip_v6_disabled(doc) ->
- ["Test ipv4 command PASV"];
-passive_ip_v6_disabled(suite) ->
- [];
-passive_ip_v6_disabled(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_user(doc) ->
- ["Open an ftp connection to a host, and logon as anonymous ftp."];
-active_user(suite) ->
- [];
-active_user(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_user(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_pwd(doc) ->
- ["Test ftp:pwd/1 & ftp:lpwd/1"];
-active_pwd(suite) ->
- [];
-active_pwd(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_pwd(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_cd(doc) ->
- ["Open an ftp connection, log on as anonymous ftp, and cd to the"
- "directory \"/pub\" and to a non-existent directory."];
-active_cd(suite) ->
- [];
-active_cd(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_cd(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_lcd(doc) ->
- ["Test api function ftp:lcd/2"];
-active_lcd(suite) ->
- [];
-active_lcd(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- PrivDir = ?config(priv_dir, Config),
- do_lcd(Pid, PrivDir).
-
-
-%%-------------------------------------------------------------------------
-
-active_ls(doc) ->
- ["Open an ftp connection; ls the current directory, and the "
- "\"incoming\" directory. We assume that ls never fails, since "
- "it's output is meant to be read by humans. "];
-active_ls(suite) ->
- [];
-active_ls(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_ls(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_nlist(doc) ->
- ["Open an ftp connection; nlist the current directory, and the "
- "\"incoming\" directory. Nlist does not behave consistenly over "
- "operating systems. On some it is an error to have an empty "
- "directory."];
-active_nlist(suite) ->
- [];
-active_nlist(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- WildcardSupport = ?config(wildcard_support, Config),
- do_nlist(Pid, WildcardSupport).
-
-
-%%-------------------------------------------------------------------------
-
-active_rename(doc) ->
- ["Transfer a file to the server, and rename it; then remove it."];
-active_rename(suite) ->
- [];
-active_rename(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_rename(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_delete(doc) ->
- ["Transfer a file to the server, and then delete it"];
-active_delete(suite) ->
- [];
-active_delete(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_delete(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_mkdir(doc) ->
- ["Make a remote directory, cd to it, go to parent directory, and "
- "remove the directory."];
-active_mkdir(suite) ->
- [];
-active_mkdir(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_mkdir(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_send(doc) ->
- ["Create a local file in priv_dir; open an ftp connection to a host; "
- "logon as anonymous ftp; cd to the directory \"incoming\"; lcd to "
- "priv_dir; send the file; get a directory listing and check that "
- "the file is on the list;, delete the remote file; get another listing "
- "and check that the file is not on the list; close the session; "
- "delete the local file."];
-active_send(suite) ->
- [];
-active_send(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_append(doc) ->
- ["Create a local file in priv_dir; open an ftp connection to a host; "
- "logon as anonymous ftp; cd to the directory \"incoming\"; lcd to "
- "priv_dir; append the file to a file at the remote side that not exits"
- "this will create the file at the remote side. Then it append the file "
- "again. When this is done it recive the remote file and control that"
- "the content is doubled in it.After that it will remove the files"];
-active_append(suite) ->
- [];
-active_append(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_append(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_send_bin(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "send a binary; remove file; close the connection."];
-active_send_bin(suite) ->
- [];
-active_send_bin(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send_bin(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_append_bin(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "append a binary twice; get the file and compare the content"
- "remove file; close the connection."];
-active_append_bin(suite) ->
- [];
-active_append_bin(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_append_bin(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_send_chunk(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "send chunks; remove file; close the connection."];
-active_send_chunk(suite) ->
- [];
-active_send_chunk(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send_chunk(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_append_chunk(doc) ->
- ["Open a connection to a host; cd to the directory \"incoming\"; "
- "append chunks;control content remove file; close the connection."];
-active_append_chunk(suite) ->
- [];
-active_append_chunk(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_append_chunk(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_recv(doc) ->
- ["Create a local file and transfer it to the remote host into the "
- "the \"incoming\" directory, remove "
- "the local file. Then open a new connection; cd to \"incoming\", "
- "lcd to the private directory; receive the file; delete the "
- "remote file; close connection; check that received file is in "
- "the correct directory; cleanup." ];
-active_recv(suite) ->
- [];
-active_recv(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_recv(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_recv_bin(doc) ->
- ["Send a binary to the remote host; and retreive "
- "the file; then remove the file."];
-active_recv_bin(suite) ->
- [];
-active_recv_bin(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_recv_bin(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_recv_chunk(doc) ->
- ["Send a binary to the remote host; Connect again, and retreive "
- "the file; then remove the file."];
-active_recv_chunk(suite) ->
- [];
-active_recv_chunk(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_recv_chunk(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-active_type(doc) ->
- ["Test that we can change btween ASCCI and binary transfer mode"];
-active_type(suite) ->
- [];
-active_type(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_type(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_quote(doc) ->
- [""];
-active_quote(suite) ->
- [];
-active_quote(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_quote(Pid).
-
-
-%%-------------------------------------------------------------------------
-
-active_ip_v6_disabled(doc) ->
- ["Test ipv4 command PORT"];
-active_ip_v6_disabled(suite) ->
- [];
-active_ip_v6_disabled(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- do_send(Pid, Config).
-
-
-%%-------------------------------------------------------------------------
-
-api_missuse(doc)->
- ["Test that behaviour of the ftp process if the api is abused"];
-api_missuse(suite) -> [];
-api_missuse(Config) when is_list(Config) ->
- p("api_missuse -> entry"),
- Flag = process_flag(trap_exit, true),
- Pid = ?config(ftp, Config),
- Host = ftp_host(Config),
-
- %% Serious programming fault, connetion will be shut down
- p("api_missuse -> verify bad call termination (~p)", [Pid]),
- case (catch gen_server:call(Pid, {self(), foobar, 10}, infinity)) of
- {error, {connection_terminated, 'API_violation'}} ->
- ok;
- Unexpected1 ->
- exit({unexpected_result, Unexpected1})
- end,
- test_server:sleep(500),
- undefined = process_info(Pid, status),
-
- p("api_missuse -> start new client"),
- {ok, Pid2} = ?ftp_open(Host, []),
- %% Serious programming fault, connetion will be shut down
- p("api_missuse -> verify bad cast termination"),
- gen_server:cast(Pid2, {self(), foobar, 10}),
- test_server:sleep(500),
- undefined = process_info(Pid2, status),
-
- p("api_missuse -> start new client"),
- {ok, Pid3} = ?ftp_open(Host, []),
- %% Could be an innocent misstake the connection lives.
- p("api_missuse -> verify bad bang"),
- Pid3 ! foobar,
- test_server:sleep(500),
- {status, _} = process_info(Pid3, status),
- process_flag(trap_exit, Flag),
- p("api_missuse -> done"),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-not_owner(doc) ->
- ["Test what happens if a process that not owns the connection tries "
- "to use it"];
-not_owner(suite) ->
- [];
-not_owner(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- OtherPid = spawn_link(?MODULE, not_owner, [Pid, self()]),
-
- receive
- {OtherPid, ok} ->
- {ok, _} = ftp:pwd(Pid)
- end,
- ok.
-
-not_owner(FtpPid, Pid) ->
- {error, not_connection_owner} = ftp:pwd(FtpPid),
- ftp:close(FtpPid),
- test_server:sleep(100),
- Pid ! {self(), ok}.
-
-
-%%-------------------------------------------------------------------------
-
-
-progress_report(doc) ->
- ["Solaris 8 sparc test the option progress."];
-progress_report(suite) ->
- [progress_report_send, progress_report_recv].
-
-
-%% --
-
-progress_report_send(doc) ->
- ["Test the option progress for ftp:send/[2,3]"];
-progress_report_send(suite) ->
- [];
-progress_report_send(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- ReportPid =
- spawn_link(?MODULE, progress_report_receiver_init, [self(), 1]),
- do_send(Pid, Config),
- receive
- {ReportPid, ok} ->
- ok
- end.
-
-
-%% --
-
-progress_report_recv(doc) ->
- ["Test the option progress for ftp:recv/[2,3]"];
-progress_report_recv(suite) ->
- [];
-progress_report_recv(Config) when is_list(Config) ->
- Pid = ?config(ftp, Config),
- ReportPid =
- spawn_link(?MODULE, progress_report_receiver_init, [self(), 3]),
- do_recv(Pid, Config),
- receive
- {ReportPid, ok} ->
- ok
- end,
- ok.
-
-progress(#progress{} = Progress , _File, {file_size, Total}) ->
- progress_report_receiver ! start,
- Progress#progress{total = Total};
-progress(#progress{total = Total, current = Current}
- = Progress, _File, {transfer_size, 0}) ->
- progress_report_receiver ! finish,
- case Total of
- unknown ->
- ok;
- Current ->
- ok;
- _ ->
- test_server:fail({error, {progress, {total, Total},
- {current, Current}}})
- end,
- Progress;
-progress(#progress{current = Current} = Progress, _File,
- {transfer_size, Size}) ->
- progress_report_receiver ! update,
- Progress#progress{current = Current + Size}.
-
-progress_report_receiver_init(Pid, N) ->
- register(progress_report_receiver, self()),
- receive
- start ->
- ok
- end,
- progress_report_receiver_loop(Pid, N-1).
-
-progress_report_receiver_loop(Pid, N) ->
- receive
- update ->
- progress_report_receiver_loop(Pid, N);
- finish when N =:= 0 ->
- Pid ! {self(), ok};
- finish ->
- Pid ! {self(), ok},
- receive
- start ->
- ok
- end,
- progress_report_receiver_loop(Pid, N-1)
- end.
-
-
-%%-------------------------------------------------------------------------
-%% Ticket test cases
-%%-------------------------------------------------------------------------
-
-ticket_6035(doc) -> ["Test that owning process that exits with reason "
- "'shutdown' does not cause an error message."];
-ticket_6035(suite) -> [];
-ticket_6035(Config) ->
- p("ticket_6035 -> entry with"
- "~n Config: ~p", [Config]),
- PrivDir = ?config(priv_dir, Config),
- LogFile = filename:join([PrivDir,"ticket_6035.log"]),
- try
- begin
- p("ticket_6035 -> select ftpd host"),
- Host = dirty_select_ftpd_host(Config),
- p("ticket_6035 -> ftpd host selected (~p) => now spawn ftp owner", [Host]),
- Pid = spawn(?MODULE, open_wait_6035, [Host, self()]),
- p("ticket_6035 -> waiter spawned: ~p => now open error logfile (~p)",
- [Pid, LogFile]),
- error_logger:logfile({open, LogFile}),
- p("ticket_6035 -> error logfile open => now kill waiter process"),
- true = kill_ftp_proc_6035(Pid, LogFile),
- p("ticket_6035 -> waiter process killed => now close error logfile"),
- error_logger:logfile(close),
- p("ticket_6035 -> done", []),
- ok
- end
- catch
- throw:{error, not_found} ->
- {skip, "No available FTP servers"}
- end.
-
-kill_ftp_proc_6035(Pid, LogFile) ->
- p("kill_ftp_proc_6035 -> entry"),
- receive
- open ->
- p("kill_ftp_proc_6035 -> received open => now issue shutdown"),
- exit(Pid, shutdown),
- kill_ftp_proc_6035(Pid, LogFile);
- {open_failed, Reason} ->
- p("kill_ftp_proc_6035 -> received open_failed"
- "~n Reason: ~p", [Reason]),
- exit({skip, {failed_openening_server_connection, Reason}})
- after
- 5000 ->
- p("kill_ftp_proc_6035 -> timeout"),
- is_error_report_6035(LogFile)
- end.
-
-open_wait_6035({Tag, FtpServer}, From) ->
- p("open_wait_6035 -> try connect to [~p] ~s for ~p", [Tag, FtpServer, From]),
- case ftp:open(FtpServer, [{timeout, timer:seconds(15)}]) of
- {ok, Pid} ->
- p("open_wait_6035 -> connected (~p), now login", [Pid]),
- LoginResult = ftp:user(Pid,"anonymous","kldjf"),
- p("open_wait_6035 -> login result: ~p", [LoginResult]),
- From ! open,
- receive
- dummy ->
- p("open_wait_6035 -> received dummy"),
- ok
- after
- 10000 ->
- p("open_wait_6035 -> timeout"),
- ok
- end,
- p("open_wait_6035 -> done(ok)"),
- ok;
- {error, Reason} ->
- p("open_wait_6035 -> open failed"
- "~n Reason: ~p", [Reason]),
- From ! {open_failed, {Reason, FtpServer}},
- p("open_wait_6035 -> done(error)"),
- ok
- end.
-
-is_error_report_6035(LogFile) ->
- p("is_error_report_6035 -> entry"),
- Res =
- case file:read_file(LogFile) of
- {ok, Bin} ->
- Txt = binary_to_list(Bin),
- p("is_error_report_6035 -> logfile read: ~n~p", [Txt]),
- read_log_6035(Txt);
- _ ->
- false
- end,
- p("is_error_report_6035 -> logfile read result: "
- "~n ~p", [Res]),
- %% file:delete(LogFile),
- Res.
-
-read_log_6035("=ERROR REPORT===="++_Rest) ->
- p("read_log_6035 -> ERROR REPORT detected"),
- true;
-read_log_6035([H|T]) ->
- p("read_log_6035 -> OTHER: "
- "~p", [H]),
- read_log_6035(T);
-read_log_6035([]) ->
- p("read_log_6035 -> done"),
- false.
-
-
-%%--------------------------------------------------------------------
-%% Internal functions
-%%--------------------------------------------------------------------
-do_user(Pid) ->
- {error, euser} = ftp:user(Pid, ?BAD_USER, ?FTP_PASS),
- {error, euser} = ftp:user(Pid, ?FTP_USER++"\r\nPASS "++?FTP_PASS, ?FTP_PASS),
- {error, euser} = ftp:user(Pid, ?FTP_USER, ?FTP_PASS++"\r\nCWD ."),
- ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS),
- ok.
-
-do_pwd(Pid) ->
- {ok, "/"} = ftp:pwd(Pid),
- {ok, Path} = ftp:lpwd(Pid),
- {ok, Path} = file:get_cwd(),
- ok.
-
-do_cd(Pid) ->
- ok = ftp:cd(Pid, "/pub"),
- {error, epath} = ftp:cd(Pid, ?BAD_DIR),
- {error, efnamena} = ftp:cd(Pid, "/pub\r\nCWD ."),
- ok.
-
-do_lcd(Pid, Dir) ->
- ok = ftp:lcd(Pid, Dir),
- {error, epath} = ftp:lcd(Pid, ?BAD_DIR),
- ok.
-
-
-do_ls(Pid) ->
- {ok, _} = ftp:ls(Pid),
- {ok, _} = ftp:ls(Pid, "incoming"),
- %% neither nlist nor ls operates on a directory
- %% they operate on a pathname, which *can* be a
- %% directory, but can also be a filename or a group
- %% of files (including wildcards).
- {ok, _} = ftp:ls(Pid, "incom*"),
- %% but \r\n can't be in the wildcard
- {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
- ok.
-
-do_nlist(Pid, WildcardSupport) ->
- {ok, _} = ftp:nlist(Pid),
- {ok, _} = ftp:nlist(Pid, "incoming"),
- {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
- %% neither nlist nor ls operates on a directory
- %% they operate on a pathname, which *can* be a
- %% directory, but can also be a filename or a group
- %% of files (including wildcards).
- case WildcardSupport of
- true ->
- {ok, _} = ftp:nlist(Pid, "incom*"),
- ok;
- _ ->
- ok
- end.
-
-do_rename(Pid, Config) ->
- PrivDir = ?config(priv_dir, Config),
- LFile = ?config(file, Config),
- NewLFile = ?config(new_file, Config),
- AbsLFile = filename:absname(LFile, PrivDir),
- Contents = "ftp_SUITE test ...",
- ok = file:write_file(AbsLFile, list_to_binary(Contents)),
- ok = ftp:cd(Pid, "incoming"),
- ok = ftp:lcd(Pid, PrivDir),
- ftp:delete(Pid, LFile), % reset
- ftp:delete(Pid, NewLFile), % reset
- ok = ftp:send(Pid, LFile),
- {error, epath} = ftp:rename(Pid, NewLFile, LFile),
- {error, efnamena} = ftp:rename(Pid, NewLFile++"\r\nRNTO "++LFile++"\r\nRNFR "++NewLFile, LFile),
- {error, efnamena} = ftp:rename(Pid, NewLFile, LFile++"\r\nCWD ."),
- ok = ftp:rename(Pid, LFile, NewLFile),
- ftp:delete(Pid, LFile), % cleanup
- ftp:delete(Pid, NewLFile), % cleanup
- ok.
-
-do_delete(Pid, Config) ->
- PrivDir = ?config(priv_dir, Config),
- LFile = ?config(file, Config),
- AbsLFile = filename:absname(LFile, PrivDir),
- Contents = "ftp_SUITE test ...",
- ok = file:write_file(AbsLFile, list_to_binary(Contents)),
- ok = ftp:cd(Pid, "incoming"),
- ok = ftp:lcd(Pid, PrivDir),
- ftp:delete(Pid,LFile), % reset
- {error, efnamena} = ftp:delete(Pid,LFile++"\r\nCWD ."),
- ok = ftp:send(Pid, LFile),
- ok = ftp:delete(Pid,LFile),
- ok.
-
-do_mkdir(Pid) ->
- NewDir = "earl_" ++
- integer_to_list(erlang:unique_integer([positive])),
-
- ok = ftp:cd(Pid, "incoming"),
- {ok, CurrDir} = ftp:pwd(Pid),
- {error, efnamena} = ftp:mkdir(Pid, NewDir++"\r\nCWD ."),
- {error, efnamena} = ftp:rmdir(Pid, NewDir++"\r\nCWD ."),
- ok = ftp:mkdir(Pid, NewDir),
- ok = ftp:cd(Pid, NewDir),
- ok = ftp:cd(Pid, CurrDir),
- ok = ftp:rmdir(Pid, NewDir),
- ok.
-
-do_send(Pid, Config) ->
- PrivDir = ?config(priv_dir, Config),
- LFile = ?config(file, Config),
- RFile = LFile ++ ".remote",
- AbsLFile = filename:absname(LFile, PrivDir),
- Contents = "ftp_SUITE test ...",
- ok = file:write_file(AbsLFile, list_to_binary(Contents)),
- ok = ftp:cd(Pid, "incoming"),
- ok = ftp:lcd(Pid, PrivDir),
- {error, efnamena} = ftp:send(Pid, LFile, RFile++"1\r\nCWD ."),
- ok = ftp:send(Pid, LFile, RFile),
- {ok, RFilesString} = ftp:nlist(Pid),
- RFiles = split(RFilesString),
- true = lists:member(RFile, RFiles),
- ok = ftp:delete(Pid, RFile),
- case ftp:nlist(Pid) of
- {error, epath} ->
- ok; % No files
- {ok, RFilesString1} ->
- RFiles1 = split(RFilesString1),
- false = lists:member(RFile, RFiles1)
- end,
- ok = file:delete(AbsLFile).
-
-do_append(Pid, Config) ->
- PrivDir = ?config(priv_dir, Config),
- LFile = ?config(file, Config),
- RFile = ?config(new_file, Config),
- AbsLFile = filename:absname(LFile, PrivDir),
- Contents = "ftp_SUITE test:appending\r\n",
-
- ok = file:write_file(AbsLFile, list_to_binary(Contents)),
- ok = ftp:cd(Pid, "incoming"),
- ok = ftp:lcd(Pid, PrivDir),
-
- %% remove files from earlier failed test case
- ftp:delete(Pid, RFile),
- ftp:delete(Pid, LFile),
-
- {error, efnamena} = ftp:append(Pid, LFile, RFile++"1\r\nCWD ."),
- ok = ftp:append(Pid, LFile, RFile),
- ok = ftp:append(Pid, LFile, RFile),
- ok = ftp:append(Pid, LFile),
-
- %% Control the contents of the file
- {ok, Bin1} = ftp:recv_bin(Pid, RFile),
- ok = ftp:delete(Pid, RFile),
- ok = file:delete(AbsLFile),
- ok = check_content(binary_to_list(Bin1), Contents, double),
-
- {ok, Bin2} = ftp:recv_bin(Pid, LFile),
- ok = ftp:delete(Pid, LFile),
- ok = check_content(binary_to_list(Bin2), Contents, singel),
- ok.
-
-do_send_bin(Pid, Config) ->
- File = ?config(file, Config),
- Contents = "ftp_SUITE test ...",
- Bin = list_to_binary(Contents),
- ok = ftp:cd(Pid, "incoming"),
- {error, enotbinary} = ftp:send_bin(Pid, Contents, File),
- {error, efnamena} = ftp:send_bin(Pid, Bin, File++"1\r\nCWD ."),
- ok = ftp:send_bin(Pid, Bin, File),
- {ok, RFilesString} = ftp:nlist(Pid),
- RFiles = split(RFilesString),
- true = lists:member(File, RFiles),
- ok = ftp:delete(Pid, File),
- ok.
-
-do_append_bin(Pid, Config) ->
- File = ?config(file, Config),
- Contents = "ftp_SUITE test ...",
- Bin = list_to_binary(Contents),
- ok = ftp:cd(Pid, "incoming"),
- {error, enotbinary} = ftp:append_bin(Pid, Contents, File),
- {error, efnamena} = ftp:append_bin(Pid, Bin, File++"1\r\nCWD ."),
- ok = ftp:append_bin(Pid, Bin, File),
- ok = ftp:append_bin(Pid, Bin, File),
- %% Control the contents of the file
- {ok, Bin2} = ftp:recv_bin(Pid, File),
- ok = ftp:delete(Pid,File),
- ok = check_content(binary_to_list(Bin2),binary_to_list(Bin), double).
-
-do_send_chunk(Pid, Config) ->
- File = ?config(file, Config),
- Contents = "ftp_SUITE test ...",
- Bin = list_to_binary(Contents),
- ok = ftp:cd(Pid, "incoming"),
- {error, efnamena} = ftp:send_chunk_start(Pid, File++"1\r\nCWD ."),
- ok = ftp:send_chunk_start(Pid, File),
- {error, echunk} = ftp:cd(Pid, "incoming"),
- {error, enotbinary} = ftp:send_chunk(Pid, Contents),
- ok = ftp:send_chunk(Pid, Bin),
- ok = ftp:send_chunk(Pid, Bin),
- ok = ftp:send_chunk_end(Pid),
- {ok, RFilesString} = ftp:nlist(Pid),
- RFiles = split(RFilesString),
- true = lists:member(File, RFiles),
- ok = ftp:delete(Pid, File),
- ok.
-
-do_append_chunk(Pid, Config) ->
- File = ?config(file, Config),
- Contents = ["ER","LE","RL"],
- ok = ftp:cd(Pid, "incoming"),
- {error, efnamena} = ftp:append_chunk_start(Pid, File++"1\r\nCWD ."),
- ok = ftp:append_chunk_start(Pid, File),
- {error, enotbinary} = ftp:append_chunk(Pid, lists:nth(1,Contents)),
- ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(1,Contents))),
- ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(2,Contents))),
- ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(3,Contents))),
- ok = ftp:append_chunk_end(Pid),
- %%Control the contents of the file
- {ok, Bin2} = ftp:recv_bin(Pid, File),
- ok = check_content(binary_to_list(Bin2),"ERL", double),
- ok = ftp:delete(Pid, File),
- ok.
-
-do_recv(Pid, Config) ->
- PrivDir = ?config(priv_dir, Config),
- File = ?config(file, Config),
- Newfile = ?config(new_file, Config),
- AbsFile = filename:absname(File, PrivDir),
- Contents = "ftp_SUITE:recv test ...",
- ok = file:write_file(AbsFile, list_to_binary(Contents)),
- ok = ftp:cd(Pid, "incoming"),
- ftp:delete(Pid, File), % reset
- ftp:lcd(Pid, PrivDir),
- ok = ftp:send(Pid, File),
- ok = file:delete(AbsFile), % cleanup
- test_server:sleep(100),
- ok = ftp:lcd(Pid, PrivDir),
- {error, efnamena} = ftp:recv(Pid, File++"\r\nCWD ."),
- ok = ftp:recv(Pid, File),
- {ok, Files} = file:list_dir(PrivDir),
- true = lists:member(File, Files),
- ok = file:delete(AbsFile), % cleanup
- ok = ftp:recv(Pid, File, Newfile),
- ok = ftp:delete(Pid, File), % cleanup
- ok.
-
-do_recv_bin(Pid, Config) ->
- File = ?config(file, Config),
- Contents1 = "ftp_SUITE test ...",
- Bin1 = list_to_binary(Contents1),
- ok = ftp:cd(Pid, "incoming"),
- ok = ftp:send_bin(Pid, Bin1, File),
- test_server:sleep(100),
- {error, efnamena} = ftp:recv_bin(Pid, File++"\r\nCWD ."),
- {ok, Bin2} = ftp:recv_bin(Pid, File),
- ok = ftp:delete(Pid, File), % cleanup
- Contents2 = binary_to_list(Bin2),
- Contents1 = Contents2,
- ok.
-
-do_recv_chunk(Pid, Config) ->
- File = ?config(file, Config),
- Data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
- "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
- "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
- "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
- "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
- "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"
- "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
- "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII",
-
- Contents1 = lists:flatten(lists:duplicate(10, Data)),
- Bin1 = list_to_binary(Contents1),
- ok = ftp:cd(Pid, "incoming"),
- ok = ftp:type(Pid, binary),
- ok = ftp:send_bin(Pid, Bin1, File),
- test_server:sleep(100),
- {error, "ftp:recv_chunk_start/2 not called"} = recv_chunk(Pid, <<>>),
- {error, efnamena} = ftp:recv_chunk_start(Pid, File++"\r\nCWD ."),
- ok = ftp:recv_chunk_start(Pid, File),
- {ok, Contents2} = recv_chunk(Pid, <<>>),
- ok = ftp:delete(Pid, File), % cleanup
- ok = find_diff(Contents2, Contents1, 1),
- ok.
-
-do_type(Pid) ->
- ok = ftp:type(Pid, ascii),
- ok = ftp:type(Pid, binary),
- ok = ftp:type(Pid, ascii),
- {error, etype} = ftp:type(Pid, foobar),
- ok.
-
-do_quote(Pid) ->
- ["257 \"/\""++_Rest] = ftp:quote(Pid, "pwd"), %% 257
- [_| _] = ftp:quote(Pid, "help"),
- %% This negativ test causes some ftp servers to hang. This test
- %% is not important for the client, so we skip it for now.
- %%["425 Can't build data connection: Connection refused."]
- %% = ftp:quote(Pid, "list"),
- ok.
-
- watch_dog(Config) ->
- Dog = test_server:timetrap(inets_test_lib:minutes(1)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- [{watchdog, Dog} | NewConfig].
-
- close_connection(Config) ->
- case ?config(ftp, Config) of
- Pid when is_pid(Pid) ->
- ok = ftp:close(Pid),
- lists:delete({ftp, Pid}, Config);
- _ ->
- Config
- end.
-
-ftp_host(Config) ->
- case ?config(ftp_remote_host, Config) of
- undefined ->
- exit({skip, "No host specified"});
- Host ->
- Host
- end.
-
-check_content(RContent, LContent, Amount) ->
- LContent2 = case Amount of
- double ->
- LContent ++ LContent;
- singel ->
- LContent
- end,
- case string:equal(RContent, LContent2) of
- true ->
- ok;
- false ->
- %% Find where the diff is
- Where = find_diff(RContent, LContent2, 1),
- Where
- end.
-
-find_diff(A, A, _) ->
- ok;
-find_diff([H|T1], [H|T2], Pos) ->
- find_diff(T1, T2, Pos+1);
-find_diff(RC, LC, Pos) ->
- {error, {diff, Pos, RC, LC}}.
-
-recv_chunk(Pid, Acc) ->
- case ftp:recv_chunk(Pid) of
- ok ->
- {ok, binary_to_list(Acc)};
- {ok, Bin} ->
- recv_chunk(Pid, <<Acc/binary, Bin/binary>>);
- Error ->
- Error
- end.
-
-split(Cs) ->
- split(Cs, [], []).
-
-split([$\r, $\n| Cs], I, Is) ->
- split(Cs, [], [lists:reverse(I)| Is]);
-split([C| Cs], I, Is) ->
- split(Cs, [C| I], Is);
-split([], I, Is) ->
- lists:reverse([lists:reverse(I)| Is]).
-
-do_ftp_open(Host, Opts) ->
- p("do_ftp_open -> entry with"
- "~n Host: ~p"
- "~n Opts: ~p", [Host, Opts]),
- case ftp:open(Host, Opts) of
- {ok, _} = OK ->
- OK;
- {error, Reason} ->
- Str =
- lists:flatten(
- io_lib:format("Unable to reach test FTP server ~p (~p)",
- [Host, Reason])),
- throw({skip, Str})
- end.
-
-
-passwd() ->
- Host =
- case inet:gethostname() of
- {ok, H} ->
- H;
- _ ->
- "localhost"
- end,
- "ftp_SUITE@" ++ Host.
-
-ftpd_hosts(Config) ->
- DataDir = ?config(data_dir, Config),
- FileName = filename:join([DataDir, "../ftp_SUITE_data/", ftpd_hosts]),
- p("FileName: ~p", [FileName]),
- case file:consult(FileName) of
- {ok, [Hosts]} when is_list(Hosts) ->
- Hosts;
- _ ->
- []
- end.
-
-wrapper(Prefix,doc,Func) ->
- Prefix++Func(doc);
-wrapper(_,X,Func) ->
- Func(X).
-
-data_dir(Config) ->
- case ?config(data_dir, Config) of
- List when (length(List) > 0) ->
- PathList = filename:split(List),
- {NewPathList,_} = lists:split((length(PathList)-1), PathList),
- DataDir = filename:join(NewPathList ++ [ftp_SUITE_data]),
- NewConfig =
- lists:keyreplace(data_dir,1,Config, {data_dir,DataDir}),
- NewConfig;
- _ -> Config
- end.
-
-
-
-p(F) ->
- p(F, []).
-
-p(F, A) ->
- case get(ftp_testcase) of
- undefined ->
- io:format("~w [~w] " ++ F ++ "~n", [?MODULE, self() | A]);
- TC when is_atom(TC) ->
- io:format("~w [~w] ~w:" ++ F ++ "~n", [?MODULE, self(), TC | A])
- end.
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl
index e977bd1b9b..a2b463e98c 100644
--- a/lib/inets/test/http_format_SUITE.erl
+++ b/lib/inets/test/http_format_SUITE.erl
@@ -55,13 +55,9 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_, Config) ->
- Dog = test_server:timetrap(?t:minutes(1)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- [{watchdog, Dog} | NewConfig].
+ Config.
-end_per_testcase(_, Config) ->
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+end_per_testcase(_, _) ->
ok.
%%-------------------------------------------------------------------------
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index e6c4e48feb..932567ec55 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -42,7 +42,8 @@
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
suite() ->
- [{ct_hooks,[ts_install_cth]}].
+ [{ct_hooks,[ts_install_cth]}
+ ].
all() ->
[
@@ -137,8 +138,9 @@ misc() ->
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- PrivDir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
+ ct:timetrap({seconds, 30}),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
inets_test_lib:start_apps([inets]),
ServerRoot = filename:join(PrivDir, "server_root"),
DocRoot = filename:join(ServerRoot, "htdocs"),
@@ -147,7 +149,7 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
inets_test_lib:stop_apps([inets]),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
inets_test_lib:del_dirs(PrivDir),
ok.
@@ -159,6 +161,7 @@ init_per_group(misc = Group, Config) ->
Config;
init_per_group(Group, Config0) when Group =:= sim_https; Group =:= https->
+ ct:timetrap({seconds, 30}),
start_apps(Group),
StartSsl = try ssl:start()
catch
@@ -199,7 +202,15 @@ init_per_testcase(persistent_connection, Config) ->
{max_keep_alive_length, 3}], persistent_connection),
Config;
-
+init_per_testcase(wait_for_whole_response, Config) ->
+ ct:timetrap({seconds, 60*3}),
+ Config;
+init_per_testcase(Case, Config) when Case == post;
+ Case == delete;
+ Case == post_delete;
+ Case == post_stream ->
+ ct:timetrap({seconds, 30}),
+ Config;
init_per_testcase(_Case, Config) ->
Config.
@@ -356,7 +367,7 @@ pipeline(Config) when is_list(Config) ->
{ok, _} = httpc:request(get, Request, [], [], pipeline),
%% Make sure pipeline session is registerd
- test_server:sleep(4000),
+ ct:sleep(4000),
keep_alive_requests(Request, pipeline).
%%--------------------------------------------------------------------
@@ -366,7 +377,7 @@ persistent_connection(Config) when is_list(Config) ->
{ok, _} = httpc:request(get, Request, [], [], persistent),
%% Make sure pipeline session is registerd
- test_server:sleep(4000),
+ ct:sleep(4000),
keep_alive_requests(Request, persistent).
%%-------------------------------------------------------------------------
@@ -394,7 +405,7 @@ async(Config) when is_list(Config) ->
save_to_file() ->
[{doc, "Test to save the http body to a file"}].
save_to_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FilePath = filename:join(PrivDir, "dummy.html"),
URL = url(group_name(Config), "/dummy.html", Config),
Request = {URL, []},
@@ -408,7 +419,7 @@ save_to_file(Config) when is_list(Config) ->
save_to_file_async() ->
[{doc,"Test to save the http body to a file"}].
save_to_file_async(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FilePath = filename:join(PrivDir, "dummy.html"),
URL = url(group_name(Config), "/dummy.html", Config),
Request = {URL, []},
@@ -868,7 +879,7 @@ headers() ->
headers(Config) when is_list(Config) ->
URL = url(group_name(Config), "/dummy.html", Config),
- DocRoot = ?config(doc_root, Config),
+ DocRoot = proplists:get_value(doc_root, Config),
{ok, FileInfo} =
file:read_file_info(filename:join([DocRoot,"dummy.html"])),
@@ -1212,11 +1223,11 @@ not_streamed_test(Request, To) ->
end.
url(http, End, Config) ->
- Port = ?config(port, Config),
+ Port = proplists:get_value(port, Config),
{ok,Host} = inet:gethostname(),
?URL_START ++ Host ++ ":" ++ integer_to_list(Port) ++ End;
url(https, End, Config) ->
- Port = ?config(port, Config),
+ Port = proplists:get_value(port, Config),
{ok,Host} = inet:gethostname(),
?TLS_URL_START ++ Host ++ ":" ++ integer_to_list(Port) ++ End;
url(sim_http, End, Config) ->
@@ -1224,10 +1235,10 @@ url(sim_http, End, Config) ->
url(sim_https, End, Config) ->
url(https, End, Config).
url(http, UserInfo, End, Config) ->
- Port = ?config(port, Config),
+ Port = proplists:get_value(port, Config),
?URL_START ++ UserInfo ++ integer_to_list(Port) ++ End;
url(https, UserInfo, End, Config) ->
- Port = ?config(port, Config),
+ Port = proplists:get_value(port, Config),
?TLS_URL_START ++ UserInfo ++ integer_to_list(Port) ++ End;
url(sim_http, UserInfo, End, Config) ->
url(http, UserInfo, End, Config);
@@ -1235,7 +1246,7 @@ url(sim_https, UserInfo, End, Config) ->
url(https, UserInfo, End, Config).
group_name(Config) ->
- GroupProp = ?config(tc_group_properties, Config),
+ GroupProp = proplists:get_value(tc_group_properties, Config),
proplists:get_value(name, GroupProp).
server_start(sim_http, _) ->
@@ -1257,11 +1268,11 @@ server_start(_, HttpdConfig) ->
proplists:get_value(port, Info).
server_config(http, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
[{port, 0},
{server_name,"httpc_test"},
{server_root, ServerRoot},
- {document_root, ?config(doc_root, Config)},
+ {document_root, proplists:get_value(doc_root, Config)},
{bind_address, any},
{ipfamily, inet_version()},
{mime_type, "text/plain"},
@@ -1283,7 +1294,7 @@ start_apps(_) ->
ok.
ssl_config(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
[{certfile, filename:join(DataDir, "ssl_server_cert.pem")},
{verify, verify_none}
].
@@ -1931,9 +1942,9 @@ handle_uri(_,"/once.html",_,_,Socket,_) ->
"Content-Length:32\r\n\r\n",
send(Socket, Head),
send(Socket, "<HTML><BODY>fo"),
- test_server:sleep(1000),
+ ct:sleep(1000),
send(Socket, "ob"),
- test_server:sleep(1000),
+ ct:sleep(1000),
send(Socket, "ar</BODY></HTML>");
handle_uri(_,"/invalid_http.html",_,_,_,_) ->
@@ -2069,7 +2080,7 @@ run_clients(NumClients, ServerPort, SeqNumServer) ->
end
end),
MRef = erlang:monitor(process, Pid),
- timer:sleep(10 + random:uniform(1334)),
+ timer:sleep(10 + rand:uniform(1334)),
{Id, Pid, MRef}
end,
lists:seq(1, NumClients)).
@@ -2158,7 +2169,7 @@ slowly_send_response(CSock, Answer) ->
[length(Answer), Answer])),
lists:foreach(
fun(Char) ->
- timer:sleep(random:uniform(500)),
+ timer:sleep(rand:uniform(500)),
gen_tcp:send(CSock, <<Char>>)
end,
Response).
@@ -2178,9 +2189,8 @@ parse_connection_type(Request) ->
set_random_seed() ->
Unique = erlang:unique_integer(),
-
A = erlang:phash2([make_ref(), self(), Unique]),
- random:seed(A, A, A).
+ rand:seed(exsplus, {A, A, A}).
otp_8739(doc) ->
diff --git a/lib/inets/test/httpc_cookie_SUITE.erl b/lib/inets/test/httpc_cookie_SUITE.erl
index 0eca3edae2..8140967bca 100644
--- a/lib/inets/test/httpc_cookie_SUITE.erl
+++ b/lib/inets/test/httpc_cookie_SUITE.erl
@@ -23,14 +23,8 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
-%% Test server specific exports
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]).
-
-%% Test cases must be exported.
--export([session_cookies_only/1, netscape_cookies/1,
- cookie_cancel/1, cookie_expires/1, persistent_cookie/1,
- domain_cookie/1, secure_cookie/1, update_cookie/1,
- update_cookie_session/1, cookie_attributes/1]).
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
-define(URL, "http://myhost.cookie.test.org").
-define(URL_DOMAIN, "http://myhost2.cookie.test.org").
@@ -38,86 +32,10 @@
%% Test server callback functions
-%%--------------------------------------------------------------------
-%% Function: init_per_testcase(TestCase, Config) -> Config
-%% 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.
-%%
-%% Description: Initiation before each test case
-%%
-%% Note: This function is free to add any key/value pairs to the Config
-%% variable, but should NOT alter/remove any existing entries.
-%% Description: Initiation before each test case
-%%--------------------------------------------------------------------
-init_per_testcase(session_cookies_only = Case, Config0) ->
- tsp("init_per_testcase(~p) -> entry with"
- "~n Config0: ~p", [Case, Config0]),
- Config = init_workdir(Case, Config0),
- application:start(inets),
- httpc:set_options([{cookies, verify}]),
- watch_dog(Config);
-
-init_per_testcase(Case, Config0) ->
- tsp("init_per_testcase(~p) -> entry with"
- "~n Config0: ~p", [Case, Config0]),
- Config = init_workdir(Case, Config0),
- CaseDir = ?config(case_top_dir, Config),
- application:load(inets),
- application:set_env(inets, services, [{httpc, {default, CaseDir}}]),
- application:start(inets),
- httpc:set_options([{cookies, verify}]),
- watch_dog(Config).
-
-watch_dog(Config) ->
- Dog = test_server:timetrap(inets_test_lib:minutes(10)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- [{watchdog, Dog} | NewConfig].
-
-init_workdir(Case, Config) ->
- PrivDir = ?config(priv_dir, Config),
- SuiteTopDir = filename:join(PrivDir, ?MODULE),
- case file:make_dir(SuiteTopDir) of
- ok ->
- ok;
- {error, eexist} ->
- ok;
- Error ->
- tsf({failed_creating_subsuite_top_dir, Error})
- end,
-
- CaseTopDir = filename:join(SuiteTopDir, Case),
- ?line ok = file:make_dir(CaseTopDir),
- [{suite_top_dir, SuiteTopDir},
- {case_top_dir, CaseTopDir} | Config].
-
-
-%%--------------------------------------------------------------------
-%% Function: end_per_testcase(TestCase, Config) -> _
-%% 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.
-%% Description: Cleanup after each test case
-%%--------------------------------------------------------------------
-end_per_testcase(Case, Config) ->
- tsp("end_per_testcase(~p) -> entry with"
- "~n Config: ~p", [Case, Config]),
- application:stop(inets),
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
- ok.
-
-%%--------------------------------------------------------------------
-%% Function: all(Clause) -> TestCases
-%% Clause - atom() - suite | doc
-%% TestCases - [Case]
-%% Case - atom()
-%% Name of a test case.
-%% Description: Returns a list of all test cases in this test suite
-%%--------------------------------------------------------------------
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds,15}}
+ ].
all() ->
[
@@ -148,17 +66,55 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+init_per_testcase(session_cookies_only = Case, Config0) ->
+ Config = init_workdir(Case, Config0),
+ application:start(inets),
+ httpc:set_options([{cookies, verify}]),
+ Config;
+init_per_testcase(cookie_expires = Case, Config0) ->
+ Config = init_workdir(Case, Config0),
+ CaseDir = proplists:get_value(case_top_dir, Config),
+ application:start(inets),
+ application:set_env(inets, services, [{httpc, {default, CaseDir}}]),
+ application:start(inets),
+ httpc:set_options([{cookies, verify}]),
+ Config;
+init_per_testcase(Case, Config0) ->
+ Config = init_workdir(Case, Config0),
+ CaseDir = proplists:get_value(case_top_dir, Config),
+ application:load(inets),
+ application:set_env(inets, services, [{httpc, {default, CaseDir}}]),
+ application:start(inets),
+ httpc:set_options([{cookies, verify}]),
+ Config.
+
+init_workdir(Case, Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ SuiteTopDir = filename:join(PrivDir, ?MODULE),
+ case file:make_dir(SuiteTopDir) of
+ ok ->
+ ok;
+ {error, eexist} ->
+ ok;
+ Error ->
+ ct:fail({failed_creating_subsuite_top_dir, Error})
+ end,
+
+ CaseTopDir = filename:join(SuiteTopDir, Case),
+ ok = file:make_dir(CaseTopDir),
+ [{suite_top_dir, SuiteTopDir},
+ {case_top_dir, CaseTopDir} | Config].
+
+end_per_testcase(_, _) ->
+ application:stop(inets).
+
%% Test cases starts here.
%%--------------------------------------------------------------------
-session_cookies_only(doc) ->
- ["Test that all cookies are handled as session cookies if there"
- "does not exist a directory to save presitent cookies in."];
-session_cookies_only(suite) ->
- [];
+session_cookies_only() ->
+ [{doc, "Test that all cookies are handled as session cookies if there"
+ "does not exist a directory to save presitent cookies in."}].
session_cookies_only(Config) when is_list(Config) ->
- tsp("session_cookies_only -> Cookies 1: ~p", [httpc:which_cookies()]),
-
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/;"
";max-age=60000"}],
httpc:store_cookies(SetCookieHeaders, ?URL),
@@ -166,36 +122,22 @@ session_cookies_only(Config) when is_list(Config) ->
httpc:cookie_header(?URL),
application:stop(inets),
application:start(inets),
- {"cookie", ""} = httpc:cookie_header(?URL),
-
- tsp("session_cookies_only -> Cookies 2: ~p", [httpc:which_cookies()]),
- ok.
+ {"cookie", ""} = httpc:cookie_header(?URL).
-netscape_cookies(doc) ->
- ["Test that the old (original) format of cookies are accepted."];
-netscape_cookies(suite) ->
- [];
+netscape_cookies() ->
+ [{doc, "Test that the old (original) format of cookies are accepted."}].
netscape_cookies(Config) when is_list(Config) ->
- tsp("netscape_cookies -> Cookies 1: ~p", [httpc:which_cookies()]),
-
Expires = future_netscape_date(),
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/; "
"expires=" ++ Expires}],
httpc:store_cookies(SetCookieHeaders, ?URL),
{"cookie", "$Version=0; test_cookie=true; $Path=/"} =
- httpc:cookie_header(?URL),
+ httpc:cookie_header(?URL).
- tsp("netscape_cookies -> Cookies 2: ~p", [httpc:which_cookies()]),
- ok.
-
-cookie_cancel(doc) ->
- ["A cookie can be canceld by sending the same cookie with max-age=0 "
- "this test cheks that cookie is canceled."];
-cookie_cancel(suite) ->
- [];
+cookie_cancel() ->
+ [{doc, "A cookie can be canceld by sending the same cookie with max-age=0 "
+ "this test cheks that cookie is canceled."}].
cookie_cancel(Config) when is_list(Config) ->
- tsp("cookie_cancel -> Cookies 1: ~p", [httpc:which_cookies()]),
-
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/;"
"max-age=60000"}],
httpc:store_cookies(SetCookieHeaders, ?URL),
@@ -204,155 +146,60 @@ cookie_cancel(Config) when is_list(Config) ->
NewSetCookieHeaders =
[{"set-cookie", "test_cookie=true; path=/;max-age=0"}],
httpc:store_cookies(NewSetCookieHeaders, ?URL),
- {"cookie", ""} = httpc:cookie_header(?URL),
+ {"cookie", ""} = httpc:cookie_header(?URL).
- tsp("cookie_cancel -> Cookies 2: ~p", [httpc:which_cookies()]),
- ok.
-
-cookie_expires(doc) ->
- ["Test that a cookie is not used when it has expired"];
-cookie_expires(suite) ->
- [];
+cookie_expires() ->
+ [{doc, "Test that a cookie is not used when it has expired"}].
cookie_expires(Config) when is_list(Config) ->
- tsp("cookie_expires -> Cookies 1: ~p", [httpc:which_cookies()]),
-
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/;"
"max-age=5"}],
httpc:store_cookies(SetCookieHeaders, ?URL),
{"cookie", "$Version=0; test_cookie=true; $Path=/"} =
httpc:cookie_header(?URL),
- test_server:sleep(10000),
- {"cookie", ""} = httpc:cookie_header(?URL),
+ timer:sleep(10000),
+ {"cookie", ""} = httpc:cookie_header(?URL).
- tsp("cookie_expires -> Cookies 2: ~p", [httpc:which_cookies()]),
- ok.
-
-persistent_cookie(doc) ->
- ["Test domian cookie attribute"];
-persistent_cookie(suite) ->
- [];
+persistent_cookie() ->
+ [{doc, "Test domian cookie attribute"}].
persistent_cookie(Config) when is_list(Config)->
- tsp("persistent_cookie -> Cookies 1: ~p", [httpc:which_cookies()]),
-
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/;"
"max-age=60000"}],
httpc:store_cookies(SetCookieHeaders, ?URL),
{"cookie", "$Version=0; test_cookie=true; $Path=/"} =
httpc:cookie_header(?URL),
- CaseDir = ?config(case_top_dir, Config),
+ CaseDir = proplists:get_value(case_top_dir, Config),
application:stop(inets),
application:load(inets),
application:set_env(inets, services, [{httpc, {default, CaseDir}}]),
application:start(inets),
httpc:set_options([{cookies, enabled}]),
- {"cookie","$Version=0; test_cookie=true; $Path=/"} = httpc:cookie_header(?URL),
+ {"cookie","$Version=0; test_cookie=true; $Path=/"} = httpc:cookie_header(?URL).
- tsp("persistent_cookie -> Cookies 2: ~p", [httpc:which_cookies()]),
- ok.
-
-
-domain_cookie(doc) ->
- ["Test the domian cookie attribute"];
-domain_cookie(suite) ->
- [];
+domain_cookie() ->
+ [{doc, "Test the domian cookie attribute"}].
domain_cookie(Config) when is_list(Config) ->
- tsp("domain_cookie -> Cookies 1: ~p", [httpc:which_cookies()]),
-
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/;"
"domain=.cookie.test.org"}],
httpc:store_cookies(SetCookieHeaders, ?URL),
{"cookie","$Version=0; test_cookie=true; $Path=/; "
"$Domain=.cookie.test.org"} =
- httpc:cookie_header(?URL_DOMAIN),
+ httpc:cookie_header(?URL_DOMAIN).
- tsp("domain_cookie -> Cookies 2: ~p", [httpc:which_cookies()]),
- ok.
-
-
-secure_cookie(doc) ->
- ["Test the secure cookie attribute"];
-secure_cookie(suite) ->
- [];
+secure_cookie() ->
+ [{doc, "Test the secure cookie attribute"}].
secure_cookie(Config) when is_list(Config) ->
- tsp("secure_cookie -> entry with"
- "~n Config: ~p", [Config]),
-
- %% httpc:reset_cookies(),
-
- tsp("secure_cookie -> Cookies 1: ~p", [httpc:which_cookies()]),
-
SetCookieHeaders = [{"set-cookie", "test_cookie=true; path=/; secure"}],
- tsp("secure_cookie -> store cookies (1)"),
ok = httpc:store_cookies(SetCookieHeaders, ?URL),
-
- tsp("secure_cookie -> Cookies 2: ~p", [httpc:which_cookies()]),
-
- tsp("secure_cookie -> check cookie (secure)"),
check_cookie("$Version=0; test_cookie=true; $Path=/", ?URL_SECURE),
-
- tsp("secure_cookie -> check cookie (plain)"),
check_cookie("", ?URL),
-
- tsp("secure_cookie -> store cookies (2)"),
SetCookieHeaders1 = [{"set-cookie", "test1_cookie=true; path=/; secure"}],
ok = httpc:store_cookies(SetCookieHeaders1, ?URL),
-
- tsp("secure_cookie -> Cookies 3: ~p", [httpc:which_cookies()]),
-
- tsp("secure_cookie -> cookie header (3)"),
check_cookie("$Version=0; test_cookie=true; $Path=/; "
"test1_cookie=true; $Path=/",
- ?URL_SECURE),
-%% {"cookie","$Version=0; test_cookie=true; $Path=/; "
-%% "test1_cookie=true; $Path=/"} = httpc:cookie_header(?URL_SECURE),
-
- tsp("secure_cookie -> Cookies 4: ~p", [httpc:which_cookies()]),
-
- tsp("secure_cookie -> done"),
- ok.
+ ?URL_SECURE).
-expect_cookie_header(No, ExpectedCookie) ->
- case httpc:cookie_header(?URL) of
- {"cookie", ExpectedCookie} ->
- ok;
- {"cookie", BadCookie} ->
- io:format("Bad Cookie ~w: "
- "~n Expected: ~s"
- "~n Received: ~s"
- "~n", [No, ExpectedCookie, BadCookie]),
- exit({bad_cookie_header, No, ExpectedCookie, BadCookie})
- end.
-
-print_cookies(Pre) ->
- io:format("~s: ", [Pre]),
- print_cookies2(httpc:which_cookies()).
-
-print_cookies2([]) ->
- ok;
-print_cookies2([{cookies, Cookies}|Rest]) ->
- print_cookies3("Cookies", Cookies),
- print_cookies2(Rest);
-print_cookies2([{session_cookies, Cookies}|Rest]) ->
- print_cookies3("Session Cookies", Cookies),
- print_cookies2(Rest);
-print_cookies2([_|Rest]) ->
- print_cookies2(Rest).
-
-print_cookies3(Header, []) ->
- io:format(" ~s: []", [Header]);
-print_cookies3(Header, Cookies) ->
- io:format(" ~s: ", [Header]),
- Prefix = " ",
- PrintCookie =
- fun(Cookie) ->
- io:format("~s", [httpc_cookie:image_of(Prefix, Cookie)])
- end,
- lists:foreach(PrintCookie, Cookies).
-
-update_cookie(doc)->
- ["Test that a (plain) cookie can be updated."];
-update_cookie(suite) ->
- [];
+update_cookie()->
+ [{doc, "Test that a (plain) cookie can be updated."}].
update_cookie(Config) when is_list(Config) ->
print_cookies("Cookies before store"),
@@ -377,10 +224,8 @@ update_cookie(Config) when is_list(Config) ->
"test_cookie=false; $Path=/",
expect_cookie_header(2, ExpectCookie2).
-update_cookie_session(doc)->
- ["Test that a session cookie can be updated."];
-update_cookie_session(suite) ->
- [];
+update_cookie_session()->
+ [{doc, "Test that a session cookie can be updated."}].
update_cookie_session(Config) when is_list(Config)->
print_cookies("Cookies before store"),
@@ -400,23 +245,57 @@ update_cookie_session(Config) when is_list(Config)->
expect_cookie_header(2, ExpectedCookie2).
-cookie_attributes(doc) ->
- ["Test attribute not covered by the other test cases"];
-cookie_attributes(suite) ->
- [];
+cookie_attributes() ->
+ [{doc, "Test attribute not covered by the other test cases"}].
cookie_attributes(Config) when is_list(Config) ->
SetCookieHeaders = [{"set-cookie", "test_cookie=true;version=1;"
"comment=foobar; "%% Comment
"foo=bar;" %% Nonsense should be ignored
"max-age=60000"}],
httpc:store_cookies(SetCookieHeaders, ?URL),
- {"cookie","$Version=1; test_cookie=true"} = httpc:cookie_header(?URL),
- ok.
+ {"cookie","$Version=1; test_cookie=true"} = httpc:cookie_header(?URL).
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+print_cookies(Pre) ->
+ io:format("~s: ", [Pre]),
+ print_cookies2(httpc:which_cookies()).
+
+print_cookies2([]) ->
+ ok;
+print_cookies2([{cookies, Cookies}|Rest]) ->
+ print_cookies3("Cookies", Cookies),
+ print_cookies2(Rest);
+print_cookies2([{session_cookies, Cookies}|Rest]) ->
+ print_cookies3("Session Cookies", Cookies),
+ print_cookies2(Rest);
+print_cookies2([_|Rest]) ->
+ print_cookies2(Rest).
+
+print_cookies3(Header, []) ->
+ io:format(" ~s: []", [Header]);
+print_cookies3(Header, Cookies) ->
+ io:format(" ~s: ", [Header]),
+ Prefix = " ",
+ PrintCookie =
+ fun(Cookie) ->
+ io:format("~s", [httpc_cookie:image_of(Prefix, Cookie)])
+ end,
+ lists:foreach(PrintCookie, Cookies).
+
+expect_cookie_header(No, ExpectedCookie) ->
+ case httpc:cookie_header(?URL) of
+ {"cookie", ExpectedCookie} ->
+ ok;
+ {"cookie", BadCookie} ->
+ io:format("Bad Cookie ~w: "
+ "~n Expected: ~s"
+ "~n Received: ~s"
+ "~n", [No, ExpectedCookie, BadCookie]),
+ exit({bad_cookie_header, No, ExpectedCookie, BadCookie})
+ end.
check_cookie(Expect, URL) ->
case httpc:cookie_header(URL) of
@@ -426,12 +305,12 @@ check_cookie(Expect, URL) ->
case lists:prefix(Expect, Unexpected) of
true ->
Extra = Unexpected -- Expect,
- tsf({extra_cookie_info, Extra});
+ ct:fail({extra_cookie_info, Extra});
false ->
- tsf({unknown_cookie, Expect, Unexpected})
+ ct:fail({unknown_cookie, Expect, Unexpected})
end;
Bad ->
- tsf({bad_cookies, Bad})
+ ct:fail({bad_cookies, Bad})
end.
@@ -509,11 +388,3 @@ month_str(11) ->"Nov";
month_str(12) ->"Dec".
-tsp(F) ->
- tsp(F, []).
-tsp(F, A) ->
- test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]).
-
-tsf(Reason) ->
- test_server:fail(Reason).
-
diff --git a/lib/inets/test/httpc_proxy_SUITE.erl b/lib/inets/test/httpc_proxy_SUITE.erl
index 2f6f0bc26f..198b245399 100644
--- a/lib/inets/test/httpc_proxy_SUITE.erl
+++ b/lib/inets/test/httpc_proxy_SUITE.erl
@@ -141,7 +141,7 @@ end_per_testcase(_Case, Config) ->
%% internal functions
apps(_Case, Config) ->
- case ?config(protocol, Config) of
+ case proplists:get_value(protocol, Config) of
https ->
[ssl];
_ ->
@@ -438,7 +438,7 @@ header_value(Name, [{HeaderName,HeaderValue}|Headers]) ->
https_connect_error(doc) ->
["Error from CONNECT tunnel should be returned"];
https_connect_error(Config) when is_list(Config) ->
- {HttpServer,HttpPort} = ?config(http, Config),
+ {HttpServer,HttpPort} = proplists:get_value(http, Config),
Method = get,
%% using HTTPS scheme with HTTP port to trigger connection error
URL = "https://" ++ HttpServer ++ ":" ++
@@ -477,7 +477,7 @@ app_start(App, Config) ->
inets ->
application:stop(App),
ok = application:start(App),
- case ?config(proxy, Config) of
+ case proplists:get_value(proxy, Config) of
undefined -> ok;
{_,ProxySpec} ->
ok = httpc:set_options([{proxy,ProxySpec}])
@@ -495,7 +495,7 @@ app_stop(App) ->
application:stop(App).
make_cert_files(Alg, Prefix, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
CaInfo = {CaCert,_} = erl_make_certs:make_cert([{key,Alg}]),
{Cert,CertKey} = erl_make_certs:make_cert([{key,Alg},{issuer,CaInfo}]),
CaCertFile = filename:join(PrivDir, Prefix++"cacerts.pem"),
@@ -513,8 +513,8 @@ der_to_pem(File, Entries) ->
url(AbsPath, Config) ->
- Protocol = ?config(protocol, Config),
- {ServerName,ServerPort} = ?config(Protocol, Config),
+ Protocol = proplists:get_value(protocol, Config),
+ {ServerName,ServerPort} = proplists:get_value(Protocol, Config),
atom_to_list(Protocol) ++ "://" ++
ServerName ++ ":" ++ integer_to_list(ServerPort) ++
AbsPath.
@@ -548,8 +548,8 @@ init_local_proxy_string(String, Config) ->
|Config].
rcmd_local_proxy(Args, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Script = filename:join(DataDir, ?LOCAL_PROXY_SCRIPT),
rcmd(Script, Args, [{cd,PrivDir}]).
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 93520c1cb4..f5167116ce 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -46,7 +46,9 @@
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
suite() ->
- [{ct_hooks,[ts_install_cth]}].
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds, 120}}
+ ].
all() ->
[
@@ -149,8 +151,8 @@ load() ->
].
init_per_suite(Config) ->
- PrivDir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
inets_test_lib:stop_apps([inets]),
ServerRoot = filename:join(PrivDir, "server_root"),
inets_test_lib:del_dirs(ServerRoot),
@@ -218,22 +220,22 @@ init_per_group(http_0_9, Config) ->
[{http_version, "HTTP/0.9"} | Config]
end;
init_per_group(http_htaccess = Group, Config) ->
- Path = ?config(doc_root, Config),
+ Path = proplists:get_value(doc_root, Config),
catch remove_htaccess(Path),
- create_htaccess_data(Path, ?config(address, Config)),
+ create_htaccess_data(Path, proplists:get_value(address, Config)),
ok = start_apps(Group),
init_httpd(Group, [{type, ip_comm} | Config]);
init_per_group(https_htaccess = Group, Config) ->
- Path = ?config(doc_root, Config),
+ Path = proplists:get_value(doc_root, Config),
catch remove_htaccess(Path),
- create_htaccess_data(Path, ?config(address, Config)),
+ create_htaccess_data(Path, proplists:get_value(address, Config)),
init_ssl(Group, Config);
init_per_group(auth_api, Config) ->
[{auth_prefix, ""} | Config];
init_per_group(auth_api_dets, Config) ->
[{auth_prefix, "dets_"} | Config];
init_per_group(auth_api_mnesia, Config) ->
- start_mnesia(?config(node, Config)),
+ start_mnesia(proplists:get_value(node, Config)),
[{auth_prefix, "mnesia_"} | Config];
init_per_group(_, Config) ->
Config.
@@ -271,7 +273,8 @@ end_per_group(_, _) ->
%%--------------------------------------------------------------------
init_per_testcase(Case, Config) when Case == host; Case == trace ->
- Prop = ?config(tc_group_properties, Config),
+ ct:timetrap({seconds, 20}),
+ Prop = proplists:get_value(tc_group_properties, Config),
Name = proplists:get_value(name, Prop),
Cb = case Name of
http_1_0 ->
@@ -282,11 +285,13 @@ init_per_testcase(Case, Config) when Case == host; Case == trace ->
[{version_cb, Cb} | proplists:delete(version_cb, Config)];
init_per_testcase(range, Config) ->
- DocRoot = ?config(doc_root, Config),
+ ct:timetrap({seconds, 20}),
+ DocRoot = proplists:get_value(doc_root, Config),
create_range_data(DocRoot),
Config;
init_per_testcase(_, Config) ->
+ ct:timetrap({seconds, 20}),
Config.
end_per_testcase(_Case, _Config) ->
@@ -300,10 +305,10 @@ head() ->
[{doc, "HTTP HEAD request for static page"}].
head(Config) when is_list(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config), proplists:get_value(node, Config),
http_request("HEAD /index.html ", Version, Host),
[{statuscode, head_status(Version)},
{version, Version}]).
@@ -312,13 +317,13 @@ get() ->
[{doc, "HTTP GET request for static page"}].
get(Config) when is_list(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config),
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
http_request("GET /index.html ", Version, Host),
[{statuscode, 200},
{header, "Content-Type", "text/html"},
@@ -339,8 +344,8 @@ basic_auth() ->
[{doc, "Test Basic authentication with WWW-Authenticate header"}].
basic_auth(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
basic_auth_requiered(Config),
%% Authentication OK! ["one:OnePassword" user first in user list]
ok = auth_status(auth_request("/open/dummy.html", "one", "onePassword", Version, Host), Config,
@@ -380,15 +385,15 @@ auth_api() ->
[{doc, "Test mod_auth API"}].
auth_api(Config) when is_list(Config) ->
- Prefix = ?config(auth_prefix, Config),
+ Prefix = proplists:get_value(auth_prefix, Config),
do_auth_api(Prefix, Config).
do_auth_api(AuthPrefix, Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- Node = ?config(node, Config),
- ServerRoot = ?config(server_root, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ Node = proplists:get_value(node, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
ok = http_status("GET / ", Config,
[{statuscode, 200}]),
ok = auth_status(auth_request("/", "one", "WrongPassword", Version, Host), Config,
@@ -550,12 +555,12 @@ ipv6(Config) when is_list(Config) ->
{ok, Hostname0} = inet:gethostname(),
case lists:member(list_to_atom(Hostname0), ct:get_config(ipv6_hosts)) of
true ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
URI = http_request("GET / ", Version, Host),
- httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), [inet6],
- ?config(code, Config),
+ httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config), [inet6],
+ proplists:get_value(code, Config),
URI,
[{statuscode, 200}, {version, Version}]);
false ->
@@ -576,11 +581,11 @@ htaccess() ->
[{doc, "Test mod_auth API"}].
htaccess(Config) when is_list(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- Port = ?config(port, Config),
- Node = ?config(node, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ Port = proplists:get_value(port, Config),
+ Node = proplists:get_value(node, Config),
%% Control that authentication required!
%% Control that the pages that shall be
%% authenticated really need authenticatin
@@ -691,23 +696,23 @@ host() ->
[{doc, "Test host header"}].
host(Config) when is_list(Config) ->
- Cb = ?config(version_cb, Config),
- Cb:host(?config(type, Config), ?config(port, Config),
- ?config(host, Config), ?config(node, Config)).
+ Cb = proplists:get_value(version_cb, Config),
+ Cb:host(proplists:get_value(type, Config), proplists:get_value(port, Config),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)).
%%-------------------------------------------------------------------------
chunked() ->
[{doc, "Check that the server accepts chunked requests."}].
chunked(Config) when is_list(Config) ->
- httpd_1_1:chunked(?config(type, Config), ?config(port, Config),
- ?config(host, Config), ?config(node, Config)).
+ httpd_1_1:chunked(proplists:get_value(type, Config), proplists:get_value(port, Config),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)).
%%-------------------------------------------------------------------------
expect() ->
["Check that the server handles request with the expect header "
"field appropiate"].
expect(Config) when is_list(Config) ->
- httpd_1_1:expect(?config(type, Config), ?config(port, Config),
- ?config(host, Config), ?config(node, Config)).
+ httpd_1_1:expect(proplists:get_value(type, Config), proplists:get_value(port, Config),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)).
%%-------------------------------------------------------------------------
max_clients_1_1() ->
[{doc, "Test max clients limit"}].
@@ -762,10 +767,10 @@ esi(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
mod_esi_chunk_timeout(Config) when is_list(Config) ->
- ok = httpd_1_1:mod_esi_chunk_timeout(?config(type, Config),
- ?config(port, Config),
- ?config(host, Config),
- ?config(node, Config)).
+ ok = httpd_1_1:mod_esi_chunk_timeout(proplists:get_value(type, Config),
+ proplists:get_value(port, Config),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)).
%%-------------------------------------------------------------------------
cgi() ->
@@ -846,7 +851,7 @@ cgi(Config) when is_list(Config) ->
cgi_chunked_encoding_test() ->
[{doc, "Test chunked encoding together with mod_cgi "}].
cgi_chunked_encoding_test(Config) when is_list(Config) ->
- Host = ?config(host, Config),
+ Host = proplists:get_value(host, Config),
Script =
case test_server:os_type() of
{win32, _} ->
@@ -858,9 +863,9 @@ cgi_chunked_encoding_test(Config) when is_list(Config) ->
["GET " ++ Script ++ " HTTP/1.1\r\nHost:"++ Host ++"\r\n\r\n",
"GET /cgi-bin/erl/httpd_example/newformat HTTP/1.1\r\nHost:"
++ Host ++"\r\n\r\n"],
- httpd_1_1:mod_cgi_chunked_encoding_test(?config(type, Config), ?config(port, Config),
+ httpd_1_1:mod_cgi_chunked_encoding_test(proplists:get_value(type, Config), proplists:get_value(port, Config),
Host,
- ?config(node, Config),
+ proplists:get_value(node, Config),
Requests).
%%-------------------------------------------------------------------------
alias_1_1() ->
@@ -920,52 +925,52 @@ range() ->
[{doc, "Test Range header"}].
range(Config) when is_list(Config) ->
- httpd_1_1:range(?config(type, Config), ?config(port, Config),
- ?config(host, Config), ?config(node, Config)).
+ httpd_1_1:range(proplists:get_value(type, Config), proplists:get_value(port, Config),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)).
%%-------------------------------------------------------------------------
if_modified_since() ->
[{doc, "Test If-Modified-Since header"}].
if_modified_since(Config) when is_list(Config) ->
- httpd_1_1:if_test(?config(type, Config), ?config(port, Config),
- ?config(host, Config), ?config(node, Config),
- ?config(doc_root, Config)).
+ httpd_1_1:if_test(proplists:get_value(type, Config), proplists:get_value(port, Config),
+ proplists:get_value(host, Config), proplists:get_value(node, Config),
+ proplists:get_value(doc_root, Config)).
%%-------------------------------------------------------------------------
trace() ->
[{doc, "Test TRACE method"}].
trace(Config) when is_list(Config) ->
- Cb = ?config(version_cb, Config),
- Cb:trace(?config(type, Config), ?config(port, Config),
- ?config(host, Config), ?config(node, Config)).
+ Cb = proplists:get_value(version_cb, Config),
+ Cb:trace(proplists:get_value(type, Config), proplists:get_value(port, Config),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)).
%%-------------------------------------------------------------------------
light() ->
["Test light load"].
light(Config) when is_list(Config) ->
- httpd_load:load_test(?config(type, Config), ?config(port, Config), ?config(host, Config),
- ?config(node, Config), 10).
+ httpd_load:load_test(proplists:get_value(type, Config), proplists:get_value(port, Config), proplists:get_value(host, Config),
+ proplists:get_value(node, Config), 10).
%%-------------------------------------------------------------------------
medium() ->
["Test medium load"].
medium(Config) when is_list(Config) ->
- httpd_load:load_test(?config(type, Config), ?config(port, Config), ?config(host, Config),
- ?config(node, Config), 100).
+ httpd_load:load_test(proplists:get_value(type, Config), proplists:get_value(port, Config), proplists:get_value(host, Config),
+ proplists:get_value(node, Config), 100).
%%-------------------------------------------------------------------------
heavy() ->
["Test heavy load"].
heavy(Config) when is_list(Config) ->
- httpd_load:load_test(?config(type, Config), ?config(port, Config), ?config(host, Config),
- ?config(node, Config),
+ httpd_load:load_test(proplists:get_value(type, Config), proplists:get_value(port, Config), proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
1000).
%%-------------------------------------------------------------------------
content_length() ->
["Tests that content-length is correct OTP-5775"].
content_length(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config), proplists:get_value(node, Config),
http_request("GET /cgi-bin/erl/httpd_example:get_bin ",
Version, Host),
[{statuscode, 200},
@@ -975,10 +980,10 @@ content_length(Config) ->
bad_hex() ->
["Tests that a URI with a bad hexadecimal code is handled OTP-6003"].
bad_hex(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config), proplists:get_value(node, Config),
http_request("GET http://www.erlang.org/%skalle ",
Version, Host),
[{statuscode, 400},
@@ -987,10 +992,10 @@ bad_hex(Config) ->
missing_CR() ->
["Tests missing CR in delimiter OTP-7304"].
missing_CR(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config), ?config(node, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config), proplists:get_value(node, Config),
http_request_missing_CR("GET /index.html ", Version, Host),
[{statuscode, 200},
{version, Version}]).
@@ -1001,12 +1006,12 @@ customize() ->
customize(Config) when is_list(Config) ->
Version = "HTTP/1.1",
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config),
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
http_request("GET /index.html ", Version, Host),
[{statuscode, 200},
{header, "Content-Type", "text/html"},
@@ -1019,12 +1024,12 @@ add_default() ->
add_default(Config) when is_list(Config) ->
Version = "HTTP/1.1",
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- ok = httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ ok = httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config),
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
http_request("GET /index.html ", Version, Host),
[{statuscode, 200},
{header, "Content-Type", "text/html"},
@@ -1036,24 +1041,24 @@ add_default(Config) when is_list(Config) ->
max_header() ->
["Denial Of Service (DOS) attack, prevented by max_header"].
max_header(Config) when is_list(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
case Version of
"HTTP/0.9" ->
{skip, not_implemented};
_ ->
- dos_hostname(?config(type, Config), ?config(port, Config), Host,
- ?config(node, Config), Version, ?MAX_HEADER_SIZE)
+ dos_hostname(proplists:get_value(type, Config), proplists:get_value(port, Config), Host,
+ proplists:get_value(node, Config), Version, ?MAX_HEADER_SIZE)
end.
%%-------------------------------------------------------------------------
max_content_length() ->
["Denial Of Service (DOS) attack, prevented by max_content_length"].
max_content_length(Config) when is_list(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- garbage_content_length(?config(type, Config), ?config(port, Config), Host,
- ?config(node, Config), Version).
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ garbage_content_length(proplists:get_value(type, Config), proplists:get_value(port, Config), Host,
+ proplists:get_value(node, Config), Version).
%%-------------------------------------------------------------------------
security_1_1(Config) when is_list(Config) ->
@@ -1065,15 +1070,15 @@ security_1_0(Config) when is_list(Config) ->
security() ->
["Test mod_security"].
security(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- Node = ?config(node, Config),
- ServerRoot = ?config(server_root, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ Node = proplists:get_value(node, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
global:register_name(mod_security_test, self()), % Receive events
- test_server:sleep(5000),
+ ct:sleep(5000),
OpenDir = filename:join([ServerRoot, "htdocs", "open"]),
@@ -1171,7 +1176,7 @@ security(Config) ->
["one"] = list_auth_users(Node, Port, OpenDir),
%% Wait for successful auth to timeout.
- test_server:sleep(?AUTH_TIMEOUT*1001),
+ ct:sleep(?AUTH_TIMEOUT*1001),
[] = list_auth_users(Node, Port),
@@ -1200,11 +1205,11 @@ disturbing_reconfiger_dies(Config) when is_list(Config) ->
do_reconfiger_dies([{http_version, "HTTP/1.1"} | Config], disturbing).
do_reconfiger_dies(Config, DisturbingType) ->
- Server = ?config(server_pid, Config),
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- Type = ?config(type, Config),
+ Server = proplists:get_value(server_pid, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ Type = proplists:get_value(type, Config),
HttpdConfig = httpd:info(Server),
BlockRequest = http_request("GET /eval?httpd_example:delay(2000) ", Version, Host),
@@ -1235,11 +1240,11 @@ disturbing_0_9(Config) when is_list(Config) ->
disturbing([{http_version, "HTTP/0.9"} | Config]).
disturbing(Config) when is_list(Config)->
- Server = ?config(server_pid, Config),
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- Type = ?config(type, Config),
+ Server = proplists:get_value(server_pid, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ Type = proplists:get_value(type, Config),
HttpdConfig = httpd:info(Server),
BlockRequest = http_request("GET /eval?httpd_example:delay(2000) ", Version, Host),
{ok, Socket} = inets_test_lib:connect_bin(Type, Host, Port, transport_opts(Type, Config)),
@@ -1267,11 +1272,11 @@ non_disturbing_0_9(Config) when is_list(Config) ->
non_disturbing([{http_version, "HTTP/0.9"} | Config]).
non_disturbing(Config) when is_list(Config)->
- Server = ?config(server_pid, Config),
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- Type = ?config(type, Config),
+ Server = proplists:get_value(server_pid, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ Type = proplists:get_value(type, Config),
HttpdConfig = httpd:info(Server),
BlockRequest = http_request("GET /eval?httpd_example:delay(2000) ", Version, Host),
@@ -1296,15 +1301,15 @@ non_disturbing(Config) when is_list(Config)->
%% Internal functions -----------------------------------
%%--------------------------------------------------------------------
url(http, End, Config) ->
- Port = ?config(port, Config),
+ Port = proplists:get_value(port, Config),
{ok,Host} = inet:gethostname(),
?URL_START ++ Host ++ ":" ++ integer_to_list(Port) ++ End.
do_max_clients(Config) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- Type = ?config(type, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ Type = proplists:get_value(type, Config),
Request = http_request("GET /index.html ", Version, Host),
BlockRequest = http_request("GET /eval?httpd_example:delay(2000) ", Version, Host),
@@ -1314,7 +1319,7 @@ do_max_clients(Config) ->
ok = httpd_test_lib:verify_request(Type, Host,
Port,
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
Request,
[{statuscode, 503},
{version, Version}]),
@@ -1327,7 +1332,7 @@ do_max_clients(Config) ->
ok = httpd_test_lib:verify_request(Type, Host,
Port,
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
Request,
[{statuscode, 200},
{version, Version}]).
@@ -1406,7 +1411,7 @@ server_start(_, HttpdConfig) ->
{Pid, proplists:get_value(port, Info)}.
init_ssl(Group, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
CaKey = {_Trusted,_} =
erl_make_certs:make_cert([{key, dsa},
{subject,
@@ -1457,54 +1462,54 @@ server_config(https_custom, Config) ->
server_config(https_limit, Config) ->
[{max_clients, 1}] ++ server_config(https, Config);
server_config(http_basic_auth, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_conf(ServerRoot) ++ server_config(http, Config);
server_config(https_basic_auth, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_conf(ServerRoot) ++ server_config(https, Config);
server_config(http_auth_api, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_api_conf(ServerRoot, plain) ++ server_config(http, Config);
server_config(https_auth_api, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_api_conf(ServerRoot, plain) ++ server_config(https, Config);
server_config(http_auth_api_dets, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_api_conf(ServerRoot, dets) ++ server_config(http, Config);
server_config(https_auth_api_dets, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_api_conf(ServerRoot, dets) ++ server_config(https, Config);
server_config(http_auth_api_mnesia, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_api_conf(ServerRoot, mnesia) ++ server_config(http, Config);
server_config(https_auth_api_mnesia, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
auth_api_conf(ServerRoot, mnesia) ++ server_config(https, Config);
server_config(http_htaccess, Config) ->
auth_access_conf() ++ server_config(http, Config);
server_config(https_htaccess, Config) ->
auth_access_conf() ++ server_config(https, Config);
server_config(http_security, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
tl(auth_conf(ServerRoot)) ++ security_conf(ServerRoot) ++ server_config(http, Config);
server_config(https_security, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
tl(auth_conf(ServerRoot)) ++ security_conf(ServerRoot) ++ server_config(https, Config);
server_config(http_mime_types, Config0) ->
Config1 = basic_conf() ++ server_config(http, Config0),
- ServerRoot = ?config(server_root, Config0),
+ ServerRoot = proplists:get_value(server_root, Config0),
MimeTypesFile = filename:join([ServerRoot,"config", "mime.types"]),
[{mime_types, MimeTypesFile} | proplists:delete(mime_types, Config1)];
server_config(http, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
[{port, 0},
{socket_type, {ip_comm, [{nodelay, true}]}},
{server_name,"httpd_test"},
{server_root, ServerRoot},
- {document_root, ?config(doc_root, Config)},
+ {document_root, proplists:get_value(doc_root, Config)},
{bind_address, any},
- {ipfamily, ?config(ipfamily, Config)},
+ {ipfamily, proplists:get_value(ipfamily, Config)},
{max_header_size, 256},
{max_header_action, close},
{directory_index, ["index.html", "welcome.html"]},
@@ -1519,7 +1524,7 @@ server_config(http, Config) ->
];
server_config(https, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
[{socket_type, {essl,
[{nodelay, true},
{cacertfile,
@@ -1693,35 +1698,35 @@ mod_security_conf(SecFile, Dir) ->
http_status(Request, Config, Expected) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config),
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
http_request(Request, Version, Host),
Expected ++ [{version, Version}]).
http_status(Request, HeadersAndBody, Config, Expected) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config),
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
http_request(Request, Version, Host, HeadersAndBody),
Expected ++ [{version, Version}]).
auth_status(AuthRequest, Config, Expected) ->
- Version = ?config(http_version, Config),
- Host = ?config(host, Config),
- Type = ?config(type, Config),
- httpd_test_lib:verify_request(?config(type, Config), Host,
- ?config(port, Config),
+ Version = proplists:get_value(http_version, Config),
+ Host = proplists:get_value(host, Config),
+ Type = proplists:get_value(type, Config),
+ httpd_test_lib:verify_request(proplists:get_value(type, Config), Host,
+ proplists:get_value(port, Config),
transport_opts(Type, Config),
- ?config(node, Config),
+ proplists:get_value(node, Config),
AuthRequest,
Expected ++ [{version, Version}]).
@@ -1773,11 +1778,11 @@ cleanup_mnesia() ->
ok.
transport_opts(ssl, Config) ->
- PrivDir = ?config(priv_dir, Config),
- [?config(ipfamily, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ [proplists:get_value(ipfamily, Config),
{cacertfile, filename:join(PrivDir, "public_key_cacert.pem")}];
transport_opts(_, Config) ->
- [?config(ipfamily, Config)].
+ [proplists:get_value(ipfamily, Config)].
%%% mod_range
@@ -2076,4 +2081,4 @@ peer(Config) ->
"true";
_ ->
"false"
- end. \ No newline at end of file
+ end.
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 352ff3b1ae..f413248092 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -30,7 +30,8 @@
-define(URL_START, "http://localhost:").
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() -> [{ct_hooks,[ts_install_cth]},
+ {timetrap, {seconds, 30}}].
all() ->
[uri_too_long_414,
@@ -66,8 +67,8 @@ end_per_group(_GroupName, Config) ->
init_per_suite(Config) ->
inets_test_lib:stop_apps([inets]),
inets_test_lib:start_apps([inets]),
- PrivDir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
Dummy =
"<HTML>
@@ -152,7 +153,7 @@ end_per_testcase(_Case, Config) ->
uri_too_long_414() ->
[{doc, "Test that too long uri's get 414 HTTP code"}].
uri_too_long_414(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{max_uri_size, 10}
| HttpdConf]),
Info = httpd:info(Pid),
@@ -173,7 +174,7 @@ uri_too_long_414(Config) when is_list(Config) ->
header_too_long_413() ->
[{doc,"Test that too long headers's get 413 HTTP code"}].
header_too_long_413(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{max_header_size, 10}
| HttpdConf]),
Info = httpd:info(Pid),
@@ -192,7 +193,7 @@ header_too_long_413(Config) when is_list(Config) ->
entity_too_long() ->
[{doc, "Test that too long versions and method strings are rejected"}].
entity_too_long(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, HttpdConf),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -259,7 +260,7 @@ erl_script_nocache_opt(doc) ->
erl_script_nocache_opt(suite) ->
[];
erl_script_nocache_opt(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0}, {erl_script_nocache, true} | HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -282,7 +283,7 @@ erl_script_nocache_opt(Config) when is_list(Config) ->
escaped_url_in_error_body() ->
[{doc, "Test Url-encoding see OTP-8940"}].
escaped_url_in_error_body(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0} | HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -324,7 +325,7 @@ keep_alive_timeout(doc) ->
keep_alive_timeout(suite) ->
[];
keep_alive_timeout(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0}, {keep_alive, true}, {keep_alive_timeout, 2} | HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -348,9 +349,9 @@ script_timeout(Config) when is_list(Config) ->
ok.
verify_script_timeout(Config, ScriptTimeout, StatusCode) ->
- HttpdConf = ?config(httpd_conf, Config),
- CgiScript = ?config(cgi_sleep, Config),
- CgiDir = ?config(cgi_dir, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
+ CgiScript = proplists:get_value(cgi_sleep, Config),
+ CgiDir = proplists:get_value(cgi_dir, Config),
{ok, Pid} = inets:start(httpd, [{port, 0},
{script_alias,
{"/cgi-bin/", CgiDir ++ "/"}},
@@ -371,7 +372,7 @@ verify_script_timeout(Config, ScriptTimeout, StatusCode) ->
slowdose() ->
[{doc, "Testing minimum bytes per second option"}].
slowdose(Config) when is_list(Config) ->
- HttpdConf = ?config(httpd_conf, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0}, {minimum_bytes_per_second, 200}|HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -386,9 +387,9 @@ slowdose(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
verify_script_nocache(Config, CgiNoCache, EsiNoCache, CgiOption, EsiOption) ->
- HttpdConf = ?config(httpd_conf, Config),
- CgiScript = ?config(cgi_printenv, Config),
- CgiDir = ?config(cgi_dir, Config),
+ HttpdConf = proplists:get_value(httpd_conf, Config),
+ CgiScript = proplists:get_value(cgi_printenv, Config),
+ CgiDir = proplists:get_value(cgi_dir, Config),
{ok, Pid} = inets:start(httpd, [{port, 0},
{script_alias,
{"/cgi-bin/", CgiDir ++ "/"}},
diff --git a/lib/inets/test/httpd_block.erl b/lib/inets/test/httpd_block.erl
index 44f6f644ad..45547e6d4e 100644
--- a/lib/inets/test/httpd_block.erl
+++ b/lib/inets/test/httpd_block.erl
@@ -133,7 +133,7 @@ block_disturbing_active_timeout_released(Type, Port, Host, Node) ->
block_non_disturbing_active_timeout_not_released(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 60000),
- test_server:sleep(5000),
+ ct:sleep(5000),
ok = block_nd_server(Node, Host, Port, 40000),
await_normal_process_exit(Poller, "poller", 60000),
blocked = get_admin_state(Node, Host, Port),
diff --git a/lib/inets/test/httpd_load.erl b/lib/inets/test/httpd_load.erl
index 37ebc4fc90..7f4d16139f 100644
--- a/lib/inets/test/httpd_load.erl
+++ b/lib/inets/test/httpd_load.erl
@@ -63,7 +63,7 @@ load_test(Fun, URIs, Type, Host, Port, Node, 0, List) ->
{'EXIT', Pid, Reason} ->
Str = lists:flatten(io_lib:format("client ~p exited: ~p",
[Pid,Reason])),
- test_server:fail(Str);
+ ct:fail(Str);
_ ->
load_test(Fun, URIs, Type, Host, Port, Node, 0, List)
end;
@@ -86,12 +86,11 @@ load_test_client(Fun, [URI|URIs], Type, Host, Port, Node, Boss, Timeout) ->
{'EXIT', {suite_failed, connection_closed, _, _}} ->
%% Some platforms seems to handle heavy load badly.
%% So, back off and see if this helps
- %%?LOG("load_test_client->requestfailed:connection_closed"[]),
2 * Timeout;
_ ->
Timeout
end,
- test_server:sleep(Timeout1),
+ ct:sleep(Timeout1),
load_test_client(Fun, URIs, Type, Host, Port, Node, Boss, Timeout1).
load_test_client_done(Boss) ->
diff --git a/lib/inets/test/httpd_mod.erl b/lib/inets/test/httpd_mod.erl
index 7a1250cb29..d9118aa1a4 100644
--- a/lib/inets/test/httpd_mod.erl
+++ b/lib/inets/test/httpd_mod.erl
@@ -86,240 +86,116 @@ actions(Type, Port, Host, Node) ->
security(ServerRoot, Type, Port, Host, Node) ->
global:register_name(mod_security_test, self()), % Receive events
-
- tsp("security -> "
- "sleep"),
- test_server:sleep(5000),
+
+ ct:sleep(5000),
OpenDir = filename:join([ServerRoot, "htdocs", "open"]),
%% Test blocking / unblocking of users.
%% /open, require user one Aladdin
- tsp("security -> "
- "blocking and unblocking of users - "
- "remove all existing users"),
+
remove_users(Node, ServerRoot, Host, Port, "open"),
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request for nonex user 'one' - expect 401"),
auth_request(Type, Host, Port, Node, "/open/", "one", "onePassword",
[{statuscode, 401}]),
- tsp("security -> "
- "blocking and unblocking of users - "
- "await fail security event"),
receive_security_event({event, auth_fail, Port, OpenDir,
[{user, "one"}, {password, "onePassword"}]},
Node, Port),
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request for nonex user 'two' - expect 401"),
auth_request(Type,Host,Port,Node,"/open/", "two", "twoPassword",
[{statuscode, 401}]),
- tsp("security -> "
- "blocking and unblocking of users - "
- "await fail security event"),
receive_security_event({event, auth_fail, Port, OpenDir,
[{user, "two"}, {password, "twoPassword"}]},
Node, Port),
-
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request for nonex user 'Alladin' - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "Aladdin",
"AladdinPassword", [{statuscode, 401}]),
- tsp("security -> "
- "blocking and unblocking of users - "
- "await fail security event"),
receive_security_event({event, auth_fail, Port, OpenDir,
[{user, "Aladdin"},
{password, "AladdinPassword"}]},
Node, Port),
-
- tsp("security -> "
- "blocking and unblocking of users - "
- "add user 'one'"),
add_user(Node, ServerRoot, Port, "open", "one", "onePassword", []),
- tsp("security -> "
- "blocking and unblocking of users - "
- "add user 'two'"),
add_user(Node, ServerRoot, Port, "open", "two", "twoPassword", []),
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request 1 for user 'one' with wrong password - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "one", "WrongPassword",
[{statuscode, 401}]),
-
- tsp("security -> "
- "blocking and unblocking of users - "
- "await fail security event"),
receive_security_event({event, auth_fail, Port, OpenDir,
[{user, "one"}, {password, "WrongPassword"}]},
Node, Port),
-
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request 2 for user 'one' with wrong password - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "one", "WrongPassword",
[{statuscode, 401}]),
- tsp("security -> "
- "blocking and unblocking of users - "
- "await fail security event"),
receive_security_event({event, auth_fail, Port, OpenDir,
[{user, "one"}, {password, "WrongPassword"}]},
Node, Port),
-
- tsp("security -> "
- "blocking and unblocking of users - "
- "await block security event (two failed attempts)"),
- receive_security_event({event, user_block, Port, OpenDir,
+ receive_security_event({event, user_block, Port, OpenDir,
[{user, "one"}]}, Node, Port),
- tsp("security -> "
- "blocking and unblocking of users - "
- "unregister - no more security events"),
global:unregister_name(mod_security_test), % No more events.
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request for user 'one' with wrong password - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "one", "WrongPassword",
[{statuscode, 401}]),
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request for user 'one' with correct password - expect 403"),
auth_request(Type, Host, Port, Node,"/open/", "one", "onePassword",
[{statuscode, 403}]),
%% User "one" should be blocked now..
- tsp("security -> "
- "blocking and unblocking of users - "
- "list blocked users - 'one' should be the only one"),
case list_blocked_users(Node, Port) of
[{"one",_, Port, OpenDir,_}] ->
ok;
Blocked ->
- tsp(" *** unexpected blocked users ***"
- "~n Blocked: ~p", [Blocked]),
exit({unexpected_blocked, Blocked})
end,
- tsp("security -> "
- "blocking and unblocking of users - "
- "list users blocked for dir '~p' - "
- "user 'one' should be the only one", [OpenDir]),
[{"one",_, Port, OpenDir,_}] = list_blocked_users(Node, Port, OpenDir),
- tsp("security -> "
- "blocking and unblocking of users - "
- "unblock user 'one' for dir '~p'", [OpenDir]),
true = unblock_user(Node, "one", Port, OpenDir),
%% User "one" should not be blocked any more.
- tsp("security -> "
- "blocking and unblocking of users - "
- "ensure user 'one' is no longer blocked"),
[] = list_blocked_users(Node, Port),
-
- tsp("security -> "
- "blocking and unblocking of users - "
- "auth request for user 'one' with correct password - expect 200"),
auth_request(Type, Host, Port, Node,"/open/", "one", "onePassword",
[{statuscode, 200}]),
%% Test list_auth_users & auth_timeout
-
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users - expect user 'one'"),
["one"] = list_auth_users(Node, Port),
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "auth request for user 'two' with wrong password - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "two", "onePassword",
[{statuscode, 401}]),
-
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users - expect user 'one'"),
["one"] = list_auth_users(Node, Port),
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users for dir '~p' - expect user 'one'", [OpenDir]),
["one"] = list_auth_users(Node, Port, OpenDir),
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "auth request for user 'two' with correct password - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "two", "twoPassword",
[{statuscode, 401}]),
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users - expect user 'one'"),
["one"] = list_auth_users(Node, Port),
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users for dir '~p' - expect user 'one'", [OpenDir]),
["one"] = list_auth_users(Node, Port, OpenDir),
%% Wait for successful auth to timeout.
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "wait for successful auth to timeout"),
- test_server:sleep(?AUTH_TIMEOUT*1001),
-
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users - expect none"),
+ ct:sleep(?AUTH_TIMEOUT*1001),
+
[] = list_auth_users(Node, Port),
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "list auth users for dir '~p'~n - expect none", [OpenDir]),
+
[] = list_auth_users(Node, Port, OpenDir),
%% "two" is blocked.
- tsp("security -> "
- "list-auth-users and auth-timeout - "
- "unblock user 'two' for dir '~p'", [OpenDir]),
true = unblock_user(Node, "two", Port, OpenDir),
-
-
%% Test explicit blocking. Block user 'two'.
- tsp("security -> "
- "explicit blocking - list blocked users - should be none"),
[] = list_blocked_users(Node,Port,OpenDir),
- tsp("security -> "
- "explicit blocking - "
- "block user 'two' for dir '~p'", [OpenDir]),
true = block_user(Node, "two", Port, OpenDir, 10),
-
- tsp("security -> "
- "explicit blocking - "
- "auth request for user 'two' with correct password - expect 401"),
auth_request(Type, Host, Port, Node,"/open/", "two", "twoPassword",
- [{statuscode, 401}]),
- tsp("security -> "
- "done").
-
+ [{statuscode, 401}]).
%%-------------------------------------------------------------------------
auth(Type, Port, Host, Node) ->
@@ -743,7 +619,6 @@ cgi(Type, Port, Host, Node) ->
end,
%% The length (> 100) is intentional
-%% tsp("cgi -> request 01 with length > 100"),
ok = httpd_test_lib:
verify_request(Type, Host, Port, Node,
"POST /cgi-bin/" ++ Script3 ++
@@ -771,55 +646,51 @@ cgi(Type, Port, Host, Node) ->
{version, "HTTP/1.0"},
{header, "content-type", "text/plain"}]),
-%% tsp("cgi -> request 02"),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /cgi-bin/"++ Script ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 03"),
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /cgi-bin/not_there "
"HTTP/1.0\r\n\r\n",
[{statuscode, 404},{statuscode, 500},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 04"),
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /cgi-bin/"++ Script ++
"?Nisse:kkk?sss/lll HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 04"),
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"POST /cgi-bin/"++ Script ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 05"),
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /htbin/"++ Script ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 06"),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /htbin/not_there "
"HTTP/1.0\r\n\r\n",
[{statuscode, 404},{statuscode, 500},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 07"),
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /htbin/"++ Script ++
"?Nisse:kkk?sss/lll HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 08"),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"POST /htbin/"++ Script ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 09"),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"POST /htbin/"++ Script ++
" HTTP/1.0\r\n\r\n",
@@ -827,31 +698,25 @@ cgi(Type, Port, Host, Node) ->
{version, "HTTP/1.0"}]),
%% Execute an existing, but bad CGI script..
-%% tsp("cgi -> request 10 - bad script"),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"POST /htbin/"++ Script2 ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 404},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> request 11 - bad script"),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"POST /cgi-bin/"++ Script2 ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 404},
{version, "HTTP/1.0"}]),
-%% tsp("cgi -> done"),
-
%% Check "ScriptNoCache" directive (default: false)
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET /cgi-bin/" ++ Script ++
" HTTP/1.0\r\n\r\n",
[{statuscode, 200},
{no_header, "cache-control"},
- {version, "HTTP/1.0"}]),
- ok.
-
+ {version, "HTTP/1.0"}]).
%%--------------------------------------------------------------------
esi(Type, Port, Host, Node) ->
@@ -1018,18 +883,15 @@ list_users(Node, Root, _Host, Port, Dir) ->
receive_security_event(Event, Node, Port) ->
- tsp("receive_security_event -> await ~w event", [element(2, Event)]),
receive
Event ->
- tsp("receive_security_event -> "
- "received expected ~w event", [element(2, Event)]),
ok;
{'EXIT', _, _} ->
receive_security_event(Event, Node, Port)
after 5000 ->
%% Flush the message queue, to see if we got something...
Msgs = inets_test_lib:flush(),
- tsf({expected_event_not_received, Msgs})
+ ct:fail({expected_event_not_received, Msgs})
end.
@@ -1045,10 +907,10 @@ receive_security_event(Event, Node, Port) ->
%% {'EXIT', _, _} ->
%% receive_security_event(Event, Node, Port);
%% Other ->
-%% test_server:fail({unexpected_event,
+%% ct:fail({unexpected_event,
%% {expected, Event}, {received, Other}})
%% after 5000 ->
-%% test_server:fail(no_event_recived)
+%% ct:fail(no_event_recived)
%% end.
@@ -1130,17 +992,4 @@ check_lists_members1(L1,L2) ->
{error,{lists_not_equal,L1,L2}}.
-%% p(F) ->
-%% p(F, []).
-
-%% p(F, A) ->
-%% io:format(user, "~w:" ++ F ++ "~n", [?MODULE|A]).
-
-tsp(F) ->
- inets_test_lib:tsp(F).
-tsp(F, A) ->
- inets_test_lib:tsp(F, A).
-
-tsf(Reason) ->
- test_server:fail(Reason).
diff --git a/lib/inets/test/inets_SUITE.erl b/lib/inets/test/inets_SUITE.erl
index 928d9dc391..5eaf3a28a0 100644
--- a/lib/inets/test/inets_SUITE.erl
+++ b/lib/inets/test/inets_SUITE.erl
@@ -28,10 +28,13 @@
-define(NUM_DEFAULT_SERVICES, 1).
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds,5}}
+ ].
all() ->
- [{group, app_test}, {group, appup_test},
+ [{group, app_test},
{group, services_test}, httpd_reload].
groups() ->
@@ -42,8 +45,7 @@ groups() ->
start_ftpc,
start_tftpd
]},
- {app_test, [], [{inets_app_test, all}]},
- {appup_test, [], [{inets_appup_test, all}]}].
+ {app_test, [], [app, appup]}].
init_per_group(_GroupName, Config) ->
Config.
@@ -84,6 +86,10 @@ end_per_suite(_Config) ->
%% Note: This function is free to add any key/value pairs to the Config
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
+init_per_testcase(httpd_reload, Config) ->
+ inets:stop(),
+ ct:timetrap({seconds, 40}),
+ Config;
init_per_testcase(_Case, Config) ->
inets:stop(),
Config.
@@ -102,6 +108,15 @@ end_per_testcase(_, Config) ->
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
+app() ->
+ [{doc, "Test that the inets app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(inets).
+%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the inets appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(inets).
start_inets() ->
[{doc, "Test inets API functions"}].
@@ -134,7 +149,7 @@ start_httpc() ->
[{doc, "Start/stop of httpc service"}].
start_httpc(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ok = inets:start(),
{ok, Pid0} = inets:start(httpc, [{profile, foo}]),
@@ -145,7 +160,7 @@ start_httpc(Config) when is_list(Config) ->
inets:stop(httpc, Pid0),
- test_server:sleep(100),
+ ct:sleep(100),
Pids1 = [ServicePid || {_, ServicePid} <- inets:services()],
false = lists:member(Pid0, Pids1),
@@ -188,7 +203,7 @@ start_httpd() ->
[{doc, "Start/stop of httpd service"}].
start_httpd(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
HttpdConf = [{server_name, "httpd_test"}, {server_root, PrivDir},
{document_root, PrivDir}, {bind_address, any}],
@@ -199,7 +214,7 @@ start_httpd(Config) when is_list(Config) ->
[_|_] = inets:services_info(),
inets:stop(httpd, Pid0),
- test_server:sleep(500),
+ ct:sleep(500),
Pids1 = [ServicePid || {_, ServicePid} <- inets:services()],
false = lists:member(Pid0, Pids1),
{ok, Pid1} =
@@ -212,7 +227,7 @@ start_httpd(Config) when is_list(Config) ->
{'EXIT', Pid1, shutdown} ->
ok
after 100 ->
- test_server:fail(stand_alone_not_shutdown)
+ ct:fail(stand_alone_not_shutdown)
end,
ok = inets:stop(),
File0 = filename:join(PrivDir, "httpd.conf"),
@@ -279,44 +294,38 @@ start_httpd(Config) when is_list(Config) ->
start_ftpc(doc) ->
[{doc, "Start/stop of ftpc service"}];
-start_ftpc(Config) when is_list(Config) ->
+start_ftpc(Config0) when is_list(Config0) ->
process_flag(trap_exit, true),
ok = inets:start(),
- try
- begin
- {_Tag, FtpdHost} = ftp_suite_lib:dirty_select_ftpd_host(Config),
- case inets:start(ftpc, [{host, FtpdHost}]) of
- {ok, Pid0} ->
- Pids0 = [ServicePid || {_, ServicePid} <-
- inets:services()],
- true = lists:member(Pid0, Pids0),
- [_|_] = inets:services_info(),
- inets:stop(ftpc, Pid0),
- test_server:sleep(100),
- Pids1 = [ServicePid || {_, ServicePid} <-
- inets:services()],
- false = lists:member(Pid0, Pids1),
- {ok, Pid1} =
- inets:start(ftpc, [{host, FtpdHost}], stand_alone),
- Pids2 = [ServicePid || {_, ServicePid} <-
- inets:services()],
- false = lists:member(Pid1, Pids2),
- ok = inets:stop(stand_alone, Pid1),
- receive
- {'EXIT', Pid1, shutdown} ->
- ok
- after 100 ->
- ct:fail(stand_alone_not_shutdown)
- end,
- ok = inets:stop(),
- ok;
- _ ->
- {skip, "Unable to reach selected FTP server " ++ FtpdHost}
- end
- end
- catch
- throw:{error, not_found} ->
- {skip, "No available FTP servers"}
+ case ftp_SUITE:init_per_suite(Config0) of
+ {skip, _} = Skip ->
+ Skip;
+ Config ->
+ FtpdHost = proplists:get_value(ftpd_host,Config),
+ {ok, Pid0} = inets:start(ftpc, [{host, FtpdHost}]),
+ Pids0 = [ServicePid || {_, ServicePid} <-
+ inets:services()],
+ true = lists:member(Pid0, Pids0),
+ [_|_] = inets:services_info(),
+ inets:stop(ftpc, Pid0),
+ ct:sleep(100),
+ Pids1 = [ServicePid || {_, ServicePid} <-
+ inets:services()],
+ false = lists:member(Pid0, Pids1),
+ {ok, Pid1} =
+ inets:start(ftpc, [{host, FtpdHost}], stand_alone),
+ Pids2 = [ServicePid || {_, ServicePid} <-
+ inets:services()],
+ false = lists:member(Pid1, Pids2),
+ ok = inets:stop(stand_alone, Pid1),
+ receive
+ {'EXIT', Pid1, shutdown} ->
+ ok
+ after 100 ->
+ ct:fail(stand_alone_not_shutdown)
+ end,
+ ok = inets:stop(),
+ catch ftp_SUITE:end_per_SUITE(Config)
end.
%%-------------------------------------------------------------------------
@@ -331,7 +340,7 @@ start_tftpd(Config) when is_list(Config) ->
true = lists:member(Pid0, Pids0),
[_|_] = inets:services_info(),
inets:stop(tftpd, Pid0),
- test_server:sleep(100),
+ ct:sleep(100),
Pids1 = [ServicePid || {_, ServicePid} <- inets:services()],
false = lists:member(Pid0, Pids1),
{ok, Pid1} =
@@ -343,7 +352,7 @@ start_tftpd(Config) when is_list(Config) ->
{'EXIT', Pid1, shutdown} ->
ok
after 100 ->
- test_server:fail(stand_alone_not_shutdown)
+ ct:fail(stand_alone_not_shutdown)
end,
ok = inets:stop(),
application:load(inets),
@@ -360,34 +369,34 @@ httpd_reload() ->
[{doc, "Reload httpd configuration without restarting service"}].
httpd_reload(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- PrivDir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
HttpdConf = [{server_name, "httpd_test"},
{server_root, PrivDir},
{document_root, PrivDir},
{bind_address, "localhost"}],
ok = inets:start(),
- test_server:sleep(5000),
+ ct:sleep(5000),
{ok, Pid0} = inets:start(httpd, [{port, 0},
{ipfamily, inet} | HttpdConf]),
- test_server:sleep(5000),
+ ct:sleep(5000),
[{port, Port0}] = httpd:info(Pid0, [port]),
- test_server:sleep(5000),
+ ct:sleep(5000),
[{document_root, PrivDir}] = httpd:info(Pid0, [document_root]),
- test_server:sleep(5000),
+ ct:sleep(5000),
ok = httpd:reload_config([{port, Port0}, {ipfamily, inet},
{server_name, "httpd_test"},
{server_root, PrivDir},
{document_root, DataDir},
{bind_address, "localhost"}], non_disturbing),
- test_server:sleep(5000),
+ ct:sleep(5000),
[{document_root, DataDir}] = httpd:info(Pid0, [document_root]),
- test_server:sleep(5000),
+ ct:sleep(5000),
ok = httpd:reload_config([{port, Port0}, {ipfamily, inet},
{server_name, "httpd_test"},
diff --git a/lib/inets/test/inets_app_test.erl b/lib/inets/test/inets_app_test.erl
deleted file mode 100644
index c6d0715e1f..0000000000
--- a/lib/inets/test/inets_app_test.erl
+++ /dev/null
@@ -1,245 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2015. All Rights Reserved.
-%%
-%% Licensed under the Apache License, Version 2.0 (the "License");
-%% you may not use this file except in compliance with the License.
-%% You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-%%----------------------------------------------------------------------
-%% Purpose: Verify the application specifics of the inets application
-%%----------------------------------------------------------------------
--module(inets_app_test).
-
--compile(export_all).
-
--include("inets_test_lib.hrl").
-
-
-% t() -> megaco_test_lib:t(?MODULE).
-% t(Case) -> megaco_test_lib:t({?MODULE, Case}).
-
-
-%% Test server callbacks
-init_per_testcase(_, Config) ->
- Config.
-
-end_per_testcase(_Case, Config) ->
- Config.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-all() ->
- [fields, modules, exportall, app_depend].
-
-groups() ->
- [].
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-init_per_suite(suite) -> [];
-init_per_suite(doc) -> [];
-init_per_suite(Config) when is_list(Config) ->
- case is_app(inets) of
- {ok, AppFile} ->
- io:format("AppFile: ~n~p~n", [AppFile]),
- inets:print_version_info(),
- [{app_file, AppFile}|Config];
- {error, Reason} ->
- fail(Reason)
- end.
-
-is_app(App) ->
- LibDir = code:lib_dir(App),
- File = filename:join([LibDir, "ebin", atom_to_list(App) ++ ".app"]),
- case file:consult(File) of
- {ok, [{application, App, AppFile}]} ->
- {ok, AppFile};
- Error ->
- {error, {invalid_format, Error}}
- end.
-
-
-end_per_suite(suite) -> [];
-end_per_suite(doc) -> [];
-end_per_suite(Config) when is_list(Config) ->
- Config.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-fields(suite) ->
- [];
-fields(doc) ->
- [];
-fields(Config) when is_list(Config) ->
- AppFile = key1search(app_file, Config),
- Fields = [vsn, description, modules, registered, applications],
- case check_fields(Fields, AppFile, []) of
- [] ->
- ok;
- Missing ->
- fail({missing_fields, Missing})
- end.
-
-check_fields([], _AppFile, Missing) ->
- Missing;
-check_fields([Field|Fields], AppFile, Missing) ->
- check_fields(Fields, AppFile, check_field(Field, AppFile, Missing)).
-
-check_field(Name, AppFile, Missing) ->
- io:format("checking field: ~p~n", [Name]),
- case lists:keymember(Name, 1, AppFile) of
- true ->
- Missing;
- false ->
- [Name|Missing]
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-modules(suite) ->
- [];
-modules(doc) ->
- [];
-modules(Config) when is_list(Config) ->
- AppFile = key1search(app_file, Config),
- Mods = key1search(modules, AppFile),
- EbinList = get_ebin_mods(inets),
- case missing_modules(Mods, EbinList, []) of
- [] ->
- ok;
- Missing ->
- throw({error, {missing_modules, Missing}})
- end,
- case extra_modules(Mods, EbinList, []) of
- [] ->
- ok;
- Extra ->
- throw({error, {extra_modules, Extra}})
- end,
- {ok, Mods}.
-
-get_ebin_mods(App) ->
- LibDir = code:lib_dir(App),
- EbinDir = filename:join([LibDir,"ebin"]),
- {ok, Files0} = file:list_dir(EbinDir),
- Files1 = [lists:reverse(File) || File <- Files0],
- [list_to_atom(lists:reverse(Name)) || [$m,$a,$e,$b,$.|Name] <- Files1].
-
-
-missing_modules([], _Ebins, Missing) ->
- Missing;
-missing_modules([Mod|Mods], Ebins, Missing) ->
- case lists:member(Mod, Ebins) of
- true ->
- missing_modules(Mods, Ebins, Missing);
- false ->
- io:format("missing module: ~p~n", [Mod]),
- missing_modules(Mods, Ebins, [Mod|Missing])
- end.
-
-
-extra_modules(_Mods, [], Extra) ->
- Extra;
-extra_modules(Mods, [Mod|Ebins], Extra) ->
- case lists:member(Mod, Mods) of
- true ->
- extra_modules(Mods, Ebins, Extra);
- false ->
- io:format("supefluous module: ~p~n", [Mod]),
- extra_modules(Mods, Ebins, [Mod|Extra])
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-exportall(suite) ->
- [];
-exportall(doc) ->
- [];
-exportall(Config) when is_list(Config) ->
- AppFile = key1search(app_file, Config),
- Mods = key1search(modules, AppFile),
- check_export_all(Mods).
-
-
-check_export_all([]) ->
- ok;
-check_export_all([Mod|Mods]) ->
- case (catch apply(Mod, module_info, [compile])) of
- {'EXIT', {undef, _}} ->
- check_export_all(Mods);
- O ->
- case lists:keysearch(options, 1, O) of
- false ->
- check_export_all(Mods);
- {value, {options, List}} ->
- case lists:member(export_all, List) of
- true ->
- throw({error, {export_all, Mod}});
- false ->
- check_export_all(Mods)
- end
- end
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-app_depend(suite) ->
- [];
-app_depend(doc) ->
- [];
-app_depend(Config) when is_list(Config) ->
- AppFile = key1search(app_file, Config),
- Apps = key1search(applications, AppFile),
- check_apps(Apps).
-
-
-check_apps([]) ->
- ok;
-check_apps([App|Apps]) ->
- case is_app(App) of
- {ok, _} ->
- check_apps(Apps);
- Error ->
- throw({error, {missing_app, {App, Error}}})
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-fail(Reason) ->
- exit({suite_failed, Reason}).
-
-key1search(Key, L) ->
- case lists:keysearch(Key, 1, L) of
- undefined ->
- fail({not_found, Key, L});
- {value, {Key, Value}} ->
- Value
- end.
diff --git a/lib/inets/test/inets_appup_test.erl b/lib/inets/test/inets_appup_test.erl
deleted file mode 100644
index b76cd59141..0000000000
--- a/lib/inets/test/inets_appup_test.erl
+++ /dev/null
@@ -1,71 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2016. All Rights Reserved.
-%%
-%% Licensed under the Apache License, Version 2.0 (the "License");
-%% you may not use this file except in compliance with the License.
-%% You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%
-%% %CopyrightEnd%
-%%
-%%
-%%----------------------------------------------------------------------
-%% Purpose: Verify the application specifics of the Inets application
-%%----------------------------------------------------------------------
--module(inets_appup_test).
-
--compile(export_all).
--include_lib("common_test/include/ct.hrl").
-
-
-%% Test server callbacks
-init_per_testcase(_Case, Config) ->
- Config.
-
-end_per_testcase(_Case, Config) ->
- Config.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-all() ->
- [appup].
-
-groups() ->
- [].
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-init_per_suite(suite) -> [];
-init_per_suite(doc) -> [];
-init_per_suite(Config) when is_list(Config) ->
- Config.
-
-
-end_per_suite(suite) -> [];
-end_per_suite(doc) -> [];
-end_per_suite(Config) when is_list(Config) ->
- Config.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-appup() ->
- [{doc, "Perform a simple check of the inets appup file"}].
-appup(Config) when is_list(Config) ->
- ok = ?t:appup_test(inets).
diff --git a/lib/inets/test/inets_socketwrap_SUITE.erl b/lib/inets/test/inets_socketwrap_SUITE.erl
index cfbda3ccf5..18df995215 100644
--- a/lib/inets/test/inets_socketwrap_SUITE.erl
+++ b/lib/inets/test/inets_socketwrap_SUITE.erl
@@ -61,8 +61,8 @@ end_per_testcase(_, Config) ->
start_httpd_fd() ->
[{doc, "Start/stop of httpd service with socket wrapper"}].
start_httpd_fd(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
HttpdConf = [{port, 80}, {ipfamily, inet},
{server_name, "httpd_fd_test"}, {server_root, PrivDir},
{document_root, PrivDir}, {bind_address, any}],
@@ -94,7 +94,7 @@ start_httpd_fd(Config) when is_list(Config) ->
start_tftpd_fd() ->
[{doc, "Start/stop of tfpd service with socket wrapper"}].
start_tftpd_fd(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
case setup_node_info(node()) of
{skip, _} = Skip ->
Skip;
diff --git a/lib/inets/test/inets_sup_SUITE.erl b/lib/inets/test/inets_sup_SUITE.erl
index 9836cd76e0..5b8b1463c8 100644
--- a/lib/inets/test/inets_sup_SUITE.erl
+++ b/lib/inets/test/inets_sup_SUITE.erl
@@ -26,7 +26,10 @@
%% Note: This directive should only be used in test suites.
-compile(export_all).
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]},
+ {timetrap,{seconds, 10}}
+ ].
all() ->
[default_tree, ftpc_worker, tftpd_worker,
@@ -50,9 +53,7 @@ end_per_suite(_) ->
ok.
init_per_testcase(httpd_subtree, Config) ->
- Dog = test_server:timetrap(?t:minutes(1)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "root"),
ok = file:make_dir(Dir),
@@ -67,7 +68,7 @@ init_per_testcase(httpd_subtree, Config) ->
inets:stop(),
inets:start(),
inets:start(httpd, SimpleConfig),
- [{watchdog, Dog} | NewConfig]
+ Config
catch
_:Reason ->
inets:stop(),
@@ -75,9 +76,7 @@ init_per_testcase(httpd_subtree, Config) ->
end;
init_per_testcase(httpd_subtree_profile, Config) ->
- Dog = test_server:timetrap(?t:minutes(1)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "root"),
ok = file:make_dir(Dir),
@@ -93,7 +92,7 @@ init_per_testcase(httpd_subtree_profile, Config) ->
inets:stop(),
inets:start(),
{ok, _} = inets:start(httpd, SimpleConfig),
- [{watchdog, Dog} | NewConfig]
+ Config
catch
_:Reason ->
inets:stop(),
@@ -102,24 +101,18 @@ init_per_testcase(httpd_subtree_profile, Config) ->
init_per_testcase(_Case, Config) ->
- Dog = test_server:timetrap(?t:minutes(5)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
inets:stop(),
ok = inets:start(),
- [{watchdog, Dog} | NewConfig].
+ Config.
end_per_testcase(Case, Config) when Case == httpd_subtree;
Case == httpd_subtree_profile ->
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "root"),
inets_test_lib:del_dirs(Dir),
ok;
-end_per_testcase(_, Config) ->
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+end_per_testcase(_, _) ->
inets:stop(),
ok.
@@ -164,29 +157,25 @@ default_tree(Config) when is_list(Config) ->
ftpc_worker() ->
[{doc, "Makes sure the ftp worker processes are added and removed "
"appropriatly to/from the supervison tree."}].
-ftpc_worker(Config) when is_list(Config) ->
+ftpc_worker(Config0) when is_list(Config0) ->
[] = supervisor:which_children(ftp_sup),
- try
- begin
- {_Tag, FtpdHost} = ftp_suite_lib:dirty_select_ftpd_host(Config),
- case inets:start(ftpc, [{host, FtpdHost}]) of
- {ok, Pid} ->
- case supervisor:which_children(ftp_sup) of
- [{_,_, worker, [ftp]}] ->
- inets:stop(ftpc, Pid),
- test_server:sleep(5000),
- [] = supervisor:which_children(ftp_sup),
- ok;
- Children ->
- exit({unexpected_children, Children})
- end;
- _ ->
- {skip, "Unable to reach test FTP server"}
+ case ftp_SUITE:init_per_suite(Config0) of
+ {skip, _} = Skip ->
+ Skip;
+ Config ->
+ FtpdHost = proplists:get_value(ftpd_host,Config),
+ {ok, Pid} = inets:start(ftpc, [{host, FtpdHost}]),
+ case supervisor:which_children(ftp_sup) of
+ [{_,_, worker, [ftp]}] ->
+ inets:stop(ftpc, Pid),
+ ct:sleep(5000),
+ [] = supervisor:which_children(ftp_sup),
+ catch ftp_SUITE:end_per_SUITE(Config),
+ ok;
+ Children ->
+ catch ftp_SUITE:end_per_SUITE(Config),
+ exit({unexpected_children, Children})
end
- end
- catch
- throw:{error, not_found} ->
- {skip, "No available FTP servers"}
end.
tftpd_worker() ->
@@ -200,7 +189,7 @@ tftpd_worker(Config) when is_list(Config) ->
[{_,Pid0, worker, _}] = supervisor:which_children(tftp_sup),
inets:stop(tftpd, Pid0),
- test_server:sleep(5000),
+ ct:sleep(5000),
[] = supervisor:which_children(tftp_sup),
ok.
diff --git a/lib/inets/test/inets_test_lib.hrl b/lib/inets/test/inets_test_lib.hrl
index a36ab0b1cf..d436395290 100644
--- a/lib/inets/test/inets_test_lib.hrl
+++ b/lib/inets/test/inets_test_lib.hrl
@@ -21,96 +21,8 @@
%%----------------------------------------------------------------------
%% Purpose: Define common macros for testing
%%----------------------------------------------------------------------
-
-%% - Print macros -
-
--ifdef(inets_debug).
--define(DEBUG(F,A), inets_test_lib:debug(F, A, ?MODULE, ?LINE)).
--else.
--define(DEBUG(F,A),ok).
--endif.
-
--ifdef(inets_log).
--define(LOG(F,A), inets_test_lib:log(F, A, ?MODULE, ?LINE)).
--else.
--define(LOG(F,A),ok).
--endif.
-
--define(INFO(F,A), inets_test_lib:info(F, A, ?MODULE, ?LINE)).
--define(PRINT(F,A), inets_test_lib:print(F, A, ?MODULE, ?LINE)).
-
-
-%% - Macros stolen from the test server -
-
--ifndef(line).
--define(line,put(test_server_loc,{?MODULE,?LINE}),).
--endif.
-
-
-%% - OS Command and stuff
-
--define(OSCMD(Cmd), inets_test_lib:oscmd(Cmd)).
-
--define(PRINT_SYSTEM_INFO(P), inets_test_lib:print_system_info(P)).
-
--define(RUN_ON_OS(OS, FUN), inets_test_lib:run_on_os(OS, FUN)).
--define(RUN_ON_WINDOWS(FUN), inets_test_lib:run_on_windows(FUN)).
-
-
-%% - Test case macros -
-
--define(EXPANDABLE(I, C, F), inets_test_lib:expandable(I, C, F)).
--define(OS_BASED_SKIP(Skippable),
- inets_test_lib:os_based_skip(Skippable)).
-
--define(NON_PC_TC_MAYBE_SKIP(Config, Condition),
- inets_test_lib:non_pc_tc_maybe_skip(Config, Condition, ?MODULE, ?LINE)).
-
-
-
%% - Misc macros -
-define(ENSURE_STARTED(A), inets_test_lib:ensure_started(A)).
--define(UPDATE(K,V,C), inets_test_lib:update_config(K,V,C)).
--define(CONFIG(K,C), inets_test_lib:get_config(K,C)).
--define(HOSTNAME(), inets_test_lib:hostname()).
--define(SZ(X), inets_test_lib:sz(X)).
-
-
-%% - Test case macros -
-
--define(SKIP(Reason), inets_test_lib:skip(Reason, ?MODULE, ?LINE)).
--define(FAIL(Reason), inets_test_lib:fail(Reason, ?MODULE, ?LINE)).
-
-
-%% - Socket macros -
-
--define(CONNECT(M,H,P), inets_test_lib:connect(M,H,P)).
--define(SEND(M,S,D), inets_test_lib:send(M,S,D)).
--define(CSEND(M,S,D,C,T), inets_test_lib:csend(M,S,D,C,T)).
--define(CLOSE(M,S), inets_test_lib:close(M,S)).
-
-
-%% - Time macros -
-
--define(HOURS(N), inets_test_lib:hours(N)).
--define(MINS(N), inets_test_lib:minutes(N)).
--define(SECS(N), inets_test_lib:seconds(N)).
-
--define(WD_START(T), inets_test_lib:watchdog_start(T)).
--define(WD_STOP(P), inets_test_lib:watchdog_stop(P)).
-
--define(SLEEP(MSEC), inets_test_lib:sleep(MSEC)).
--define(M(), inets_test_lib:millis()).
--define(MDIFF(A,B), inets_test_lib:millis_diff(A,B)).
-
-
-%% - Process utility macros -
-
--define(FLUSH(), inets_test_lib:flush_mqueue()).
--define(ETRAP_GET(), inets_test_lib:trap_exit()).
--define(ETRAP_SET(O), inets_test_lib:trap_exit(O)).
-
-
diff --git a/lib/inets/test/old_httpd_SUITE.erl b/lib/inets/test/old_httpd_SUITE.erl
index 9902c1459e..172db53844 100644
--- a/lib/inets/test/old_httpd_SUITE.erl
+++ b/lib/inets/test/old_httpd_SUITE.erl
@@ -286,9 +286,7 @@ init_per_suite(Config) ->
"~n Config: ~p"
"~n", [Config]),
- ?PRINT_SYSTEM_INFO([]),
-
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
SuiteTopDir = filename:join(PrivDir, ?MODULE),
case file:make_dir(SuiteTopDir) of
ok ->
@@ -314,7 +312,7 @@ init_per_suite(Config) ->
%%--------------------------------------------------------------------
end_per_suite(_Config) ->
- %% SuiteTopDir = ?config(suite_top_dir, Config),
+ %% SuiteTopDir = proplists:get_value(suite_top_dir, Config),
%% inets_test_lib:del_dirs(SuiteTopDir),
ok.
@@ -346,8 +344,8 @@ init_per_testcase2(Case, Config) ->
SslNormal = integer_to_list(?SSL_PORT) ++ ".conf",
SslHtaccess = integer_to_list(?SSL_PORT) ++ "htaccess.conf",
- DataDir = ?config(data_dir, Config),
- SuiteTopDir = ?config(suite_top_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ SuiteTopDir = proplists:get_value(suite_top_dir, Config),
%% tsp("init_per_testcase2 -> "
%% "~n SuiteDir: ~p"
@@ -499,7 +497,7 @@ init_per_testcase3(Case, Config) ->
Dog = test_server:timetrap(inets_test_lib:minutes(10)),
NewConfig = lists:keydelete(watchdog, 1, Config),
- TcTopDir = ?config(tc_top_dir, Config),
+ TcTopDir = proplists:get_value(tc_top_dir, Config),
CaseRest =
case atom_to_list(Case) of
@@ -581,16 +579,16 @@ init_per_testcase3(Case, Config) ->
{skip, _} = Skip ->
Skip;
"mod_auth_" ++ _ ->
- start_mnesia(?config(node, Config)),
+ start_mnesia(proplists:get_value(node, Config)),
[{watchdog, Dog} | NewConfig];
"mod_htaccess" ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
Path = filename:join([ServerRoot, "htdocs"]),
catch remove_htaccess(Path),
- create_htaccess_data(Path, ?config(address, Config)),
+ create_htaccess_data(Path, proplists:get_value(address, Config)),
[{watchdog, Dog} | NewConfig];
"range" ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
Path = filename:join([ServerRoot, "htdocs"]),
create_range_data(Path),
[{watchdog, Dog} | NewConfig];
@@ -613,7 +611,7 @@ init_per_testcase3(Case, Config) ->
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
end_per_testcase(Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
end_per_testcase2(Case, lists:keydelete(watchdog, 1, Config)),
ok.
@@ -641,7 +639,7 @@ ip_mod_alias(suite) ->
[];
ip_mod_alias(Config) when is_list(Config) ->
httpd_mod:alias(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -651,7 +649,7 @@ ip_mod_actions(suite) ->
[];
ip_mod_actions(Config) when is_list(Config) ->
httpd_mod:actions(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -660,9 +658,9 @@ ip_mod_security(doc) ->
ip_mod_security(suite) ->
[];
ip_mod_security(Config) when is_list(Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
httpd_mod:security(ServerRoot, ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -672,7 +670,7 @@ ip_mod_auth(suite) ->
[];
ip_mod_auth(Config) when is_list(Config) ->
httpd_mod:auth(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -681,9 +679,9 @@ ip_mod_auth_api(doc) ->
ip_mod_auth_api(suite) ->
[];
ip_mod_auth_api(Config) when is_list(Config) ->
- ServerRoot = ?config(server_root, Config),
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
httpd_mod:auth_api(ServerRoot, "", ip_comm, ?IP_PORT, Host, Node),
httpd_mod:auth_api(ServerRoot, "dets_", ip_comm, ?IP_PORT, Host, Node),
httpd_mod:auth_api(ServerRoot, "mnesia_", ip_comm, ?IP_PORT, Host, Node),
@@ -695,7 +693,7 @@ ip_mod_auth_mnesia_api(suite) ->
[];
ip_mod_auth_mnesia_api(Config) when is_list(Config) ->
httpd_mod:auth_mnesia_api(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_mod_htaccess(doc) ->
@@ -704,7 +702,7 @@ ip_mod_htaccess(suite) ->
[];
ip_mod_htaccess(Config) when is_list(Config) ->
httpd_mod:htaccess(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_mod_cgi(doc) ->
@@ -713,7 +711,7 @@ ip_mod_cgi(suite) ->
[];
ip_mod_cgi(Config) when is_list(Config) ->
httpd_mod:cgi(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_mod_esi(doc) ->
@@ -722,7 +720,7 @@ ip_mod_esi(suite) ->
[];
ip_mod_esi(Config) when is_list(Config) ->
httpd_mod:esi(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -732,7 +730,7 @@ ip_mod_get(suite) ->
[];
ip_mod_get(Config) when is_list(Config) ->
httpd_mod:get(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -742,7 +740,7 @@ ip_mod_head(suite) ->
[];
ip_mod_head(Config) when is_list(Config) ->
httpd_mod:head(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_mod_all(doc) ->
@@ -751,7 +749,7 @@ ip_mod_all(suite) ->
[];
ip_mod_all(Config) when is_list(Config) ->
httpd_mod:all(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_load_light(doc) ->
@@ -759,8 +757,8 @@ ip_load_light(doc) ->
ip_load_light(suite) ->
[];
ip_load_light(Config) when is_list(Config) ->
- httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config),
+ httpd_load:load_test(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
get_nof_clients(ip_comm, light)),
ok.
%%-------------------------------------------------------------------------
@@ -769,8 +767,8 @@ ip_load_medium(doc) ->
ip_load_medium(suite) ->
[];
ip_load_medium(Config) when is_list(Config) ->
- httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config),
+ httpd_load:load_test(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
get_nof_clients(ip_comm, medium)),
ok.
%%-------------------------------------------------------------------------
@@ -779,8 +777,8 @@ ip_load_heavy(doc) ->
ip_load_heavy(suite) ->
[];
ip_load_heavy(Config) when is_list(Config) ->
- httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config),
+ httpd_load:load_test(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
get_nof_clients(ip_comm, heavy)),
ok.
@@ -791,8 +789,8 @@ ip_dos_hostname(doc) ->
ip_dos_hostname(suite) ->
[];
ip_dos_hostname(Config) when is_list(Config) ->
- dos_hostname(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config), ?MAX_HEADER_SIZE),
+ dos_hostname(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config), ?MAX_HEADER_SIZE),
ok.
@@ -802,13 +800,7 @@ ip_time_test(doc) ->
ip_time_test(suite) ->
[];
ip_time_test(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- httpd_time_test:t(ip_comm, ?config(host, Config), ?IP_PORT),
+ httpd_time_test:t(ip_comm, proplists:get_value(host, Config), ?IP_PORT),
ok.
%%-------------------------------------------------------------------------
@@ -818,8 +810,8 @@ ip_block_503(doc) ->
ip_block_503(suite) ->
[];
ip_block_503(Config) when is_list(Config) ->
- httpd_block:block_503(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_block:block_503(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_block_disturbing_idle(doc) ->
@@ -829,8 +821,8 @@ ip_block_disturbing_idle(suite) ->
[];
ip_block_disturbing_idle(Config) when is_list(Config) ->
httpd_block:block_disturbing_idle(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_block_non_disturbing_idle(doc) ->
@@ -840,8 +832,8 @@ ip_block_non_disturbing_idle(suite) ->
[];
ip_block_non_disturbing_idle(Config) when is_list(Config) ->
httpd_block:block_non_disturbing_idle(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_block_disturbing_active(doc) ->
@@ -851,8 +843,8 @@ ip_block_disturbing_active(suite) ->
[];
ip_block_disturbing_active(Config) when is_list(Config) ->
httpd_block:block_disturbing_active(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_block_non_disturbing_active(doc) ->
@@ -862,8 +854,8 @@ ip_block_non_disturbing_active(suite) ->
[];
ip_block_non_disturbing_active(Config) when is_list(Config) ->
httpd_block:block_non_disturbing_idle(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -877,9 +869,9 @@ ip_block_disturbing_active_timeout_not_released(Config)
when is_list(Config) ->
httpd_block:block_disturbing_active_timeout_not_released(ip_comm,
?IP_PORT,
- ?config(host,
+ proplists:get_value(host,
Config),
- ?config(node,
+ proplists:get_value(node,
Config)),
ok.
%%-------------------------------------------------------------------------
@@ -893,9 +885,9 @@ ip_block_disturbing_active_timeout_released(Config)
when is_list(Config) ->
httpd_block:block_disturbing_active_timeout_released(ip_comm,
?IP_PORT,
- ?config(host,
+ proplists:get_value(host,
Config),
- ?config(node,
+ proplists:get_value(node,
Config)),
ok.
@@ -910,9 +902,9 @@ ip_block_non_disturbing_active_timeout_not_released(Config)
httpd_block:
block_non_disturbing_active_timeout_not_released(ip_comm,
?IP_PORT,
- ?config(host,
+ proplists:get_value(host,
Config),
- ?config(node,
+ proplists:get_value(node,
Config)),
ok.
%%-------------------------------------------------------------------------
@@ -927,9 +919,9 @@ ip_block_non_disturbing_active_timeout_released(Config)
httpd_block:
block_non_disturbing_active_timeout_released(ip_comm,
?IP_PORT,
- ?config(host,
+ proplists:get_value(host,
Config),
- ?config(node,
+ proplists:get_value(node,
Config)),
ok.
%%-------------------------------------------------------------------------
@@ -939,8 +931,8 @@ ip_block_disturbing_blocker_dies(suite) ->
[];
ip_block_disturbing_blocker_dies(Config) when is_list(Config) ->
httpd_block:disturbing_blocker_dies(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_block_non_disturbing_blocker_dies(doc) ->
@@ -949,8 +941,8 @@ ip_block_non_disturbing_blocker_dies(suite) ->
[];
ip_block_non_disturbing_blocker_dies(Config) when is_list(Config) ->
httpd_block:non_disturbing_blocker_dies(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_restart_no_block(doc) ->
@@ -958,8 +950,8 @@ ip_restart_no_block(doc) ->
ip_restart_no_block(suite) ->
[];
ip_restart_no_block(Config) when is_list(Config) ->
- httpd_block:restart_no_block(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_block:restart_no_block(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_restart_disturbing_block(doc) ->
@@ -967,33 +959,9 @@ ip_restart_disturbing_block(doc) ->
ip_restart_disturbing_block(suite) ->
[];
ip_restart_disturbing_block(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- HW = string:strip(os:cmd("uname -m"), right, $\n),
- case HW of
- "ppc" ->
- case inet:gethostname() of
- {ok, "peach"} ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
- end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_block:restart_disturbing_block(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -1002,33 +970,9 @@ ip_restart_non_disturbing_block(doc) ->
ip_restart_non_disturbing_block(suite) ->
[];
ip_restart_non_disturbing_block(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- HW = string:strip(os:cmd("uname -m"), right, $\n),
- case HW of
- "ppc" ->
- case inet:gethostname() of
- {ok, "peach"} ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
- end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_block:restart_non_disturbing_block(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -1043,7 +987,7 @@ essl_mod_alias(Config) when is_list(Config) ->
ssl_mod_alias(Tag, Config) ->
httpd_mod:alias(Tag, ?SSL_PORT,
- ?config(host, Config), ?config(node, Config)),
+ proplists:get_value(host, Config), proplists:get_value(node, Config)),
ok.
@@ -1060,8 +1004,8 @@ essl_mod_actions(Config) when is_list(Config) ->
ssl_mod_actions(Tag, Config) ->
httpd_mod:actions(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1075,12 +1019,12 @@ essl_mod_security(Config) when is_list(Config) ->
ssl_mod_security(essl, Config).
ssl_mod_security(Tag, Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
httpd_mod:security(ServerRoot,
Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1096,8 +1040,8 @@ essl_mod_auth(Config) when is_list(Config) ->
ssl_mod_auth(Tag, Config) ->
httpd_mod:auth(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1112,9 +1056,9 @@ essl_mod_auth_api(Config) when is_list(Config) ->
ssl_mod_auth_api(essl, Config).
ssl_mod_auth_api(Tag, Config) ->
- ServerRoot = ?config(server_root, Config),
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
httpd_mod:auth_api(ServerRoot, "", Tag, ?SSL_PORT, Host, Node),
httpd_mod:auth_api(ServerRoot, "dets_", Tag, ?SSL_PORT, Host, Node),
httpd_mod:auth_api(ServerRoot, "mnesia_", Tag, ?SSL_PORT, Host, Node),
@@ -1134,8 +1078,8 @@ essl_mod_auth_mnesia_api(Config) when is_list(Config) ->
ssl_mod_auth_mnesia_api(Tag, Config) ->
httpd_mod:auth_mnesia_api(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1151,8 +1095,8 @@ essl_mod_htaccess(Config) when is_list(Config) ->
ssl_mod_htaccess(Tag, Config) ->
httpd_mod:htaccess(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1168,8 +1112,8 @@ essl_mod_cgi(Config) when is_list(Config) ->
ssl_mod_cgi(Tag, Config) ->
httpd_mod:cgi(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1185,8 +1129,8 @@ essl_mod_esi(Config) when is_list(Config) ->
ssl_mod_esi(Tag, Config) ->
httpd_mod:esi(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1202,8 +1146,8 @@ essl_mod_get(Config) when is_list(Config) ->
ssl_mod_get(Tag, Config) ->
httpd_mod:get(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1219,8 +1163,8 @@ essl_mod_head(Config) when is_list(Config) ->
ssl_mod_head(Tag, Config) ->
httpd_mod:head(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1236,8 +1180,8 @@ essl_mod_all(Config) when is_list(Config) ->
ssl_mod_all(Tag, Config) ->
httpd_mod:all(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1253,8 +1197,8 @@ essl_load_light(Config) when is_list(Config) ->
ssl_load_light(Tag, Config) ->
httpd_load:load_test(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
get_nof_clients(ssl, light)),
ok.
@@ -1269,16 +1213,10 @@ essl_load_medium(Config) when is_list(Config) ->
ssl_load_medium(essl, Config).
ssl_load_medium(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_load:load_test(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
get_nof_clients(ssl, medium)),
ok.
@@ -1293,16 +1231,10 @@ essl_load_heavy(Config) when is_list(Config) ->
ssl_load_heavy(essl, Config).
ssl_load_heavy(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_load:load_test(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
get_nof_clients(ssl, heavy)),
ok.
@@ -1320,8 +1252,8 @@ essl_dos_hostname(Config) when is_list(Config) ->
ssl_dos_hostname(Tag, Config) ->
dos_hostname(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config),
?MAX_HEADER_SIZE),
ok.
@@ -1337,23 +1269,8 @@ essl_time_test(Config) when is_list(Config) ->
ssl_time_test(essl, Config).
ssl_time_test(Tag, Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- FreeBSDVersionVerify =
- fun() ->
- case os:version() of
- {7, 1, _} -> % We only have one such machine, so...
- true;
- _ ->
- false
- end
- end,
- Skippable = [win32, {unix, [{freebsd, FreeBSDVersionVerify}]}],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_time_test:t(Tag,
- ?config(host, Config),
+ proplists:get_value(host, Config),
?SSL_PORT),
ok.
@@ -1372,8 +1289,8 @@ essl_block_503(Config) when is_list(Config) ->
ssl_block_503(Tag, Config) ->
httpd_block:block_503(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1391,8 +1308,8 @@ essl_block_disturbing_idle(Config) when is_list(Config) ->
ssl_block_disturbing_idle(Tag, Config) ->
httpd_block:block_disturbing_idle(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1410,8 +1327,8 @@ essl_block_non_disturbing_idle(Config) when is_list(Config) ->
ssl_block_non_disturbing_idle(Tag, Config) ->
httpd_block:block_non_disturbing_idle(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1429,8 +1346,8 @@ essl_block_disturbing_active(Config) when is_list(Config) ->
ssl_block_disturbing_active(Tag, Config) ->
httpd_block:block_disturbing_active(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1448,8 +1365,8 @@ essl_block_non_disturbing_active(Config) when is_list(Config) ->
ssl_block_non_disturbing_active(Tag, Config) ->
httpd_block:block_non_disturbing_idle(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1468,8 +1385,8 @@ essl_block_disturbing_active_timeout_not_released(Config)
ssl_block_disturbing_active_timeout_not_released(Tag, Config) ->
Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
httpd_block:block_disturbing_active_timeout_not_released(Tag,
Port, Host, Node),
ok.
@@ -1490,8 +1407,8 @@ essl_block_disturbing_active_timeout_released(Config)
ssl_block_disturbing_active_timeout_released(Tag, Config) ->
Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
httpd_block:block_disturbing_active_timeout_released(Tag,
Port,
Host,
@@ -1513,8 +1430,8 @@ essl_block_non_disturbing_active_timeout_not_released(Config)
ssl_block_non_disturbing_active_timeout_not_released(Tag, Config) ->
Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
httpd_block:block_non_disturbing_active_timeout_not_released(Tag,
Port,
Host,
@@ -1539,8 +1456,8 @@ essl_block_non_disturbing_active_timeout_released(Config)
ssl_block_non_disturbing_active_timeout_released(Tag, Config)
when is_list(Config) ->
Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
httpd_block:block_non_disturbing_active_timeout_released(Tag,
Port,
Host,
@@ -1562,8 +1479,8 @@ essl_block_disturbing_blocker_dies(Config) when is_list(Config) ->
ssl_block_disturbing_blocker_dies(Tag, Config) ->
httpd_block:disturbing_blocker_dies(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1579,8 +1496,8 @@ essl_block_non_disturbing_blocker_dies(Config) when is_list(Config) ->
ssl_block_non_disturbing_blocker_dies(Tag, Config) ->
httpd_block:non_disturbing_blocker_dies(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1597,8 +1514,8 @@ essl_restart_no_block(Config) when is_list(Config) ->
ssl_restart_no_block(Tag, Config) ->
httpd_block:restart_no_block(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1613,43 +1530,9 @@ essl_restart_disturbing_block(Config) when is_list(Config) ->
ssl_restart_disturbing_block(essl, Config).
ssl_restart_disturbing_block(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- case ?OSCMD("uname -m") of
- "ppc" ->
- case file:read_file_info("/etc/fedora-release") of
- {ok, _} ->
- case ?OSCMD("awk '{print $2}' /etc/fedora-release") of
- "release" ->
- %% Fedora 7 and later
- case ?OSCMD("awk '{print $3}' /etc/fedora-release") of
- "7" ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
- end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_block:restart_disturbing_block(Tag, ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1664,34 +1547,10 @@ essl_restart_non_disturbing_block(Config) when is_list(Config) ->
ssl_restart_non_disturbing_block(essl, Config).
ssl_restart_non_disturbing_block(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- HW = string:strip(os:cmd("uname -m"), right, $\n),
- case HW of
- "ppc" ->
- case inet:gethostname() of
- {ok, "peach"} ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
- end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
httpd_block:restart_non_disturbing_block(Tag,
?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
+ proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
@@ -1701,8 +1560,8 @@ ip_host(doc) ->
ip_host(suite)->
[];
ip_host(Config) when is_list(Config) ->
- httpd_1_1:host(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_1_1:host(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_chunked(doc) ->
@@ -1710,8 +1569,8 @@ ip_chunked(doc) ->
ip_chunked(suite) ->
[];
ip_chunked(Config) when is_list(Config) ->
- httpd_1_1:chunked(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_1_1:chunked(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_expect(doc) ->
@@ -1720,8 +1579,8 @@ ip_expect(doc) ->
ip_expect(suite)->
[];
ip_expect(Config) when is_list(Config) ->
- httpd_1_1:expect(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_1_1:expect(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_range(doc) ->
@@ -1729,8 +1588,8 @@ ip_range(doc) ->
ip_range(suite)->
[];
ip_range(Config) when is_list(Config) ->
- httpd_1_1:range(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_1_1:range(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_if_test(doc) ->
@@ -1738,10 +1597,10 @@ ip_if_test(doc) ->
ip_if_test(suite) ->
[];
ip_if_test(Config) when is_list(Config) ->
- ServerRoot = ?config(server_root, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
DocRoot = filename:join([ServerRoot, "htdocs"]),
- httpd_1_1:if_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config), DocRoot),
+ httpd_1_1:if_test(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config), DocRoot),
ok.
%%-------------------------------------------------------------------------
ip_http_trace(doc) ->
@@ -1749,8 +1608,8 @@ ip_http_trace(doc) ->
ip_http_trace(suite) ->
[];
ip_http_trace(Config) when is_list(Config) ->
- httpd_1_1:http_trace(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_1_1:http_trace(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
ip_http1_1_head(doc) ->
@@ -1758,8 +1617,8 @@ ip_http1_1_head(doc) ->
ip_http1_1_head(suite)->
[];
ip_http1_1_head(Config) when is_list(Config) ->
- httpd_1_1:head(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
+ httpd_1_1:head(ip_comm, ?IP_PORT, proplists:get_value(host, Config),
+ proplists:get_value(node, Config)),
ok.
%%-------------------------------------------------------------------------
@@ -1768,8 +1627,8 @@ ip_get_0_9(doc) ->
ip_get_0_9(suite)->
[];
ip_get_0_9(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
"GET / \r\n\r\n",
[{statuscode, 200},
@@ -1791,8 +1650,8 @@ ip_head_1_0(doc) ->
ip_head_1_0(suite)->
[];
ip_head_1_0(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
"HEAD / HTTP/1.0\r\n\r\n", [{statuscode, 200},
{version, "HTTP/1.0"}]),
@@ -1804,8 +1663,8 @@ ip_get_1_0(doc) ->
ip_get_1_0(suite)->
[];
ip_get_1_0(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
"GET / HTTP/1.0\r\n\r\n", [{statuscode, 200},
{version, "HTTP/1.0"}]),
@@ -1817,8 +1676,8 @@ ip_post_1_0(doc) ->
ip_post_1_0(suite)->
[];
ip_post_1_0(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
+ Host = proplists:get_value(host, Config),
+ Node = proplists:get_value(node, Config),
%% Test the post message formatin 1.0! Real post are testes elsewhere
ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
"POST / HTTP/1.0\r\n\r\n "
@@ -1832,7 +1691,7 @@ ip_mod_cgi_chunked_encoding_test(doc) ->
ip_mod_cgi_chunked_encoding_test(suite)->
[];
ip_mod_cgi_chunked_encoding_test(Config) when is_list(Config) ->
- Host = ?config(host, Config),
+ Host = proplists:get_value(host, Config),
Script =
case test_server:os_type() of
{win32, _} ->
@@ -1846,7 +1705,7 @@ ip_mod_cgi_chunked_encoding_test(Config) when is_list(Config) ->
++ Host ++"\r\n\r\n"],
httpd_1_1:mod_cgi_chunked_encoding_test(ip_comm, ?IP_PORT,
Host,
- ?config(node, Config),
+ proplists:get_value(node, Config),
Requests),
ok.
@@ -1875,7 +1734,7 @@ ipv6_hostname(SocketType, Port, Config) when is_list(Config) ->
"~n SocketType: ~p"
"~n Port: ~p"
"~n Config: ~p", [SocketType, Port, Config]),
- Host = ?config(host, Config),
+ Host = proplists:get_value(host, Config),
URI = "GET HTTP://" ++
Host ++ ":" ++ integer_to_list(Port) ++ "/ HTTP/1.1\r\n\r\n",
tsp("ipv6_hostname -> Host: ~p", [Host]),
@@ -1910,7 +1769,7 @@ ipv6_address(SocketType, Port, Config) when is_list(Config) ->
"~n SocketType: ~p"
"~n Port: ~p"
"~n Config: ~p", [SocketType, Port, Config]),
- Host = ?config(host, Config),
+ Host = proplists:get_value(host, Config),
tsp("ipv6_address -> Host: ~p", [Host]),
URI = "GET HTTP://" ++
Host ++ ":" ++ integer_to_list(Port) ++ "/ HTTP/1.1\r\n\r\n",
@@ -1927,8 +1786,8 @@ ticket_5775(doc) ->
ticket_5775(suite) ->
[];
ticket_5775(Config) ->
- ok=httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
+ ok=httpd_test_lib:verify_request(ip_comm, proplists:get_value(host, Config),
+ ?IP_PORT, proplists:get_value(node, Config),
"GET /cgi-bin/erl/httpd_example:get_bin "
"HTTP/1.0\r\n\r\n",
[{statuscode, 200},
@@ -1939,9 +1798,9 @@ ticket_5865(doc) ->
ticket_5865(suite) ->
[];
ticket_5865(Config) ->
- ?SKIP(as_of_r15_behaviour_of_calendar_has_changed),
- Host = ?config(host,Config),
- ServerRoot = ?config(server_root, Config),
+ ct:skip(as_of_r15_behaviour_of_calendar_has_changed),
+ Host = proplists:get_value(host,Config),
+ ServerRoot = proplists:get_value(server_root, Config),
DocRoot = filename:join([ServerRoot, "htdocs"]),
File = filename:join([DocRoot,"last_modified.html"]),
@@ -1957,7 +1816,7 @@ ticket_5865(Config) ->
case file:write_file_info(File,FI#file_info{mtime=Bad_mtime}) of
ok ->
ok = httpd_test_lib:verify_request(ip_comm, Host,
- ?IP_PORT, ?config(node, Config),
+ ?IP_PORT, proplists:get_value(node, Config),
"GET /last_modified.html"
" HTTP/1.1\r\nHost:"
++Host++"\r\n\r\n",
@@ -1977,8 +1836,8 @@ ticket_5913(doc) ->
["Tests that a header without last-modified is handled"];
ticket_5913(suite) -> [];
ticket_5913(Config) ->
- ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
+ ok = httpd_test_lib:verify_request(ip_comm, proplists:get_value(host, Config),
+ ?IP_PORT, proplists:get_value(node, Config),
"GET /cgi-bin/erl/httpd_example:get_bin "
"HTTP/1.0\r\n\r\n",
[{statuscode, 200},
@@ -1989,8 +1848,8 @@ ticket_6003(doc) ->
["Tests that a URI with a bad hexadecimal code is handled"];
ticket_6003(suite) -> [];
ticket_6003(Config) ->
- ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
+ ok = httpd_test_lib:verify_request(ip_comm, proplists:get_value(host, Config),
+ ?IP_PORT, proplists:get_value(node, Config),
"GET http://www.erlang.org/%skalle "
"HTTP/1.0\r\n\r\n",
[{statuscode, 400},
@@ -2002,8 +1861,8 @@ ticket_7304(doc) ->
ticket_7304(suite) ->
[];
ticket_7304(Config) ->
- ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
+ ok = httpd_test_lib:verify_request(ip_comm, proplists:get_value(host, Config),
+ ?IP_PORT, proplists:get_value(node, Config),
"GET / HTTP/1.0\r\n\n",
[{statuscode, 200},
{version, "HTTP/1.0"}]),
@@ -2030,11 +1889,11 @@ dos_hostname(Type, Port, Host, Node, Max) ->
%%--------------------------------------------------------------------
%% Other help functions
create_config(Config, Access, FileName) ->
- ServerRoot = ?config(server_root, Config),
- TcTopDir = ?config(tc_top_dir, Config),
- Port = ?config(port, Config),
- Type = ?config(sock_type, Config),
- Host = ?config(host, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
+ TcTopDir = proplists:get_value(tc_top_dir, Config),
+ Port = proplists:get_value(port, Config),
+ Type = proplists:get_value(sock_type, Config),
+ Host = proplists:get_value(host, Config),
Mods = io_lib:format("~p", [httpd_mod]),
Funcs = io_lib:format("~p", [ssl_password_cb]),
MaxHdrSz = io_lib:format("~p", [256]),
@@ -2424,13 +2283,13 @@ create_range_data(Path) ->
"12345678901234567890"])).
create_ipv6_config(Config, FileName, Ipv6Address) ->
- ServerRoot = ?config(server_root, Config),
- TcTopDir = ?config(tc_top_dir, Config),
- Port = ?config(port, Config),
- SockType = ?config(sock_type, Config),
+ ServerRoot = proplists:get_value(server_root, Config),
+ TcTopDir = proplists:get_value(tc_top_dir, Config),
+ Port = proplists:get_value(port, Config),
+ SockType = proplists:get_value(sock_type, Config),
Mods = io_lib:format("~p", [httpd_mod]),
Funcs = io_lib:format("~p", [ssl_password_cb]),
- Host = ?config(ipv6_host, Config),
+ Host = proplists:get_value(ipv6_host, Config),
MaxHdrSz = io_lib:format("~p", [256]),
MaxHdrAct = io_lib:format("~p", [close]),
diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml
index 8bd94892ad..88135ea43d 100644
--- a/lib/kernel/doc/src/gen_tcp.xml
+++ b/lib/kernel/doc/src/gen_tcp.xml
@@ -153,17 +153,17 @@ do_recv(Sock, Bs) ->
<c><anno>Address</anno></c> can be a hostname or an IP address.</p>
<p>The following options are available:</p>
<taglist>
- <tag><c>{ip, ip_address()}</c></tag>
+ <tag><c>{ip, Address}</c></tag>
<item><p>If the host has many network interfaces, this option
specifies which one to use.</p></item>
- <tag><c>{ifaddr, ip_address()}</c></tag>
- <item><p>Same as <c>{ip, ip_address()}</c>. If the host has many
+ <tag><c>{ifaddr, Address}</c></tag>
+ <item><p>Same as <c>{ip, Address}</c>. If the host has many
network interfaces, this option specifies which one to use.</p>
</item>
<tag><c>{fd, integer() >= 0}</c></tag>
<item><p>If a socket has somehow been connected without using
<c>gen_tcp</c>, use this option to pass the file descriptor
- for it. If <c>{ip, ip_address()}</c> and/or
+ for it. If <c>{ip, Address}</c> and/or
<c>{port, port_number()}</c> is combined with this option, the
<c>fd</c> is bound to the specified interface and port before
connecting. If these options are not specified, it is assumed that
@@ -172,6 +172,15 @@ do_recv(Sock, Bs) ->
<item><p>Sets up the socket for IPv4.</p></item>
<tag><c>inet6</c></tag>
<item><p>Sets up the socket for IPv6.</p></item>
+ <tag><c>local</c></tag>
+ <item>
+ <p>
+ Sets up a Unix Domain Socket. See
+ <seealso marker="inet#type-local_address">
+ <c>inet:local_address()</c>
+ </seealso>
+ </p>
+ </item>
<tag><c>{port, Port}</c></tag>
<item><p>Specifies which local port number to use.</p></item>
<tag><c>{tcp_module, module()}</c></tag>
@@ -246,7 +255,7 @@ do_recv(Sock, Bs) ->
<item><p><c>B</c> is an integer &gt;= <c>0</c>. The backlog value
defines the maximum length that the queue of pending connections
can grow to. Defaults to <c>5</c>.</p></item>
- <tag><c>{ip, ip_address()}</c></tag>
+ <tag><c>{ip, Address}</c></tag>
<item><p>If the host has many network interfaces, this option
specifies which one to listen on.</p></item>
<tag><c>{port, Port}</c></tag>
@@ -255,8 +264,8 @@ do_recv(Sock, Bs) ->
<item><p>If a socket has somehow been connected without using
<c>gen_tcp</c>, use this option to pass the file
descriptor for it.</p></item>
- <tag><c>{ifaddr, ip_address()}</c></tag>
- <item><p>Same as <c>{ip, ip_address()}</c>. If the host has many
+ <tag><c>{ifaddr, Address}</c></tag>
+ <item><p>Same as <c>{ip, Address}</c>. If the host has many
network interfaces, this option specifies which one to use.</p>
</item>
<tag><c>inet6</c></tag>
diff --git a/lib/kernel/doc/src/gen_udp.xml b/lib/kernel/doc/src/gen_udp.xml
index 3db291600d..3f88a0272d 100644
--- a/lib/kernel/doc/src/gen_udp.xml
+++ b/lib/kernel/doc/src/gen_udp.xml
@@ -85,11 +85,11 @@
<item><p>Received <c>Packet</c> is delivered as a list.</p></item>
<tag><c>binary</c></tag>
<item><p>Received <c>Packet</c> is delivered as a binary.</p></item>
- <tag><c>{ip, ip_address()}</c></tag>
+ <tag><c>{ip, Address}</c></tag>
<item><p>If the host has many network interfaces, this option
specifies which one to use.</p></item>
- <tag><c>{ifaddr, ip_address()}</c></tag>
- <item><p>Same as <c>{ip, ip_address()}</c>. If the host has many
+ <tag><c>{ifaddr, Address}</c></tag>
+ <item><p>Same as <c>{ip, Address}</c>. If the host has many
network interfaces, this option specifies which one to
use.</p></item>
<tag><c>{fd, integer() >= 0}</c></tag>
@@ -104,6 +104,15 @@
<item><p>Sets up the socket for IPv6.</p></item>
<tag><c>inet</c></tag>
<item><p>Sets up the socket for IPv4.</p></item>
+ <tag><c>local</c></tag>
+ <item>
+ <p>
+ Sets up a Unix Domain Socket. See
+ <seealso marker="inet#type-local_address">
+ <c>inet:local_address()</c>
+ </seealso>
+ </p>
+ </item>
<tag><c>{udp_module, module()}</c></tag>
<item><p>Overrides which callback module is used. Defaults to
<c>inet_udp</c> for IPv4 and <c>inet6_udp</c> for IPv6.</p></item>
@@ -176,8 +185,10 @@
<name name="send" arity="4"/>
<fsummary>Send a packet.</fsummary>
<desc>
- <p>Sends a packet to the specified address and port. Argument
- <c><anno>Address</anno></c> can be a hostname or an IP address.</p>
+ <p>
+ Sends a packet to the specified address and port. Argument
+ <c><anno>Address</anno></c> can be a hostname or a socket address.
+ </p>
</desc>
</func>
</funcs>
diff --git a/lib/kernel/doc/src/heart.xml b/lib/kernel/doc/src/heart.xml
index c587e39345..864f8facac 100644
--- a/lib/kernel/doc/src/heart.xml
+++ b/lib/kernel/doc/src/heart.xml
@@ -83,6 +83,17 @@
<c><![CDATA[SIGKILL]]></c>:</p>
<pre>
% <input>erl -heart -env HEART_KILL_SIGNAL SIGABRT ...</input></pre>
+ <p> If heart should <b>not</b> kill the Erlang runtime system, this can be indicated
+ using the environment variable <c><![CDATA[HEART_NO_KILL=TRUE]]></c>.
+ This can be useful if the command executed by heart takes care of this,
+ for example as part of a specific cleanup sequence.
+ If unset, or not set to <c><![CDATA[TRUE]]></c>, the default behaviour
+ will be to kill as described above.
+ </p>
+
+ <pre>
+% <input>erl -heart -env HEART_NO_KILL 1 ...</input></pre>
+
<p>Furthermore, <c><![CDATA[ERL_CRASH_DUMP_SECONDS]]></c> has the
following behavior on <c>heart</c>:</p>
<taglist>
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index bca04aa244..c0dce2f50c 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -11,7 +11,7 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@@ -118,6 +118,59 @@ fe80::204:acff:fe17:bf38
<name name="port_number"/>
</datatype>
<datatype>
+ <name name="local_address"/>
+ <desc>
+ <p>
+ This address family only works on Unix-like systems.
+ </p>
+ <p>
+ <c><anno>File</anno></c> is normally a file pathname
+ in a local filesystem. It is limited in length by the
+ operating system, traditionally to 108 bytes.
+ </p>
+ <p>
+ A <c>binary()</c> is passed as is to the operating system,
+ but a <c>string()</c> is encoded according to the
+ <seealso marker="file#native_name_encoding/0">
+ system filename encoding mode.
+ </seealso>
+ </p>
+ <p>
+ Other addresses are possible, for example Linux implements
+ "Abstract Addresses". See the documentation for
+ Unix Domain Sockets on your system,
+ normally <c>unix</c> in manual section 7.
+ </p>
+ <p>
+ In most API functions where you can use
+ this address family the port number must be <c>0</c>.
+ </p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="socket_address"/>
+ </datatype>
+ <datatype>
+ <name name="returned_non_ip_address"/>
+ <desc>
+ <p>
+ Addresses besides
+ <seealso marker="#type-ip_address">
+ <c>ip_address()</c>
+ </seealso>
+ ones that are returned from socket API functions.
+ See in particular
+ <seealso marker="#type-local_address">
+ <c>local_address()</c>.
+ </seealso>
+ The <c>unspec</c> family corresponds to AF_UNSPEC and can
+ occur if the other side has no socket address.
+ The <c>undefined</c> family can only occur in the unlikely
+ event of an address family that the VM does not recognize.
+ </p>
+ </desc>
+ </datatype>
+ <datatype>
<name name="posix"/>
<desc>
<p>An atom that is named from the POSIX error codes used in Unix,
@@ -207,6 +260,10 @@ fe80::204:acff:fe17:bf38
<desc>
<p>Returns a <c>hostent</c> record for the host with the specified
hostname.</p>
+ <p>If resolver option <c>inet6</c> is <c>true</c>,
+ an IPv6 address is looked up. If that fails,
+ the IPv4 address is looked up and returned on
+ IPv6-mapped IPv4 format.</p>
</desc>
</func>
@@ -1267,4 +1324,3 @@ inet:setopts(Sock,[{raw,6,8,<<30:32/native>>}]),]]></code>
</list>
</section>
</erlref>
-
diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
index 8bf02afec9..2b72f78dcf 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
@@ -104,6 +104,8 @@ MODULES = \
inet_sctp \
kernel \
kernel_config \
+ local_udp \
+ local_tcp \
net \
net_adm \
net_kernel \
@@ -244,6 +246,8 @@ $(EBIN)/inet_tcp.beam: inet_int.hrl
$(EBIN)/inet_udp_dist.beam: ../include/net_address.hrl ../include/dist.hrl ../include/dist_util.hrl
$(EBIN)/inet_udp.beam: inet_int.hrl
$(EBIN)/inet_sctp.beam: inet_int.hrl ../include/inet_sctp.hrl
+$(EBIN)/local_udp.beam: inet_int.hrl
+$(EBIN)/local_tcp.beam: inet_int.hrl
$(EBIN)/net_kernel.beam: ../include/net_address.hrl
$(EBIN)/os.beam: ../include/file.hrl
$(EBIN)/ram_file.beam: ../include/file.hrl
diff --git a/lib/kernel/src/gen_sctp.erl b/lib/kernel/src/gen_sctp.erl
index d00ed828a7..b133e6fed4 100644
--- a/lib/kernel/src/gen_sctp.erl
+++ b/lib/kernel/src/gen_sctp.erl
@@ -124,8 +124,8 @@ open() ->
SockType :: seqpacket | stream,
Socket :: sctp_socket().
-open(Opts) when is_list(Opts) ->
- Mod = mod(Opts, undefined),
+open(Opts0) when is_list(Opts0) ->
+ {Mod, Opts} = inet:sctp_module(Opts0),
case Mod:open(Opts) of
{error,badarg} ->
erlang:error(badarg, [Opts]);
@@ -445,32 +445,3 @@ controlling_process(S, Pid) when is_port(S), is_pid(Pid) ->
inet:udp_controlling_process(S, Pid);
controlling_process(S, Pid) ->
erlang:error(badarg, [S,Pid]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Utilites
-%%
-
-%% Get the SCTP module, but IPv6 address overrides default IPv4
-mod(Address) ->
- case inet_db:sctp_module() of
- inet_sctp when tuple_size(Address) =:= 8 ->
- inet6_sctp;
- Mod ->
- Mod
- end.
-
-%% Get the SCTP module, but option sctp_module|inet|inet6 overrides
-mod([{sctp_module,Mod}|_], _Address) ->
- Mod;
-mod([inet|_], _Address) ->
- inet_sctp;
-mod([inet6|_], _Address) ->
- inet6_sctp;
-mod([{ip, Address}|Opts], _) ->
- mod(Opts, Address);
-mod([{ifaddr, Address}|Opts], _) ->
- mod(Opts, Address);
-mod([_|Opts], Address) ->
- mod(Opts, Address);
-mod([], Address) ->
- mod(Address).
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl
index 1f0d44b8e1..1a21541b7c 100644
--- a/lib/kernel/src/gen_tcp.erl
+++ b/lib/kernel/src/gen_tcp.erl
@@ -96,17 +96,17 @@
tos |
ipv6_v6only.
-type connect_option() ::
- {ip, inet:ip_address()} |
+ {ip, inet:socket_address()} |
{fd, Fd :: non_neg_integer()} |
- {ifaddr, inet:ip_address()} |
+ {ifaddr, inet:socket_address()} |
inet:address_family() |
{port, inet:port_number()} |
{tcp_module, module()} |
option().
-type listen_option() ::
- {ip, inet:ip_address()} |
+ {ip, inet:socket_address()} |
{fd, Fd :: non_neg_integer()} |
- {ifaddr, inet:ip_address()} |
+ {ifaddr, inet:socket_address()} |
inet:address_family() |
{port, inet:port_number()} |
{backlog, B :: non_neg_integer()} |
@@ -122,7 +122,7 @@
%%
-spec connect(Address, Port, Options) -> {ok, Socket} | {error, Reason} when
- Address :: inet:ip_address() | inet:hostname(),
+ Address :: inet:socket_address() | inet:hostname(),
Port :: inet:port_number(),
Options :: [connect_option()],
Socket :: socket(),
@@ -133,7 +133,7 @@ connect(Address, Port, Opts) ->
-spec connect(Address, Port, Options, Timeout) ->
{ok, Socket} | {error, Reason} when
- Address :: inet:ip_address() | inet:hostname(),
+ Address :: inet:socket_address() | inet:hostname(),
Port :: inet:port_number(),
Options :: [connect_option()],
Timeout :: timeout(),
@@ -151,8 +151,8 @@ connect(Address, Port, Opts, Time) ->
Error -> Error
end.
-connect1(Address,Port,Opts,Timer) ->
- Mod = mod(Opts, Address),
+connect1(Address, Port, Opts0, Timer) ->
+ {Mod, Opts} = inet:tcp_module(Opts0, Address),
case Mod:getaddrs(Address,Timer) of
{ok,IPs} ->
case Mod:getserv(Port) of
@@ -185,8 +185,8 @@ try_connect([], _Port, _Opts, _Timer, _Mod, Err) ->
ListenSocket :: socket(),
Reason :: system_limit | inet:posix().
-listen(Port, Opts) ->
- Mod = mod(Opts, undefined),
+listen(Port, Opts0) ->
+ {Mod, Opts} = inet:tcp_module(Opts0),
case Mod:getserv(Port) of
{ok,TP} ->
Mod:listen(TP, Opts);
@@ -335,32 +335,6 @@ controlling_process(S, NewOwner) ->
%%
%% Create a port/socket from a file descriptor
%%
-fdopen(Fd, Opts) ->
- Mod = mod(Opts, undefined),
+fdopen(Fd, Opts0) ->
+ {Mod, Opts} = inet:tcp_module(Opts0),
Mod:fdopen(Fd, Opts).
-
-%% Get the tcp_module, but IPv6 address overrides default IPv4
-mod(Address) ->
- case inet_db:tcp_module() of
- inet_tcp when tuple_size(Address) =:= 8 ->
- inet6_tcp;
- Mod ->
- Mod
- end.
-
-%% Get the tcp_module, but option tcp_module|inet|inet6 overrides
-mod([{tcp_module,Mod}|_], _Address) ->
- Mod;
-mod([inet|_], _Address) ->
- inet_tcp;
-mod([inet6|_], _Address) ->
- inet6_tcp;
-mod([{ip, Address}|Opts], _) ->
- mod(Opts, Address);
-mod([{ifaddr, Address}|Opts], _) ->
- mod(Opts, Address);
-mod([_|Opts], Address) ->
- mod(Opts, Address);
-mod([], Address) ->
- mod(Address).
-
diff --git a/lib/kernel/src/gen_udp.erl b/lib/kernel/src/gen_udp.erl
index 5e85c61dd9..98d2f0bcfb 100644
--- a/lib/kernel/src/gen_udp.erl
+++ b/lib/kernel/src/gen_udp.erl
@@ -92,18 +92,18 @@ open(Port) ->
-spec open(Port, Opts) -> {ok, Socket} | {error, Reason} when
Port :: inet:port_number(),
Opts :: [Option],
- Option :: {ip, inet:ip_address()}
+ Option :: {ip, inet:socket_address()}
| {fd, non_neg_integer()}
- | {ifaddr, inet:ip_address()}
+ | {ifaddr, inet:socket_address()}
| inet:address_family()
| {port, inet:port_number()}
| option(),
Socket :: socket(),
Reason :: inet:posix().
-open(Port, Opts) ->
- Mod = mod(Opts, undefined),
- {ok,UP} = Mod:getserv(Port),
+open(Port, Opts0) ->
+ {Mod, Opts} = inet:udp_module(Opts0),
+ {ok, UP} = Mod:getserv(Port),
Mod:open(UP, Opts).
-spec close(Socket) -> ok when
@@ -114,7 +114,7 @@ close(S) ->
-spec send(Socket, Address, Port, Packet) -> ok | {error, Reason} when
Socket :: socket(),
- Address :: inet:ip_address() | inet:hostname(),
+ Address :: inet:socket_address() | inet:hostname(),
Port :: inet:port_number(),
Packet :: iodata(),
Reason :: not_owner | inet:posix().
@@ -148,7 +148,7 @@ send(S, Packet) when is_port(S) ->
{ok, {Address, Port, Packet}} | {error, Reason} when
Socket :: socket(),
Length :: non_neg_integer(),
- Address :: inet:ip_address(),
+ Address :: inet:ip_address() | inet:returned_non_ip_address(),
Port :: inet:port_number(),
Packet :: string() | binary(),
Reason :: not_owner | inet:posix().
@@ -166,7 +166,7 @@ recv(S,Len) when is_port(S), is_integer(Len) ->
Socket :: socket(),
Length :: non_neg_integer(),
Timeout :: timeout(),
- Address :: inet:ip_address(),
+ Address :: inet:ip_address() | inet:returned_non_ip_address(),
Port :: inet:port_number(),
Packet :: string() | binary(),
Reason :: not_owner | inet:posix().
@@ -203,32 +203,6 @@ controlling_process(S, NewOwner) ->
%%
%% Create a port/socket from a file descriptor
%%
-fdopen(Fd, Opts) ->
- Mod = mod(Opts, undefined),
+fdopen(Fd, Opts0) ->
+ {Mod,Opts} = inet:udp_module(Opts0),
Mod:fdopen(Fd, Opts).
-
-
-%% Get the udp_module, but IPv6 address overrides default IPv4
-mod(Address) ->
- case inet_db:udp_module() of
- inet_udp when tuple_size(Address) =:= 8 ->
- inet6_udp;
- Mod ->
- Mod
- end.
-
-%% Get the udp_module, but option udp_module|inet|inet6 overrides
-mod([{udp_module,Mod}|_], _Address) ->
- Mod;
-mod([inet|_], _Address) ->
- inet_udp;
-mod([inet6|_], _Address) ->
- inet6_udp;
-mod([{ip, Address}|Opts], _) ->
- mod(Opts, Address);
-mod([{ifaddr, Address}|Opts], _) ->
- mod(Opts, Address);
-mod([_|Opts], Address) ->
- mod(Opts, Address);
-mod([], Address) ->
- mod(Address).
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index c1ae99ea24..9fc685e728 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -37,6 +37,7 @@
parse_ipv6strict_address/1, parse_address/1, parse_strict_address/1, ntoa/1]).
-export([connect_options/2, listen_options/2, udp_options/2, sctp_options/2]).
+-export([udp_module/1, tcp_module/1, tcp_module/2, sctp_module/1]).
-export([i/0, i/1, i/2]).
@@ -72,9 +73,9 @@
-export([start_timer/1, timeout/1, timeout/2, stop_timer/1]).
-export_type([address_family/0, hostent/0, hostname/0, ip4_address/0,
- ip6_address/0, ip_address/0, posix/0, socket/0,
- port_number/0]).
-
+ ip6_address/0, ip_address/0, port_number/0,
+ local_address/0, socket_address/0, returned_non_ip_address/0,
+ posix/0, socket/0, stat_option/0]).
%% imports
-import(lists, [append/1, duplicate/2, filter/2, foldl/3]).
@@ -97,6 +98,11 @@
0..65535,0..65535,0..65535,0..65535}.
-type ip_address() :: ip4_address() | ip6_address().
-type port_number() :: 0..65535.
+-type local_address() :: {local, File :: binary() | string()}.
+-type returned_non_ip_address() ::
+ {local, binary()} |
+ {unspec, <<>>} |
+ {undefined, any()}.
-type posix() :: exbadport | exbadseq | file:posix().
-type socket() :: port().
@@ -133,9 +139,11 @@
'running' | 'multicast' | 'loopback']} |
{'hwaddr', ether_address()}.
--type address_family() :: 'inet' | 'inet6'.
+-type address_family() :: 'inet' | 'inet6' | 'local'.
-type socket_protocol() :: 'tcp' | 'udp' | 'sctp'.
-type socket_type() :: 'stream' | 'dgram' | 'seqpacket'.
+-type socket_address() ::
+ ip_address() | 'any' | 'loopback' | local_address().
-type stat_option() ::
'recv_cnt' | 'recv_max' | 'recv_avg' | 'recv_oct' | 'recv_dvi' |
'send_cnt' | 'send_max' | 'send_avg' | 'send_oct' | 'send_pend'.
@@ -160,26 +168,33 @@ close(Socket) ->
end.
--spec peername(Socket) -> {ok, {Address, Port}} | {error, posix()} when
- Socket :: socket(),
- Address :: ip_address(),
- Port :: non_neg_integer().
+-spec peername(Socket :: socket()) ->
+ {ok,
+ {ip_address(), port_number()} |
+ returned_non_ip_address()} |
+ {error, posix()}.
peername(Socket) ->
prim_inet:peername(Socket).
--spec setpeername(Socket :: socket(), Address :: {ip_address(), port_number()}) ->
- 'ok' | {'error', any()}.
+-spec setpeername(
+ Socket :: socket(),
+ Address ::
+ {ip_address() | 'any' | 'loopback',
+ port_number()} |
+ socket_address()) ->
+ 'ok' | {'error', any()}.
setpeername(Socket, {IP,Port}) ->
prim_inet:setpeername(Socket, {IP,Port});
setpeername(Socket, undefined) ->
prim_inet:setpeername(Socket, undefined).
--spec peernames(Socket) -> {ok, [{Address, Port}]} | {error, posix()} when
- Socket :: socket(),
- Address :: ip_address(),
- Port :: non_neg_integer().
+-spec peernames(Socket :: socket()) ->
+ {ok,
+ [{ip_address(), port_number()} |
+ returned_non_ip_address()]} |
+ {error, posix()}.
peernames(Socket) ->
prim_inet:peernames(Socket).
@@ -195,15 +210,21 @@ peernames(Socket, Assoc) ->
prim_inet:peernames(Socket, Assoc).
--spec sockname(Socket) -> {ok, {Address, Port}} | {error, posix()} when
- Socket :: socket(),
- Address :: ip_address(),
- Port :: non_neg_integer().
+-spec sockname(Socket :: socket()) ->
+ {ok,
+ {ip_address(), port_number()} |
+ returned_non_ip_address()} |
+ {error, posix()}.
sockname(Socket) ->
prim_inet:sockname(Socket).
--spec setsockname(Socket :: socket(), Address :: {ip_address(), port_number()}) ->
+-spec setsockname(
+ Socket :: socket(),
+ Address ::
+ {ip_address() | 'any' | 'loopback',
+ port_number()} |
+ socket_address()) ->
'ok' | {'error', any()}.
setsockname(Socket, {IP,Port}) ->
@@ -211,10 +232,11 @@ setsockname(Socket, {IP,Port}) ->
setsockname(Socket, undefined) ->
prim_inet:setsockname(Socket, undefined).
--spec socknames(Socket) -> {ok, [{Address, Port}]} | {error, posix()} when
- Socket :: socket(),
- Address :: ip_address(),
- Port :: non_neg_integer().
+-spec socknames(Socket :: socket()) ->
+ {ok,
+ [{ip_address(), port_number()} |
+ returned_non_ip_address()]} |
+ {error, posix()}.
socknames(Socket) ->
prim_inet:socknames(Socket).
@@ -439,7 +461,12 @@ getstat(Socket,What) ->
Hostent :: hostent().
gethostbyname(Name) ->
- gethostbyname_tm(Name, inet, false).
+ case inet_db:res_option(inet6) of
+ true ->
+ gethostbyname_tm(Name, inet6, false);
+ false ->
+ gethostbyname_tm(Name, inet, false)
+ end.
-spec gethostbyname(Hostname, Family) ->
{ok, Hostent} | {error, posix()} when
@@ -676,7 +703,7 @@ connect_options() ->
low_msgq_watermark, send_timeout, send_timeout_close, delay_send, raw,
show_econnreset].
-connect_options(Opts, Family) ->
+connect_options(Opts, Mod) ->
BaseOpts =
case application:get_env(kernel, inet_default_connect_options) of
{ok,List} when is_list(List) ->
@@ -693,7 +720,7 @@ connect_options(Opts, Family) ->
{ok, R} ->
{ok, R#connect_opts {
opts = lists:reverse(R#connect_opts.opts),
- ifaddr = translate_ip(R#connect_opts.ifaddr, Family)
+ ifaddr = Mod:translate_ip(R#connect_opts.ifaddr)
}};
Error -> Error
end.
@@ -708,9 +735,6 @@ con_opt([Opt | Opts], #connect_opts{} = R, As) ->
{fd,Fd} -> con_opt(Opts, R#connect_opts { fd = Fd }, As);
binary -> con_add(mode, binary, R, Opts, As);
list -> con_add(mode, list, R, Opts, As);
- {tcp_module,_} -> con_opt(Opts, R, As);
- inet -> con_opt(Opts, R, As);
- inet6 -> con_opt(Opts, R, As);
{netns,NS} ->
BinNS = filename2binary(NS),
case prim_inet:is_sockopt_val(netns, BinNS) of
@@ -747,7 +771,7 @@ listen_options() ->
low_msgq_watermark, send_timeout, send_timeout_close, delay_send,
packet_size, raw, show_econnreset].
-listen_options(Opts, Family) ->
+listen_options(Opts, Mod) ->
BaseOpts =
case application:get_env(kernel, inet_default_listen_options) of
{ok,List} when is_list(List) ->
@@ -764,7 +788,7 @@ listen_options(Opts, Family) ->
{ok, R} ->
{ok, R#listen_opts {
opts = lists:reverse(R#listen_opts.opts),
- ifaddr = translate_ip(R#listen_opts.ifaddr, Family)
+ ifaddr = Mod:translate_ip(R#listen_opts.ifaddr)
}};
Error -> Error
end.
@@ -780,9 +804,6 @@ list_opt([Opt | Opts], #listen_opts{} = R, As) ->
{backlog,BL} -> list_opt(Opts, R#listen_opts { backlog = BL }, As);
binary -> list_add(mode, binary, R, Opts, As);
list -> list_add(mode, list, R, Opts, As);
- {tcp_module,_} -> list_opt(Opts, R, As);
- inet -> list_opt(Opts, R, As);
- inet6 -> list_opt(Opts, R, As);
{netns,NS} ->
BinNS = filename2binary(NS),
case prim_inet:is_sockopt_val(netns, BinNS) of
@@ -807,6 +828,19 @@ list_add(Name, Val, #listen_opts{} = R, Opts, As) ->
Error -> Error
end.
+tcp_module(Opts) ->
+ tcp_module_1(Opts, undefined).
+
+tcp_module(Opts, Addr) ->
+ Address = {undefined,Addr},
+ %% Address has to be a 2-tuple but the first element is ignored
+ tcp_module_1(Opts, Address).
+
+tcp_module_1(Opts, Address) ->
+ mod(
+ Opts, tcp_module, Address,
+ #{inet => inet_tcp, inet6 => inet6_tcp, local => local_tcp}).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Available options for udp:open
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -818,12 +852,12 @@ udp_options() ->
high_msgq_watermark, low_msgq_watermark].
-udp_options(Opts, Family) ->
+udp_options(Opts, Mod) ->
case udp_opt(Opts, #udp_opts { }, udp_options()) of
{ok, R} ->
{ok, R#udp_opts {
opts = lists:reverse(R#udp_opts.opts),
- ifaddr = translate_ip(R#udp_opts.ifaddr, Family)
+ ifaddr = Mod:translate_ip(R#udp_opts.ifaddr)
}};
Error -> Error
end.
@@ -838,9 +872,6 @@ udp_opt([Opt | Opts], #udp_opts{} = R, As) ->
{fd,Fd} -> udp_opt(Opts, R#udp_opts { fd = Fd }, As);
binary -> udp_add(mode, binary, R, Opts, As);
list -> udp_add(mode, list, R, Opts, As);
- {udp_module,_} -> udp_opt(Opts, R, As);
- inet -> udp_opt(Opts, R, As);
- inet6 -> udp_opt(Opts, R, As);
{netns,NS} ->
BinNS = filename2binary(NS),
case prim_inet:is_sockopt_val(netns, BinNS) of
@@ -865,6 +896,11 @@ udp_add(Name, Val, #udp_opts{} = R, Opts, As) ->
Error -> Error
end.
+udp_module(Opts) ->
+ mod(
+ Opts, udp_module, undefined,
+ #{inet => inet_udp, inet6 => inet6_udp, local => local_udp}).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Available options for sctp:open
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -921,9 +957,6 @@ sctp_opt([Opt|Opts], Mod, #sctp_opts{} = R, As) ->
sctp_opt(Opts, Mod, R#sctp_opts{type=Type}, As);
binary -> sctp_opt (Opts, Mod, R, As, mode, binary);
list -> sctp_opt (Opts, Mod, R, As, mode, list);
- {sctp_module,_} -> sctp_opt (Opts, Mod, R, As); % Done with
- inet -> sctp_opt (Opts, Mod, R, As); % Done with
- inet6 -> sctp_opt (Opts, Mod, R, As); % Done with
{netns,NS} ->
BinNS = filename2binary(NS),
case prim_inet:is_sockopt_val(netns, BinNS) of
@@ -965,6 +998,11 @@ sctp_opt_ifaddr(Opts, Mod, #sctp_opts{ifaddr=IfAddr}=R, As, Addr) ->
_ -> [IP,IfAddr]
end}, As).
+sctp_module(Opts) ->
+ mod(
+ Opts, sctp_module, undefined,
+ #{inet => inet_sctp, inet6 => inet6_sctp}).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Util to check and insert option in option list
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1023,6 +1061,53 @@ translate_ip(any, inet6) -> {0,0,0,0,0,0,0,0};
translate_ip(loopback, inet6) -> {0,0,0,0,0,0,0,1};
translate_ip(IP, _) -> IP.
+mod(Opts, Tag, Address, Map) ->
+ mod(Opts, Tag, Address, Map, undefined, []).
+%%
+mod([{Tag, M}|Opts], Tag, Address, Map, Mod, Acc) ->
+ mod(Opts, Tag, Address, Map, Mod, Acc, M);
+mod([{T, _} = Opt|Opts], Tag, _Address, Map, Mod, Acc)
+ when T =:= ip; T =:= ifaddr->
+ mod(Opts, Tag, Opt, Map, Mod, [Opt|Acc]);
+mod([Family|Opts], Tag, Address, Map, Mod, Acc) when is_atom(Family) ->
+ case Map of
+ #{Family := M} ->
+ mod(Opts, Tag, Address, Map, Mod, Acc, M);
+ #{} ->
+ mod(Opts, Tag, Address, Map, Mod, [Family|Acc])
+ end;
+mod([Opt|Opts], Tag, Address, Map, Mod, Acc) ->
+ mod(Opts, Tag, Address, Map, Mod, [Opt|Acc]);
+mod([], Tag, Address, Map, undefined, Acc) ->
+ {case Address of
+ {_, {local, _}} ->
+ case Map of
+ #{local := Mod} ->
+ Mod;
+ #{} ->
+ inet_db:Tag()
+ end;
+ {_, IP} when tuple_size(IP) =:= 8 ->
+ #{inet := IPv4Mod} = Map,
+ %% Get the mod, but IPv6 address overrides default IPv4
+ case inet_db:Tag() of
+ IPv4Mod ->
+ #{inet6 := IPv6Mod} = Map,
+ IPv6Mod;
+ Mod ->
+ Mod
+ end;
+ _ ->
+ inet_db:Tag()
+ end, lists:reverse(Acc)};
+mod([], _Tag, _Address, _Map, Mod, Acc) ->
+ {Mod, lists:reverse(Acc)}.
+%%
+mod(Opts, Tag, Address, Map, undefined, Acc, M) ->
+ mod(Opts, Tag, Address, Map, M, Acc);
+mod(Opts, Tag, Address, Map, Mod, Acc, _M) ->
+ mod(Opts, Tag, Address, Map, Mod, Acc).
+
getaddrs_tm({A,B,C,D} = IP, Fam, _) ->
%% Only "syntactic" validation and check of family.
@@ -1230,7 +1315,17 @@ gethostbyaddr_tm_native(Addr, Timer, Opts) ->
end.
-spec open(Fd_or_OpenOpts :: integer() | list(),
- Addr :: ip_address(),
+ Addr ::
+ socket_address() |
+ {ip_address() | 'any' | 'loopback', % Unofficial
+ port_number()} |
+ {inet, % Unofficial
+ {ip4_address() | 'any' | 'loopback',
+ port_number()}} |
+ {inet6, % Unofficial
+ {ip6_address() | 'any' | 'loopback',
+ port_number()}} |
+ undefined, % Internal - no bind()
Port :: port_number(),
Opts :: [socket_setopt()],
Protocol :: socket_protocol(),
@@ -1250,11 +1345,16 @@ open(FdO, Addr, Port, Opts, Protocol, Family, Type, Module)
{ok,S} ->
case prim_inet:setopts(S, Opts) of
ok ->
- case if is_list(Addr) ->
- bindx(S, Addr, Port);
- true ->
- prim_inet:bind(S, Addr, Port)
- end of
+ case
+ case Addr of
+ undefined ->
+ {ok, undefined};
+ _ when is_list(Addr) ->
+ bindx(S, Addr, Port);
+ _ ->
+ prim_inet:bind(S, Addr, Port)
+ end
+ of
{ok, _} ->
inet_db:register_socket(S, Module),
{ok,S};
diff --git a/lib/kernel/src/inet6_sctp.erl b/lib/kernel/src/inet6_sctp.erl
index cc98bc0ccb..a5503f6f54 100644
--- a/lib/kernel/src/inet6_sctp.erl
+++ b/lib/kernel/src/inet6_sctp.erl
@@ -1,8 +1,8 @@
%%
%% %CopyrightBegin%
-%%
+%%
%% Copyright Ericsson AB 2007-2016. All Rights Reserved.
-%%
+%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
@@ -14,13 +14,12 @@
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% SCTP protocol contribution by Leonid Timochouk and Serge Aleynikov.
%% See also: $ERL_TOP/lib/kernel/AUTHORS
%%
-%%
-module(inet6_sctp).
%% This module provides functions for communicating with
@@ -31,6 +30,7 @@
-include("inet_sctp.hrl").
-include("inet_int.hrl").
+-define(PROTO, sctp).
-define(FAMILY, inet6).
-export([getserv/1,getaddr/1,getaddr/2,translate_ip/1]).
-export([open/1,close/1,listen/2,peeloff/2,connect/5]).
@@ -39,25 +39,19 @@
getserv(Port) when is_integer(Port) -> {ok, Port};
-getserv(Name) when is_atom(Name) ->
- inet:getservbyname(Name, sctp);
-getserv(_) ->
- {error,einval}.
-
-getaddr(Address) ->
- inet:getaddr(Address, ?FAMILY).
-getaddr(Address, Timer) ->
- inet:getaddr_tm(Address, ?FAMILY, Timer).
+getserv(Name) when is_atom(Name) -> inet:getservbyname(Name, ?PROTO);
+getserv(_) -> {error,einval}.
-translate_ip(IP) ->
- inet:translate_ip(IP, ?FAMILY).
+getaddr(Address) -> inet:getaddr(Address, ?FAMILY).
+getaddr(Address, Timer) -> inet:getaddr_tm(Address, ?FAMILY, Timer).
+translate_ip(IP) -> inet:translate_ip(IP, ?FAMILY).
open(Opts) ->
case inet:sctp_options(Opts, ?MODULE) of
{ok,#sctp_opts{fd=Fd,ifaddr=Addr,port=Port,type=Type,opts=SOs}} ->
- inet:open(Fd, Addr, Port, SOs, sctp, ?FAMILY, Type, ?MODULE);
+ inet:open(Fd, Addr, Port, SOs, ?PROTO, ?FAMILY, Type, ?MODULE);
Error -> Error
end.
diff --git a/lib/kernel/src/inet6_tcp.erl b/lib/kernel/src/inet6_tcp.erl
index 3dfe5dfc86..a0d5d3df70 100644
--- a/lib/kernel/src/inet6_tcp.erl
+++ b/lib/kernel/src/inet6_tcp.erl
@@ -25,13 +25,18 @@
-export([controlling_process/2]).
-export([fdopen/2]).
--export([family/0, mask/2, parse_address/1]).
+-export([family/0, mask/2, parse_address/1]). % inet_tcp_dist
-export([getserv/1, getaddr/1, getaddr/2, getaddrs/1, getaddrs/2]).
+-export([translate_ip/1]).
-include("inet_int.hrl").
+-define(FAMILY, inet6).
+-define(PROTO, tcp).
+-define(TYPE, stream).
+
%% my address family
-family() -> inet6.
+family() -> ?FAMILY.
%% Apply netmask on address
mask({M1,M2,M3,M4,M5,M6,M7,M8}, {IP1,IP2,IP3,IP4,IP5,IP6,IP7,IP8}) ->
@@ -50,15 +55,18 @@ parse_address(Host) ->
%% inet_tcp port lookup
getserv(Port) when is_integer(Port) -> {ok, Port};
-getserv(Name) when is_atom(Name) -> inet:getservbyname(Name,tcp).
+getserv(Name) when is_atom(Name) -> inet:getservbyname(Name, ?PROTO).
%% inet_tcp address lookup
-getaddr(Address) -> inet:getaddr(Address, inet6).
-getaddr(Address,Timer) -> inet:getaddr_tm(Address, inet6, Timer).
+getaddr(Address) -> inet:getaddr(Address, ?FAMILY).
+getaddr(Address, Timer) -> inet:getaddr_tm(Address, ?FAMILY, Timer).
%% inet_tcp address lookup
-getaddrs(Address) -> inet:getaddrs(Address, inet6).
-getaddrs(Address,Timer) -> inet:getaddrs_tm(Address,inet6,Timer).
+getaddrs(Address) -> inet:getaddrs(Address, ?FAMILY).
+getaddrs(Address, Timer) -> inet:getaddrs_tm(Address, ?FAMILY, Timer).
+
+%% inet_udp special this side addresses
+translate_ip(IP) -> inet:translate_ip(IP, ?FAMILY).
%%
%% Send data on a socket
@@ -73,11 +81,6 @@ recv(Socket, Length) -> prim_inet:recv(Socket, Length).
recv(Socket, Length, Timeout) -> prim_inet:recv(Socket, Length, Timeout).
unrecv(Socket, Data) -> prim_inet:unrecv(Socket, Data).
-%%
-%% Close a socket (async)
-%%
-close(Socket) ->
- inet:tcp_close(Socket).
%%
%% Shutdown one end of a socket
@@ -86,6 +89,12 @@ shutdown(Socket, How) ->
prim_inet:shutdown(Socket, How).
%%
+%% Close a socket (async)
+%%
+close(Socket) ->
+ inet:tcp_close(Socket).
+
+%%
%% Set controlling process
%% FIXME: move messages to new owner!!!
%%
@@ -100,24 +109,28 @@ connect(Address, Port, Opts) ->
connect(Address, Port, Opts, infinity) ->
do_connect(Address, Port, Opts, infinity);
-connect(Address, Port, Opts, Timeout) when is_integer(Timeout),
- Timeout >= 0 ->
+connect(Address, Port, Opts, Timeout)
+ when is_integer(Timeout), Timeout >= 0 ->
do_connect(Address, Port, Opts, Timeout).
-do_connect(Addr = {A,B,C,D,E,F,G,H}, Port, Opts, Time) when
- ?ip6(A,B,C,D,E,F,G,H), ?port(Port) ->
- case inet:connect_options(Opts, inet6) of
+do_connect(Addr = {A,B,C,D,E,F,G,H}, Port, Opts, Time)
+ when ?ip6(A,B,C,D,E,F,G,H), ?port(Port) ->
+ case inet:connect_options(Opts, ?MODULE) of
{error, Reason} -> exit(Reason);
- {ok, #connect_opts{fd=Fd,
- ifaddr=BAddr={Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb},
- port=BPort,
- opts=SockOpts}}
+ {ok,
+ #connect_opts{
+ fd = Fd,
+ ifaddr = BAddr = {Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb},
+ port = BPort,
+ opts = SockOpts}}
when ?ip6(Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb), ?port(BPort) ->
- case inet:open(Fd,BAddr,BPort,SockOpts,tcp,inet6,stream,?MODULE) of
+ case inet:open(
+ Fd, BAddr, BPort, SockOpts,
+ ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of
{ok, S} ->
case prim_inet:connect(S, Addr, Port, Time) of
- ok -> {ok,S};
- Error -> prim_inet:close(S), Error
+ ok -> {ok,S};
+ Error -> prim_inet:close(S), Error
end;
Error -> Error
end;
@@ -128,14 +141,18 @@ do_connect(Addr = {A,B,C,D,E,F,G,H}, Port, Opts, Time) when
%% Listen
%%
listen(Port, Opts) ->
- case inet:listen_options([{port,Port} | Opts], inet6) of
+ case inet:listen_options([{port,Port} | Opts], ?MODULE) of
{error, Reason} -> exit(Reason);
- {ok, #listen_opts{fd=Fd,
- ifaddr=BAddr={A,B,C,D,E,F,G,H},
- port=BPort,
- opts=SockOpts}=R}
+ {ok,
+ #listen_opts{
+ fd = Fd,
+ ifaddr = BAddr = {A,B,C,D,E,F,G,H},
+ port = BPort,
+ opts = SockOpts} = R}
when ?ip6(A,B,C,D,E,F,G,H), ?port(BPort) ->
- case inet:open(Fd,BAddr,BPort,SockOpts,tcp,inet6,stream,?MODULE) of
+ case inet:open(
+ Fd, BAddr, BPort, SockOpts,
+ ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of
{ok, S} ->
case prim_inet:listen(S, R#listen_opts.backlog) of
ok -> {ok, S};
@@ -156,18 +173,17 @@ accept(L) ->
{ok,S};
Error -> Error
end.
-
-accept(L,Timeout) ->
- case prim_inet:accept(L,Timeout) of
+
+accept(L, Timeout) ->
+ case prim_inet:accept(L, Timeout) of
{ok, S} ->
inet_db:register_socket(S, ?MODULE),
{ok,S};
Error -> Error
end.
-
+
%%
%% Create a port/socket from a file descriptor
%%
fdopen(Fd, Opts) ->
- inet:fdopen(Fd, Opts, tcp, inet6, stream, ?MODULE).
-
+ inet:fdopen(Fd, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
diff --git a/lib/kernel/src/inet6_udp.erl b/lib/kernel/src/inet6_udp.erl
index eb6945f60a..71db0357cd 100644
--- a/lib/kernel/src/inet6_udp.erl
+++ b/lib/kernel/src/inet6_udp.erl
@@ -24,29 +24,44 @@
-export([controlling_process/2]).
-export([fdopen/2]).
--export([getserv/1, getaddr/1, getaddr/2]).
+-export([getserv/1, getaddr/1, getaddr/2, translate_ip/1]).
-include("inet_int.hrl").
+-define(FAMILY, inet6).
+-define(PROTO, udp).
+-define(TYPE, dgram).
+
+
%% inet_udp port lookup
getserv(Port) when is_integer(Port) -> {ok, Port};
-getserv(Name) when is_atom(Name) -> inet:getservbyname(Name,udp).
+getserv(Name) when is_atom(Name) -> inet:getservbyname(Name, ?PROTO).
%% inet_udp address lookup
-getaddr(Address) -> inet:getaddr(Address, inet6).
-getaddr(Address,Timer) -> inet:getaddr(Address, inet6, Timer).
+getaddr(Address) -> inet:getaddr(Address, ?FAMILY).
+getaddr(Address, Timer) -> inet:getaddr(Address, ?FAMILY, Timer).
+
+%% inet_udp special this side addresses
+translate_ip(IP) -> inet:translate_ip(IP, ?FAMILY).
+-spec open(_) -> {ok, inet:socket()} | {error, atom()}.
open(Port) -> open(Port, []).
+-spec open(_, _) -> {ok, inet:socket()} | {error, atom()}.
open(Port, Opts) ->
- case inet:udp_options([{port,Port} | Opts], inet6) of
+ case inet:udp_options(
+ [{port,Port} | Opts],
+ ?MODULE) of
{error, Reason} -> exit(Reason);
- {ok, #udp_opts{fd=Fd,
- ifaddr=BAddr={A,B,C,D,E,F,G,H},
- port=BPort,
- opts=SockOpts}}
+ {ok,
+ #udp_opts{
+ fd = Fd,
+ ifaddr = BAddr = {A,B,C,D,E,F,G,H},
+ port = BPort,
+ opts = SockOpts}}
when ?ip6(A,B,C,D,E,F,G,H), ?port(BPort) ->
- inet:open(Fd,BAddr,BPort,SockOpts,udp,inet6,dgram,?MODULE);
+ inet:open(
+ Fd, BAddr, BPort, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE);
{ok, _} -> exit(badarg)
end.
@@ -61,12 +76,13 @@ connect(S, Addr = {A,B,C,D,E,F,G,H}, P)
when ?ip6(A,B,C,D,E,F,G,H), ?port(P) ->
prim_inet:connect(S, Addr, P).
-recv(S,Len) ->
+recv(S, Len) ->
prim_inet:recvfrom(S, Len).
-recv(S,Len,Time) ->
+recv(S, Len, Time) ->
prim_inet:recvfrom(S, Len, Time).
+-spec close(inet:socket()) -> ok.
close(S) ->
inet:udp_close(S).
@@ -85,4 +101,4 @@ controlling_process(Socket, NewOwner) ->
%% Create a port/socket from a file descriptor
%%
fdopen(Fd, Opts) ->
- inet:fdopen(Fd, Opts, udp, inet6, dgram, ?MODULE).
+ inet:fdopen(Fd, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
diff --git a/lib/kernel/src/inet_int.hrl b/lib/kernel/src/inet_int.hrl
index 65d78b66c9..c8a8962e78 100644
--- a/lib/kernel/src/inet_int.hrl
+++ b/lib/kernel/src/inet_int.hrl
@@ -25,10 +25,13 @@
%%
%% family codes to open
+-define(INET_AF_UNSPEC, 0).
-define(INET_AF_INET, 1).
-define(INET_AF_INET6, 2).
-define(INET_AF_ANY, 3). % Fake for ANY in any address family
-define(INET_AF_LOOPBACK, 4). % Fake for LOOPBACK in any address family
+-define(INET_AF_LOCAL, 5). % For Unix Domain address family
+-define(INET_AF_UNDEFINED, 6). % For any unknown address family
%% type codes to open and gettype - INET_REQ_GETTYPE
-define(INET_TYPE_STREAM, 1).
@@ -378,7 +381,7 @@
{
ifaddr = any, %% bind to interface address
port = 0, %% bind to port (default is dynamic port)
- fd = -1, %% fd >= 0 => already bound
+ fd = -1, %% fd >= 0 => already bound
opts = [] %% [{active,true}] added in inet:connect_options
}).
diff --git a/lib/kernel/src/inet_sctp.erl b/lib/kernel/src/inet_sctp.erl
index 60677cb7de..8569cacb29 100644
--- a/lib/kernel/src/inet_sctp.erl
+++ b/lib/kernel/src/inet_sctp.erl
@@ -30,6 +30,7 @@
-include("inet_sctp.hrl").
-include("inet_int.hrl").
+-define(PROTO, sctp).
-define(FAMILY, inet).
-export([getserv/1,getaddr/1,getaddr/2,translate_ip/1]).
-export([open/1,close/1,listen/2,peeloff/2,connect/5]).
@@ -38,25 +39,19 @@
getserv(Port) when is_integer(Port) -> {ok, Port};
-getserv(Name) when is_atom(Name) ->
- inet:getservbyname(Name, sctp);
-getserv(_) ->
- {error,einval}.
+getserv(Name) when is_atom(Name) -> inet:getservbyname(Name, ?PROTO);
+getserv(_) -> {error,einval}.
-getaddr(Address) ->
- inet:getaddr(Address, ?FAMILY).
-getaddr(Address, Timer) ->
- inet:getaddr_tm(Address, ?FAMILY, Timer).
-
-translate_ip(IP) ->
- inet:translate_ip(IP, ?FAMILY).
+getaddr(Address) -> inet:getaddr(Address, ?FAMILY).
+getaddr(Address, Timer) -> inet:getaddr_tm(Address, ?FAMILY, Timer).
+translate_ip(IP) -> inet:translate_ip(IP, ?FAMILY).
open(Opts) ->
case inet:sctp_options(Opts, ?MODULE) of
{ok,#sctp_opts{fd=Fd,ifaddr=Addr,port=Port,type=Type,opts=SOs}} ->
- inet:open(Fd, Addr, Port, SOs, sctp, ?FAMILY, Type, ?MODULE);
+ inet:open(Fd, Addr, Port, SOs, ?PROTO, ?FAMILY, Type, ?MODULE);
Error -> Error
end.
diff --git a/lib/kernel/src/inet_tcp.erl b/lib/kernel/src/inet_tcp.erl
index ee885af3b0..dac6b3119d 100644
--- a/lib/kernel/src/inet_tcp.erl
+++ b/lib/kernel/src/inet_tcp.erl
@@ -27,13 +27,18 @@
-export([controlling_process/2]).
-export([fdopen/2]).
--export([family/0, mask/2, parse_address/1]).
+-export([family/0, mask/2, parse_address/1]). % inet_tcp_dist
-export([getserv/1, getaddr/1, getaddr/2, getaddrs/1, getaddrs/2]).
+-export([translate_ip/1]).
-include("inet_int.hrl").
+-define(FAMILY, inet).
+-define(PROTO, tcp).
+-define(TYPE, stream).
+
%% my address family
-family() -> inet.
+family() -> ?FAMILY.
%% Apply netmask on address
mask({M1,M2,M3,M4}, {IP1,IP2,IP3,IP4}) ->
@@ -48,16 +53,19 @@ parse_address(Host) ->
%% inet_tcp port lookup
getserv(Port) when is_integer(Port) -> {ok, Port};
-getserv(Name) when is_atom(Name) -> inet:getservbyname(Name,tcp).
+getserv(Name) when is_atom(Name) -> inet:getservbyname(Name, ?PROTO).
%% inet_tcp address lookup
-getaddr(Address) -> inet:getaddr(Address, inet).
-getaddr(Address,Timer) -> inet:getaddr_tm(Address, inet, Timer).
+getaddr(Address) -> inet:getaddr(Address, ?FAMILY).
+getaddr(Address, Timer) -> inet:getaddr_tm(Address, ?FAMILY, Timer).
%% inet_tcp address lookup
-getaddrs(Address) -> inet:getaddrs(Address, inet).
-getaddrs(Address,Timer) -> inet:getaddrs_tm(Address,inet,Timer).
-
+getaddrs(Address) -> inet:getaddrs(Address, ?FAMILY).
+getaddrs(Address, Timer) -> inet:getaddrs_tm(Address, ?FAMILY, Timer).
+
+%% inet_udp special this side addresses
+translate_ip(IP) -> inet:translate_ip(IP, ?FAMILY).
+
%%
%% Send data on a socket
%%
@@ -77,7 +85,7 @@ unrecv(Socket, Data) -> prim_inet:unrecv(Socket, Data).
%%
shutdown(Socket, How) ->
prim_inet:shutdown(Socket, How).
-
+
%%
%% Close a socket (async)
%%
@@ -88,7 +96,7 @@ close(Socket) ->
%% Set controlling process
%%
controlling_process(Socket, NewOwner) ->
- inet:tcp_controlling_process(Socket, NewOwner).
+ inet:tcp_controlling_process(Socket, NewOwner).
%%
%% Connect
@@ -98,23 +106,28 @@ connect(Address, Port, Opts) ->
connect(Address, Port, Opts, infinity) ->
do_connect(Address, Port, Opts, infinity);
-connect(Address, Port, Opts, Timeout) when is_integer(Timeout),
- Timeout >= 0 ->
+connect(Address, Port, Opts, Timeout)
+ when is_integer(Timeout), Timeout >= 0 ->
do_connect(Address, Port, Opts, Timeout).
-do_connect({A,B,C,D}, Port, Opts, Time) when ?ip(A,B,C,D), ?port(Port) ->
- case inet:connect_options(Opts, inet) of
+do_connect(Addr = {A,B,C,D}, Port, Opts, Time)
+ when ?ip(A,B,C,D), ?port(Port) ->
+ case inet:connect_options(Opts, ?MODULE) of
{error, Reason} -> exit(Reason);
- {ok, #connect_opts{fd=Fd,
- ifaddr=BAddr={Ab,Bb,Cb,Db},
- port=BPort,
- opts=SockOpts}}
+ {ok,
+ #connect_opts{
+ fd = Fd,
+ ifaddr = BAddr = {Ab,Bb,Cb,Db},
+ port = BPort,
+ opts = SockOpts}}
when ?ip(Ab,Bb,Cb,Db), ?port(BPort) ->
- case inet:open(Fd,BAddr,BPort,SockOpts,tcp,inet,stream,?MODULE) of
+ case inet:open(
+ Fd, BAddr, BPort, SockOpts,
+ ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of
{ok, S} ->
- case prim_inet:connect(S, {A,B,C,D}, Port, Time) of
- ok -> {ok,S};
- Error -> prim_inet:close(S), Error
+ case prim_inet:connect(S, Addr, Port, Time) of
+ ok -> {ok,S};
+ Error -> prim_inet:close(S), Error
end;
Error -> Error
end;
@@ -125,14 +138,18 @@ do_connect({A,B,C,D}, Port, Opts, Time) when ?ip(A,B,C,D), ?port(Port) ->
%% Listen
%%
listen(Port, Opts) ->
- case inet:listen_options([{port,Port} | Opts], inet) of
- {error,Reason} -> exit(Reason);
- {ok, #listen_opts{fd=Fd,
- ifaddr=BAddr={A,B,C,D},
- port=BPort,
- opts=SockOpts}=R}
+ case inet:listen_options([{port,Port} | Opts], ?MODULE) of
+ {error, Reason} -> exit(Reason);
+ {ok,
+ #listen_opts{
+ fd = Fd,
+ ifaddr = BAddr = {A,B,C,D},
+ port = BPort,
+ opts = SockOpts} = R}
when ?ip(A,B,C,D), ?port(BPort) ->
- case inet:open(Fd,BAddr,BPort,SockOpts,tcp,inet,stream,?MODULE) of
+ case inet:open(
+ Fd, BAddr, BPort, SockOpts,
+ ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of
{ok, S} ->
case prim_inet:listen(S, R#listen_opts.backlog) of
ok -> {ok, S};
@@ -146,23 +163,24 @@ listen(Port, Opts) ->
%%
%% Accept
%%
-accept(L) ->
+accept(L) ->
case prim_inet:accept(L) of
{ok, S} ->
inet_db:register_socket(S, ?MODULE),
{ok,S};
Error -> Error
end.
-
-accept(L,Timeout) ->
- case prim_inet:accept(L,Timeout) of
+
+accept(L, Timeout) ->
+ case prim_inet:accept(L, Timeout) of
{ok, S} ->
inet_db:register_socket(S, ?MODULE),
{ok,S};
Error -> Error
end.
+
%%
%% Create a port/socket from a file descriptor
%%
fdopen(Fd, Opts) ->
- inet:fdopen(Fd, Opts, tcp, inet, stream, ?MODULE).
+ inet:fdopen(Fd, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
index 64b28bb49b..f91d7ef7c3 100644
--- a/lib/kernel/src/inet_tcp_dist.erl
+++ b/lib/kernel/src/inet_tcp_dist.erl
@@ -73,7 +73,8 @@ gen_listen(Driver, Name) ->
{ok, Socket} ->
TcpAddress = get_tcp_address(Driver, Socket),
{_,Port} = TcpAddress#net_address.address,
- case erl_epmd:register_node(Name, Port) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:register_node(Name, Port) of
{ok, Creation} ->
{ok, {Socket, TcpAddress, Creation}};
Error ->
@@ -280,7 +281,8 @@ do_setup(Driver, Kernel, Node, Type, MyNode, LongOrShortNames, SetupTime) ->
case inet:getaddr(Address, AddressFamily) of
{ok, Ip} ->
Timer = dist_util:start_timer(SetupTime),
- case erl_epmd:port_please(Name, Ip) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:port_please(Name, Ip) of
{port, TcpPort, Version} ->
?trace("port_please(~p) -> version ~p~n",
[Node,Version]),
diff --git a/lib/kernel/src/inet_udp.erl b/lib/kernel/src/inet_udp.erl
index 7e8d9cdb72..8a8aa8ecca 100644
--- a/lib/kernel/src/inet_udp.erl
+++ b/lib/kernel/src/inet_udp.erl
@@ -24,21 +24,26 @@
-export([controlling_process/2]).
-export([fdopen/2]).
--export([getserv/1, getaddr/1, getaddr/2]).
+-export([getserv/1, getaddr/1, getaddr/2, translate_ip/1]).
-include("inet_int.hrl").
+-define(FAMILY, inet).
+-define(PROTO, udp).
+-define(TYPE, dgram).
-define(RECBUF, (8*1024)).
-
%% inet_udp port lookup
getserv(Port) when is_integer(Port) -> {ok, Port};
-getserv(Name) when is_atom(Name) -> inet:getservbyname(Name,udp).
+getserv(Name) when is_atom(Name) -> inet:getservbyname(Name, ?PROTO).
%% inet_udp address lookup
-getaddr(Address) -> inet:getaddr(Address, inet).
-getaddr(Address,Timer) -> inet:getaddr_tm(Address, inet, Timer).
+getaddr(Address) -> inet:getaddr(Address, ?FAMILY).
+getaddr(Address, Timer) -> inet:getaddr(Address, ?FAMILY, Timer).
+
+%% inet_udp special this side addresses
+translate_ip(IP) -> inet:translate_ip(IP, ?FAMILY).
-spec open(_) -> {ok, inet:socket()} | {error, atom()}.
open(Port) -> open(Port, []).
@@ -47,33 +52,38 @@ open(Port) -> open(Port, []).
open(Port, Opts) ->
case inet:udp_options(
[{port,Port}, {recbuf, ?RECBUF} | Opts],
- inet) of
+ ?MODULE) of
{error, Reason} -> exit(Reason);
- {ok, #udp_opts{fd=Fd,
- ifaddr=BAddr={A,B,C,D},
- port=BPort,
- opts=SockOpts}} when ?ip(A,B,C,D), ?port(BPort) ->
- inet:open(Fd,BAddr,BPort,SockOpts,udp,inet,dgram,?MODULE);
+ {ok,
+ #udp_opts{
+ fd = Fd,
+ ifaddr = BAddr = {A,B,C,D},
+ port = BPort,
+ opts = SockOpts}}
+ when ?ip(A,B,C,D), ?port(BPort) ->
+ inet:open(
+ Fd, BAddr, BPort, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE);
{ok, _} -> exit(badarg)
end.
-send(S,{A,B,C,D},P,Data) when ?ip(A,B,C,D), ?port(P) ->
- prim_inet:sendto(S, {A,B,C,D}, P, Data).
+send(S, {A,B,C,D} = Addr, P, Data)
+ when ?ip(A,B,C,D), ?port(P) ->
+ prim_inet:sendto(S, Addr, P, Data).
send(S, Data) ->
prim_inet:sendto(S, {0,0,0,0}, 0, Data).
-connect(S, {A,B,C,D}, P) when ?ip(A,B,C,D), ?port(P) ->
- prim_inet:connect(S, {A,B,C,D}, P).
+connect(S, Addr = {A,B,C,D}, P)
+ when ?ip(A,B,C,D), ?port(P) ->
+ prim_inet:connect(S, Addr, P).
-recv(S,Len) ->
+recv(S, Len) ->
prim_inet:recvfrom(S, Len).
-recv(S,Len,Time) ->
+recv(S, Len, Time) ->
prim_inet:recvfrom(S, Len, Time).
-spec close(inet:socket()) -> ok.
-
close(S) ->
inet:udp_close(S).
@@ -92,9 +102,9 @@ controlling_process(Socket, NewOwner) ->
%% Create a port/socket from a file descriptor
%%
fdopen(Fd, Opts) ->
- inet:fdopen(Fd,
- optuniquify([{recbuf, ?RECBUF} | Opts]),
- udp, inet, dgram, ?MODULE).
+ inet:fdopen(
+ Fd, optuniquify([{recbuf, ?RECBUF} | Opts]),
+ ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
%% Remove all duplicate options from an option list.
diff --git a/lib/kernel/src/kernel.app.src b/lib/kernel/src/kernel.app.src
index 15e0ec02a9..56d1699656 100644
--- a/lib/kernel/src/kernel.app.src
+++ b/lib/kernel/src/kernel.app.src
@@ -55,6 +55,8 @@
inet_tcp_dist,
kernel,
kernel_config,
+ local_tcp,
+ local_udp,
net,
net_adm,
net_kernel,
@@ -116,6 +118,6 @@
{applications, []},
{env, [{error_logger, tty}]},
{mod, {kernel, []}},
- {runtime_dependencies, ["erts-8.0", "stdlib-2.6", "sasl-2.6"]}
+ {runtime_dependencies, ["erts-8.0", "stdlib-3.0", "sasl-3.0"]}
]
}.
diff --git a/lib/kernel/src/local_tcp.erl b/lib/kernel/src/local_tcp.erl
new file mode 100644
index 0000000000..e3c67dfbb7
--- /dev/null
+++ b/lib/kernel/src/local_tcp.erl
@@ -0,0 +1,178 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(local_tcp).
+
+%% Socket server for TCP/IP
+
+-export([connect/3, connect/4, listen/2, accept/1, accept/2, close/1]).
+-export([send/2, send/3, recv/2, recv/3, unrecv/2]).
+-export([shutdown/2]).
+-export([controlling_process/2]).
+-export([fdopen/2]).
+
+-export([getserv/1, getaddr/1, getaddr/2, getaddrs/1, getaddrs/2]).
+-export([translate_ip/1]).
+
+-include("inet_int.hrl").
+
+-define(FAMILY, local).
+-define(PROTO, tcp).
+-define(TYPE, stream).
+
+%% port lookup
+getserv(0) -> {ok, 0}.
+
+%% no address lookup
+getaddr({?FAMILY, _} = Address) -> {ok, Address}.
+getaddr({?FAMILY, _} = Address, _Timer) -> {ok, Address}.
+
+%% no address lookup
+getaddrs({?FAMILY, _} = Address) -> {ok, [Address]}.
+getaddrs({?FAMILY, _} = Address, _Timer) -> {ok, [Address]}.
+
+%% special this side addresses
+translate_ip(IP) -> IP.
+
+%%
+%% Send data on a socket
+%%
+send(Socket, Packet, Opts) -> prim_inet:send(Socket, Packet, Opts).
+send(Socket, Packet) -> prim_inet:send(Socket, Packet, []).
+
+%%
+%% Receive data from a socket (inactive only)
+%%
+recv(Socket, Length) -> prim_inet:recv(Socket, Length).
+recv(Socket, Length, Timeout) -> prim_inet:recv(Socket, Length, Timeout).
+
+unrecv(Socket, Data) -> prim_inet:unrecv(Socket, Data).
+
+%%
+%% Shutdown one end of a socket
+%%
+shutdown(Socket, How) ->
+ prim_inet:shutdown(Socket, How).
+
+%%
+%% Close a socket (async)
+%%
+close(Socket) ->
+ inet:tcp_close(Socket).
+
+%%
+%% Set controlling process
+%% FIXME: move messages to new owner!!!
+%%
+controlling_process(Socket, NewOwner) ->
+ inet:tcp_controlling_process(Socket, NewOwner).
+
+%%
+%% Connect
+%%
+connect(Address, Port, Opts) ->
+ do_connect(Address, Port, Opts, infinity).
+%%
+connect(Address, Port, Opts, infinity) ->
+ do_connect(Address, Port, Opts, infinity);
+connect(Address, Port, Opts, Timeout)
+ when is_integer(Timeout), Timeout >= 0 ->
+ do_connect(Address, Port, Opts, Timeout).
+
+do_connect(Addr = {?FAMILY, _}, 0, Opts, Time) ->
+ case inet:connect_options(Opts, ?MODULE) of
+ {error, Reason} -> exit(Reason);
+ {ok,
+ #connect_opts{
+ fd = Fd,
+ ifaddr = BAddr,
+ port = 0,
+ opts = SockOpts}}
+ when tuple_size(BAddr) =:= 2, element(1, BAddr) =:= ?FAMILY;
+ BAddr =:= any ->
+ case inet:open(
+ Fd,
+ case BAddr of
+ any ->
+ undefined;
+ _ ->
+ BAddr
+ end,
+ 0, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of
+ {ok, S} ->
+ case prim_inet:connect(S, Addr, 0, Time) of
+ ok -> {ok,S};
+ Error -> prim_inet:close(S), Error
+ end;
+ Error -> Error
+ end;
+ {ok, _} -> exit(badarg)
+ end.
+
+%%
+%% Listen
+%%
+listen(0, Opts) ->
+ case inet:listen_options([{port,0} | Opts], ?MODULE) of
+ {error, Reason} -> exit(Reason);
+ {ok,
+ #listen_opts{
+ fd = Fd,
+ ifaddr = BAddr,
+ port = 0,
+ opts = SockOpts} = R}
+ when tuple_size(BAddr) =:= 2, element(1, BAddr) =:= ?FAMILY;
+ BAddr =:= any ->
+ case inet:open(
+ Fd, BAddr, 0, SockOpts,
+ ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of
+ {ok, S} ->
+ case prim_inet:listen(S, R#listen_opts.backlog) of
+ ok -> {ok, S};
+ Error -> prim_inet:close(S), Error
+ end;
+ Error -> Error
+ end;
+ {ok, _} -> exit(badarg)
+ end.
+
+%%
+%% Accept
+%%
+accept(L) ->
+ case prim_inet:accept(L) of
+ {ok, S} ->
+ inet_db:register_socket(S, ?MODULE),
+ {ok,S};
+ Error -> Error
+ end.
+%%
+accept(L, Timeout) ->
+ case prim_inet:accept(L, Timeout) of
+ {ok, S} ->
+ inet_db:register_socket(S, ?MODULE),
+ {ok,S};
+ Error -> Error
+ end.
+
+%%
+%% Create a port/socket from a file descriptor
+%%
+fdopen(Fd, Opts) ->
+ inet:fdopen(Fd, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
diff --git a/lib/kernel/src/local_udp.erl b/lib/kernel/src/local_udp.erl
new file mode 100644
index 0000000000..481a8c4910
--- /dev/null
+++ b/lib/kernel/src/local_udp.erl
@@ -0,0 +1,106 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(local_udp).
+
+-export([open/1, open/2, close/1]).
+-export([send/2, send/4, recv/2, recv/3, connect/3]).
+-export([controlling_process/2]).
+-export([fdopen/2]).
+
+-export([getserv/1, getaddr/1, getaddr/2, translate_ip/1]).
+
+-include("inet_int.hrl").
+
+-define(FAMILY, local).
+-define(PROTO, udp).
+-define(TYPE, dgram).
+
+
+%% port lookup
+getserv(0) -> {ok, 0}.
+
+%% no address lookup
+getaddr({?FAMILY, _} = Address) -> {ok, Address}.
+getaddr({?FAMILY, _} = Address, _Timer) -> {ok, Address}.
+
+%% special this side addresses
+translate_ip(IP) -> IP.
+
+open(0) -> open(0, []).
+%%
+open(0, Opts) ->
+ case inet:udp_options(
+ [{port,0} | Opts],
+ ?MODULE) of
+ {error, Reason} -> exit(Reason);
+ {ok,
+ #udp_opts{
+ fd = Fd,
+ ifaddr = BAddr,
+ port = 0,
+ opts = SockOpts}}
+ when tuple_size(BAddr) =:= 2, element(1, BAddr) =:= ?FAMILY;
+ BAddr =:= any ->
+ inet:open(
+ Fd,
+ case BAddr of
+ any ->
+ undefined;
+ _ ->
+ BAddr
+ end,
+ 0, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE);
+ {ok, _} -> exit(badarg)
+ end.
+
+send(S, Addr = {?FAMILY,_}, 0, Data) ->
+ prim_inet:sendto(S, Addr, 0, Data).
+%%
+send(S, Data) ->
+ prim_inet:sendto(S, {?FAMILY,<<>>}, 0, Data).
+
+connect(S, Addr = {?FAMILY,_}, 0) ->
+ prim_inet:connect(S, Addr, 0).
+
+recv(S, Len) ->
+ prim_inet:recvfrom(S, Len).
+%%
+recv(S, Len, Time) ->
+ prim_inet:recvfrom(S, Len, Time).
+
+close(S) ->
+ inet:udp_close(S).
+
+%%
+%% Set controlling process:
+%% 1) First sync socket into a known state
+%% 2) Move all messages onto the new owners message queue
+%% 3) Commit the owner
+%% 4) Wait for ack of new Owner (since socket does some link and unlink)
+%%
+
+controlling_process(Socket, NewOwner) ->
+ inet:udp_controlling_process(Socket, NewOwner).
+
+%%
+%% Create a port/socket from a file descriptor
+%%
+fdopen(Fd, Opts) ->
+ inet:fdopen(Fd, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
diff --git a/lib/kernel/src/net_adm.erl b/lib/kernel/src/net_adm.erl
index a38356c224..8ec275b88b 100644
--- a/lib/kernel/src/net_adm.erl
+++ b/lib/kernel/src/net_adm.erl
@@ -96,7 +96,8 @@ names() ->
Reason :: address | file:posix().
names(Hostname) ->
- erl_epmd:names(Hostname).
+ ErlEpmd = net_kernel:epmd_module(),
+ ErlEpmd:names(Hostname).
-spec dns_hostname(Host) -> {ok, Name} | {error, Host} when
Host :: atom() | string(),
diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl
index 548b27db97..e63ed34973 100644
--- a/lib/kernel/test/heart_SUITE.erl
+++ b/lib/kernel/test/heart_SUITE.erl
@@ -29,11 +29,11 @@
set_cmd/1, clear_cmd/1, get_cmd/1,
callback_api/1,
options_api/1,
- dont_drop/1, kill_pid/1]).
+ dont_drop/1, kill_pid/1, heart_no_kill/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
--export([start_heart_stress/1, mangle/1, suicide_by_heart/0]).
+-export([start_heart_stress/1, mangle/1, suicide_by_heart/0, non_suicide_by_heart/0]).
-define(DEFAULT_TIMEOUT_SECS, 120).
@@ -491,6 +491,30 @@ do_kill_pid(_Config) ->
false
end.
+
+heart_no_kill(suite) ->
+ [];
+heart_no_kill(doc) ->
+ ["Tests that heart doesn't kill the old erlang node when ",
+ "HEART_NO_KILL is set."];
+heart_no_kill(Config) when is_list(Config) ->
+ ok = do_no_kill(Config).
+
+do_no_kill(_Config) ->
+ Name = heart_test,
+ {ok,Node} = start_node_run(Name,[],non_suicide_by_heart,[]),
+ io:format("Node is ~p~n", [Node]),
+ ok = wait_for_node(Node,15),
+ io:format("wait_for_node is ~p~n", [ok]),
+ erlang:monitor_node(Node, true),
+ receive {nodedown,Node} -> false
+ after 30000 ->
+ io:format("Node didn't die..\n"),
+ rpc:call(Node,init,stop,[]),
+ io:format("done init:stop..\n"),
+ ok
+ end.
+
wait_for_node(_,0) ->
false;
wait_for_node(Node,N) ->
@@ -609,6 +633,18 @@ suicide_by_heart() ->
sallad
end.
+non_suicide_by_heart() ->
+ P = open_port({spawn,"heart -ht 11 -pid "++os:getpid()},[exit_status, {env, {"HEART_NO_KILL", "TRUE"}}, {packet,2}]),
+ receive X -> X end,
+ %% Just hang and wait for heart to timeout
+ receive
+ {P,{exit_status,_}} ->
+ ok
+ after
+ 20000 ->
+ exit(timeout)
+ end.
+
%% generate a module from binary
generate(Module, Attributes, FunStrings) ->
diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl
index c93b10fa1c..f60c13d2e3 100644
--- a/lib/kernel/test/inet_SUITE.erl
+++ b/lib/kernel/test/inet_SUITE.erl
@@ -139,11 +139,13 @@ t_gethostbyaddr(Config) when is_list(Config) ->
ok;
_ ->
io:format("alias list: ~p", [HEnt#hostent.h_aliases]),
- io:format("check alias list: ~p", [[Aliases,[Rname]]]),
+ io:format(
+ "check alias list: ~p", [[Aliases,tl(Aliases),[Rname]]]),
io:format("name: ~p", [HEnt#hostent.h_name]),
io:format("check name: ~p", [[Name,FullName]]),
- check_elems([{HEnt#hostent.h_name,[Name,FullName]},
- {HEnt#hostent.h_aliases,[[],Aliases,[Rname]]}])
+ check_elems(
+ [{HEnt#hostent.h_name,[Name,FullName]},
+ {HEnt#hostent.h_aliases,[[],Aliases,tl(Aliases),[Rname]]}])
end,
{_DName, _DFullName, DIPStr, DIP, _, _, _} = ct:get_config(test_dummy_host),
@@ -171,8 +173,9 @@ t_gethostbyaddr_v6(Config) when is_list(Config) ->
h_length = 16,
h_addr_list = [IP6]},
HEnt6_ = HEnt6,
- check_elems([{HEnt6#hostent.h_name,[Name6,FullName6]},
- {HEnt6#hostent.h_aliases,[[],Aliases6]}]),
+ check_elems(
+ [{HEnt6#hostent.h_name,[Name6,FullName6]},
+ {HEnt6#hostent.h_aliases,[[],Aliases6,tl(Aliases6)]}]),
{_DName6, _DFullName6, DIPStr6, DIP6, _} =
ct:get_config(test_dummy_ipv6_host),
@@ -195,14 +198,14 @@ t_gethostbyname(Config) when is_list(Config) ->
HEnt_ = HEnt,
check_elems([{HEnt#hostent.h_name,[Name,FullName]},
- {HEnt#hostent.h_aliases,[[],Aliases]}]),
+ {HEnt#hostent.h_aliases,[[],Aliases,tl(Aliases)]}]),
{ok,HEntF} = inet:gethostbyname(FullName),
HEntF_ = HEntF#hostent{h_name = FullName,
h_addrtype = inet,
h_length = 4,
h_addr_list = [IP]},
HEntF_ = HEntF,
- check_elems([{HEnt#hostent.h_aliases,[[],Aliases]}]),
+ check_elems([{HEnt#hostent.h_aliases,[[],Aliases,tl(Aliases)]}]),
%%
FullNameU = toupper(FullName),
{ok,HEntU} = inet:gethostbyname(FullNameU),
@@ -237,7 +240,7 @@ t_gethostbyname_v6(Config) when is_list(Config) ->
h_length = 16} = HEnt,
check_elems(
[{HEnt#hostent.h_name,[Name,FullName]},
- {HEnt#hostent.h_aliases,[[],Aliases]}]);
+ {HEnt#hostent.h_aliases,[[],Aliases,tl(Aliases)]}]);
[IP46] -> % IPv4 compatible address
{ok,HEnt4} = inet:gethostbyname(Name, inet),
#hostent{h_addrtype = inet,
@@ -257,7 +260,7 @@ t_gethostbyname_v6(Config) when is_list(Config) ->
h_addrtype = inet6,
h_length = 16} = HEntF,
check_elems(
- [{HEnt#hostent.h_aliases,[[],Aliases]}]);
+ [{HEnt#hostent.h_aliases,[[],Aliases,tl(Aliases)]}]);
[IP46F] -> % IPv4 compatible address
{ok,HEnt4F} = inet:gethostbyname(FullName, inet),
#hostent{h_addrtype = inet,
@@ -363,7 +366,7 @@ ipv4_to_ipv6(Config) when is_list(Config) ->
h_addr_list = [IP_46]},
HEnt_ = HEnt,
check_elems([{HEnt#hostent.h_name,[IP_46_Str,IPStr]},
- {HEnt#hostent.h_aliases,[[],Aliases]}]);
+ {HEnt#hostent.h_aliases,[[],Aliases,tl(Aliases)]}]);
{_,IP4to6Res} -> ok
end,
ok.
@@ -1002,12 +1005,12 @@ getifaddrs(Config) when is_list (Config) ->
[check_addr(Addr) || Addr <- Addrs],
ok.
-check_addr(Addr)
+check_addr({addr,Addr})
when tuple_size(Addr) =:= 8,
element(1, Addr) band 16#FFC0 =:= 16#FE80 ->
io:format("Addr: ~p link local; SKIPPED!~n", [Addr]),
ok;
-check_addr(Addr) ->
+check_addr({addr,Addr}) ->
io:format("Addr: ~p.~n", [Addr]),
Ping = "ping",
Pong = "pong",
@@ -1021,74 +1024,82 @@ check_addr(Addr) ->
ok = gen_tcp:close(S1),
{ok,Pong} = gen_tcp:recv(S2, length(Pong)),
ok = gen_tcp:close(S2),
- ok = gen_tcp:close(L),
- ok.
+ ok = gen_tcp:close(L).
-record(ifopts, {name,flags,addrs=[],hwaddr}).
ifaddrs([]) -> [];
ifaddrs([{If,Opts}|IOs]) ->
- #ifopts{flags=Flags} = Ifopts =
- check_ifopts(Opts, #ifopts{name=If}),
- case Flags =/= undefined andalso lists:member(up, Flags) of
- true ->
- Ifopts#ifopts.addrs;
- false ->
- []
- end++ifaddrs(IOs).
+ #ifopts{flags=F} = Ifopts = check_ifopts(Opts, #ifopts{name=If}),
+ case F of
+ {flags,Flags} ->
+ case lists:member(up, Flags) of
+ true ->
+ Ifopts#ifopts.addrs;
+ false ->
+ []
+ end ++ ifaddrs(IOs);
+ undefined ->
+ ifaddrs(IOs)
+ end.
-check_ifopts([], #ifopts{name=If,flags=Flags,addrs=Raddrs}=Ifopts) ->
+check_ifopts([], #ifopts{flags=F,addrs=Raddrs}=Ifopts) ->
Addrs = lists:reverse(Raddrs),
R = Ifopts#ifopts{addrs=Addrs},
io:format("~p.~n", [R]),
%% See how we did...
- if is_list(Flags) -> ok;
- true ->
- ct:fail({flags_undefined,If})
- end,
+ {flags,Flags} = F,
case lists:member(broadcast, Flags) of
true ->
[case A of
- {_,_,_} -> A;
- {T,_} when tuple_size(T) =:= 8 -> A;
- _ ->
- ct:fail({broaddr_missing,If,A})
+ {{addr,_},{netmask,_},{broadaddr,_}} ->
+ A;
+ {{addr,T},{netmask,_}} when tuple_size(T) =:= 8 ->
+ A
end || A <- Addrs];
false ->
- [case A of {_,_} -> A;
- _ ->
- ct:fail({should_have_netmask,If,A})
- end || A <- Addrs]
+ case lists:member(pointtopoint, Flags) of
+ true ->
+ [case A of
+ {{addr,_},{netmask,_},{dstaddr,_}} ->
+ A
+ end || A <- Addrs];
+ false ->
+ [case A of
+ {{addr,_},{netmask,_}} ->
+ A
+ end || A <- Addrs]
+ end
end,
R;
-check_ifopts([{flags,Flags}|Opts], #ifopts{flags=undefined}=Ifopts) ->
- check_ifopts(Opts, Ifopts#ifopts{flags=Flags});
-check_ifopts([{flags,Fs}|Opts], #ifopts{flags=Flags}=Ifopts) ->
- case Fs of
+check_ifopts([{flags,_}=F|Opts], #ifopts{flags=undefined}=Ifopts) ->
+ check_ifopts(Opts, Ifopts#ifopts{flags=F});
+check_ifopts([{flags,_}=F|Opts], #ifopts{flags=Flags}=Ifopts) ->
+ case F of
Flags ->
- check_ifopts(Opts, Ifopts#ifopts{});
+ check_ifopts(Opts, Ifopts);
_ ->
- ct:fail({multiple_flags,Fs,Ifopts})
+ ct:fail({multiple_flags,F,Ifopts})
end;
check_ifopts(
- [{addr,Addr},{netmask,Netmask},{broadaddr,Broadaddr}|Opts],
+ [{addr,_}=A,{netmask,_}=N,{dstaddr,_}=D|Opts],
#ifopts{addrs=Addrs}=Ifopts) ->
- check_ifopts(Opts, Ifopts#ifopts{addrs=[{Addr,Netmask,Broadaddr}|Addrs]});
+ check_ifopts(Opts, Ifopts#ifopts{addrs=[{A,N,D}|Addrs]});
check_ifopts(
- [{addr,Addr},{netmask,Netmask},{dstaddr,_}|Opts],
+ [{addr,_}=A,{netmask,_}=N,{broadaddr,_}=B|Opts],
#ifopts{addrs=Addrs}=Ifopts) ->
- check_ifopts(Opts, Ifopts#ifopts{addrs=[{Addr,Netmask}|Addrs]});
+ check_ifopts(Opts, Ifopts#ifopts{addrs=[{A,N,B}|Addrs]});
check_ifopts(
- [{addr,Addr},{netmask,Netmask}|Opts],
+ [{addr,_}=A,{netmask,_}=N|Opts],
#ifopts{addrs=Addrs}=Ifopts) ->
- check_ifopts(Opts, Ifopts#ifopts{addrs=[{Addr,Netmask}|Addrs]});
-check_ifopts([{addr,Addr}|Opts], #ifopts{addrs=Addrs}=Ifopts) ->
- check_ifopts(Opts, Ifopts#ifopts{addrs=[{Addr}|Addrs]});
-check_ifopts([{hwaddr,Hwaddr}|Opts], #ifopts{hwaddr=undefined}=Ifopts)
+ check_ifopts(Opts, Ifopts#ifopts{addrs=[{A,N}|Addrs]});
+check_ifopts([{addr,_}=A|Opts], #ifopts{addrs=Addrs}=Ifopts) ->
+ check_ifopts(Opts, Ifopts#ifopts{addrs=[{A}|Addrs]});
+check_ifopts([{hwaddr,Hwaddr}=H|Opts], #ifopts{hwaddr=undefined}=Ifopts)
when is_list(Hwaddr) ->
- check_ifopts(Opts, Ifopts#ifopts{hwaddr=Hwaddr});
-check_ifopts([{hwaddr,HwAddr}|_], #ifopts{}=Ifopts) ->
- ct:fail({multiple_hwaddrs,HwAddr,Ifopts}).
+ check_ifopts(Opts, Ifopts#ifopts{hwaddr=H});
+check_ifopts([{hwaddr,_}=H|_], #ifopts{}=Ifopts) ->
+ ct:fail({multiple_hwaddrs,H,Ifopts}).
%% Works just like lists:member/2, except that any {127,_,_,_} tuple
%% matches any other {127,_,_,_}. We do this to handle Linux systems
diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl
index 9662d1fef5..6691ad9c06 100644
--- a/lib/kernel/test/inet_res_SUITE.erl
+++ b/lib/kernel/test/inet_res_SUITE.erl
@@ -42,6 +42,21 @@
-define(RUN_NAMED, "run-named").
+%% This test suite use a script ?RUN_NAMED that tries to start
+%% a temporary local nameserver BIND 8 or 9 that must be installed
+%% on your machine.
+%%
+%% For example, on Ubuntu 14.04, as root:
+%% apt-get install bind9
+%% Now, that is not enough since Apparmor will not allow
+%% the nameserver daemon /usr/sbin/named to read from the test directory.
+%% Assuming that you run tests in /ldisk/daily_build, and still on
+%% Ubuntu 14.04, make /usr/apparmor.d/local/usr.sbin.named contain:
+%% /ldisk/daily_build/** r,
+%% And yes; the trailing comma must be there...
+
+
+
suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap,{minutes,1}}].
diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl
index e7b44a714c..a332e7966b 100644
--- a/lib/kernel/test/init_SUITE.erl
+++ b/lib/kernel/test/init_SUITE.erl
@@ -27,7 +27,7 @@
-export([get_arguments/1, get_argument/1, boot_var/1, restart/1,
many_restarts/0, many_restarts/1,
get_plain_arguments/1,
- reboot/1, stop/1, get_status/1, script_id/1]).
+ reboot/1, stop_status/1, stop/1, get_status/1, script_id/1]).
-export([boot1/1, boot2/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -48,7 +48,7 @@ suite() ->
all() ->
[get_arguments, get_argument, boot_var,
many_restarts,
- get_plain_arguments, restart, get_status, script_id,
+ get_plain_arguments, restart, stop_status, get_status, script_id,
{group, boot}].
groups() ->
@@ -465,6 +465,20 @@ reboot(Config) when is_list(Config) ->
%% ------------------------------------------------
%%
%% ------------------------------------------------
+stop_status(Config) when is_list(Config) ->
+ badarg = catch_stop([65,[66],67]), % flat strings only
+ badarg = catch_stop([65, 666, 67]), % only bytes in string
+ badarg = catch_stop(abort), % 'abort' not allowed
+ badarg = catch_stop(true), % other atoms not allowed
+ badarg = catch_stop(-1), % no negative statuses
+ ok.
+
+catch_stop(Status) ->
+ try init:stop(Status) catch error:badarg -> badarg end.
+
+%% ------------------------------------------------
+%%
+%% ------------------------------------------------
stop(Config) when is_list(Config) ->
Args = args(),
{ok, Node} = start_node(init_test, Args),
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index cc7f2f6713..8be94f1e57 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -1023,7 +1023,7 @@ file_write_file_info_opts(Config) when is_list(Config) ->
Time <- [ 0,1,-1,100,-100,1000,-1000,10000,-10000 ]
]),
- %% REM: determine date range dependent on time_t = Uint32 | Sint32 | Sint64
+ %% REM: determine date range dependent on time_t = Uint32 | Sint32 | Sint64 | Uint64
%% Determine time_t on os:type()?
lists:foreach(fun ({FI, Opts}) ->
ok = ?PRIM_FILE_call(write_file_info, Handle, [Name, FI, Opts])
@@ -1072,9 +1072,10 @@ file_write_read_file_info_opts(Config) when is_list(Config) ->
%ok = file_write_read_file_info_opts(Handle, Name, {{1930, 04, 28}, {19,30,22}}, [{time, local}]),
%ok = file_write_read_file_info_opts(Handle, Name, {{1930, 04, 28}, {19,30,22}}, [{time, universal}]),
ok = file_write_read_file_info_opts(Handle, Name, 1, [{time, posix}]),
- ok = file_write_read_file_info_opts(Handle, Name, -1, [{time, posix}]),
+ %% will not work on platforms with unsigned time_t
+ %ok = file_write_read_file_info_opts(Handle, Name, -1, [{time, posix}]),
+ %ok = file_write_read_file_info_opts(Handle, Name, -300000, [{time, posix}]),
ok = file_write_read_file_info_opts(Handle, Name, 300000, [{time, posix}]),
- ok = file_write_read_file_info_opts(Handle, Name, -300000, [{time, posix}]),
ok = file_write_read_file_info_opts(Handle, Name, 0, [{time, posix}]),
ok = ?PRIM_FILE:stop(Handle),
diff --git a/lib/megaco/src/app/megaco.appup.src b/lib/megaco/src/app/megaco.appup.src
index 93bf1d980c..46da79cfe3 100644
--- a/lib/megaco/src/app/megaco.appup.src
+++ b/lib/megaco/src/app/megaco.appup.src
@@ -192,34 +192,11 @@
{"%VSN%",
[
- {"3.17.3", [{restart_application,megaco}]},
- {"3.17.2", []},
- {"3.17.1", [{restart_application,megaco}]},
- {"3.17.0.3", [{restart_application,megaco}]},
- {"3.17.0.2", []},
- {"3.17.0.1", []},
- {"3.17", []},
- {"3.16.0.3",
- [
- {update, megaco_flex_scanner_handler, {advanced, upgrade_from_pre_3_17},
- soft_purge, soft_purge, []}
- ]
- }
+ {<<"3\\..*">>, [{restart_application, megaco}]}
],
+
[
- {"3.17.3", [{restart_application,megaco}]},
- {"3.17.2", []},
- {"3.17.1", [{restart_application,megaco}]},
- {"3.17.0.3", [{restart_application,megaco}]},
- {"3.17.0.2", []},
- {"3.17.0.1", []},
- {"3.17", []},
- {"3.16.0.3",
- [
- {update, megaco_flex_scanner_handler, {advanced, downgrade_to_pre_3_17},
- soft_purge, soft_purge, []}
- ]
- }
+ {<<"3\\..*">>, [{restart_application, megaco}]}
]
}.
diff --git a/lib/mnesia/src/mnesia_index.erl b/lib/mnesia/src/mnesia_index.erl
index 73d170d1fa..c79f790973 100644
--- a/lib/mnesia/src/mnesia_index.erl
+++ b/lib/mnesia/src/mnesia_index.erl
@@ -513,11 +513,11 @@ db_put({dets, Ixt}, V) ->
ok = dets:insert(Ixt, V).
db_get({ram, _}=Ixt, IxKey) ->
- Pat = [{{{IxKey, '$1'}}, [], [{{IxKey,'$1'}}]}],
+ Pat = [{{{IxKey, '$1'}}, [], [{element, 1, '$_'}]}],
db_select(Ixt, Pat);
db_get({{ext,_,_} = _Storage, {_,_,{_,Type}}} = Ixt, IxKey) ->
Pat = case Type of
- ordered -> [{{{IxKey, '$1'}}, [], [{{IxKey,'$1'}}]}];
+ ordered -> [{{{IxKey, '$1'}}, [], [{element, 1, '$_'}]}];
bag -> [{{IxKey, '_'}, [], ['$_']}]
end,
db_select(Ixt, Pat);
diff --git a/lib/mnesia/test/mnesia_dirty_access_test.erl b/lib/mnesia/test/mnesia_dirty_access_test.erl
index c9df8ed353..6d970ac990 100644
--- a/lib/mnesia/test/mnesia_dirty_access_test.erl
+++ b/lib/mnesia/test/mnesia_dirty_access_test.erl
@@ -461,77 +461,81 @@ dirty_index_update_set_xets(Config) when is_list(Config) ->
dirty_index_update_set(Config, ext_ets).
dirty_index_update_set(Config, Storage) ->
- [Node1] = Nodes = ?acquire_nodes(1, Config),
- Tab = index_test,
- ValPos = v1,
+ [Node1] = Nodes = ?acquire_nodes(1, Config),
+ Tab = index_test,
+ ValPos = v1,
ValPos2 = v3,
Def = [{attributes, [k, v1, v2, v3]},
{Storage, [Node1]},
- {index, [ValPos]}],
- ?match({atomic, ok}, mnesia:create_table(Tab, Def)),
-
+ {index, [ValPos]}],
+ ?match({atomic, ok}, mnesia:create_table(Tab, Def)),
+
Pat1 = {Tab, '$1', 2, '$2', '$3'},
- Pat2 = {Tab, '$1', '$2', '$3', '$4'},
-
- Rec1 = {Tab, 1, 2, 3, 4},
+ Pat2 = {Tab, '$1', '$2', '$3', '$4'},
+ Pat3 = {Tab, '_', '_', '_', {4, 14}},
+
+ Rec1 = {Tab, 1, 2, 3, {4, 14}},
Rec2 = {Tab, 2, 2, 13, 14},
- Rec3 = {Tab, 1, 12, 13, 14},
- Rec4 = {Tab, 4, 2, 13, 14},
-
+ Rec3 = {Tab, 1, 12, 13, 14},
+ Rec4 = {Tab, 4, 2, 13, 14},
+
?match([], mnesia:dirty_index_read(Tab, 2, ValPos)),
?match(ok, mnesia:dirty_write(Rec1)),
?match([Rec1], mnesia:dirty_index_read(Tab, 2, ValPos)),
-
+
?match(ok, mnesia:dirty_write(Rec2)),
R1 = mnesia:dirty_index_read(Tab, 2, ValPos),
?match([Rec1, Rec2], lists:sort(R1)),
-
+
?match(ok, mnesia:dirty_write(Rec3)),
R2 = mnesia:dirty_index_read(Tab, 2, ValPos),
?match([Rec2], lists:sort(R2)),
?match([Rec2], mnesia:dirty_index_match_object(Pat1, ValPos)),
-
- {atomic, R3} = mnesia:transaction(fun() -> mnesia:match_object(Pat2) end),
+
+ {atomic, R3} = mnesia:transaction(fun() -> mnesia:match_object(Pat2) end),
?match([Rec3, Rec2], lists:sort(R3)),
-
+
?match(ok, mnesia:dirty_write(Rec4)),
R4 = mnesia:dirty_index_read(Tab, 2, ValPos),
?match([Rec2, Rec4], lists:sort(R4)),
-
+
?match(ok, mnesia:dirty_delete({Tab, 4})),
?match([Rec2], mnesia:dirty_index_read(Tab, 2, ValPos)),
-
+
?match({atomic, ok}, mnesia:del_table_index(Tab, ValPos)),
?match({atomic, ok}, mnesia:transaction(fun() -> mnesia:write(Rec4) end)),
?match({atomic, ok}, mnesia:add_table_index(Tab, ValPos)),
?match({atomic, ok}, mnesia:add_table_index(Tab, ValPos2)),
-
+
R5 = mnesia:dirty_match_object(Pat2),
?match([Rec3, Rec2, Rec4], lists:sort(R5)),
-
+
R6 = mnesia:dirty_index_read(Tab, 2, ValPos),
- ?match([Rec2, Rec4], lists:sort(R6)),
- ?match([], mnesia:dirty_index_read(Tab, 4, ValPos2)),
+ ?match([Rec2, Rec4], lists:sort(R6)),
+ ?match([], mnesia:dirty_index_read(Tab, {4,14}, ValPos2)),
R7 = mnesia:dirty_index_read(Tab, 14, ValPos2),
?match([Rec3, Rec2, Rec4], lists:sort(R7)),
?match({atomic, ok}, mnesia:transaction(fun() -> mnesia:write(Rec1) end)),
R8 = mnesia:dirty_index_read(Tab, 2, ValPos),
?match([Rec1, Rec2, Rec4], lists:sort(R8)),
- ?match([Rec1], mnesia:dirty_index_read(Tab, 4, ValPos2)),
+ ?match([Rec1], mnesia:dirty_index_read(Tab, {4,14}, ValPos2)),
+ ?match([Rec1], mnesia:dirty_match_object(Pat3)),
+ ?match([Rec1], mnesia:dirty_index_match_object(Pat3, ValPos2)),
+
R9 = mnesia:dirty_index_read(Tab, 14, ValPos2),
?match([Rec2, Rec4], lists:sort(R9)),
?match({atomic, ok}, mnesia:transaction(fun() -> mnesia:delete_object(Rec2) end)),
R10 = mnesia:dirty_index_read(Tab, 2, ValPos),
?match([Rec1, Rec4], lists:sort(R10)),
- ?match([Rec1], mnesia:dirty_index_read(Tab, 4, ValPos2)),
+ ?match([Rec1], mnesia:dirty_index_read(Tab, {4,14}, ValPos2)),
?match([Rec4], mnesia:dirty_index_read(Tab, 14, ValPos2)),
?match(ok, mnesia:dirty_delete({Tab, 4})),
R11 = mnesia:dirty_index_read(Tab, 2, ValPos),
?match([Rec1], lists:sort(R11)),
- ?match([Rec1], mnesia:dirty_index_read(Tab, 4, ValPos2)),
+ ?match([Rec1], mnesia:dirty_index_read(Tab, {4,14}, ValPos2)),
?match([], mnesia:dirty_index_read(Tab, 14, ValPos2)),
?verify_mnesia(Nodes, []).
diff --git a/lib/observer/doc/src/observer_ug.xml b/lib/observer/doc/src/observer_ug.xml
index ca354df864..6eb72f3e58 100644
--- a/lib/observer/doc/src/observer_ug.xml
+++ b/lib/observer/doc/src/observer_ug.xml
@@ -168,7 +168,7 @@
<item><p>The length of the message queue for the process.</p></item>
</taglist>
- <p>Option <em>Process info</em> opens a detailed information window on the selected process,
+ <p>Option <em>Process info</em> opens a detailed information window on the process under the mouse pointer,
including the following:</p>
<taglist>
<tag>Process Information</tag>
@@ -195,12 +195,53 @@
</p>
</note>
- <p>Option <em>Trace Processes</em> adds the selected process identifiers to tab
+ <p>Option <em>Trace selected processes</em> adds the selected process identifiers to tab
<em>Trace Overview</em> plus the node that the processes reside on.
</p>
- <p>Option <em>Trace Named Processes</em> adds the registered name of the processes. This can be
+ <p>Option <em>Trace selected processes by name</em> adds the registered name of the processes. This can be
useful when tracing is done on many nodes, as processes with that name are then traced on
all traced nodes.</p>
+ <p>Option <em>Kill process</em> brutally kills the processes under
+ the mouse pointer by sending an exit signal with
+ reason <c>kill</c>.</p>
+
+ </section>
+
+ <section>
+ <title>Ports Tab</title>
+ <p>Tab <em>Ports</em> lists port information in columns.
+ For each port the following information is displayed:
+ </p>
+ <taglist>
+ <tag>Id</tag>
+ <item><p>The port identifier.</p></item>
+ <tag>Connected</tag>
+ <item><p>The process identifier for the process that owns the
+ port.</p></item>
+ <tag>Name</tag>
+ <item><p>The registered name of the port, if any.</p></item>
+ <tag>Controls</tag>
+ <item><p>The name of the command set by <seealso marker="erts:erlang#open_port-2"><c>erlang:open_port/2</c></seealso>.</p></item>
+ <tag>Slot</tag>
+ <item><p>The internal index of the port.</p></item>
+ </taglist>
+
+ <p>Option <em>Port info</em> opens a detailed information window
+ for the port under the mouse pointer. In addition to the
+ information above, it also shows links and monitors.</p>
+
+ <p>Option <em>Trace selected ports</em> adds the selected port
+ identifiers, and the nodes that the ports reside on,
+ to tab <em>Trace Overview</em>.</p>
+
+ <p>Option <em>Trace selected ports by name</em> adds the
+ registered name of the port to tab <em>Trace Overview</em>. This
+ can be useful when tracing is done on many nodes, as ports with
+ that name are then traced on all traced nodes.</p>
+
+ <p>Option <em>Close</em>
+ executes <seealso marker="erts:erlang#port_close-1"><c>erlang:port_close/1</c></seealso>
+ on the port under the mouse pointer.</p>
</section>
@@ -211,8 +252,11 @@
applications are not diplayed. Use menu <em>View</em> to view "system"
ETS tables, unreadable ETS tables, or Mnesia tables.
</p>
- <p>Double-click to view the table content. To view table information, select the table
- and activate menu <em>View &gt; Table information</em>.</p>
+ <p>Double-click to view the table content, or right-click and
+ select option <em>Show Table Content</em>. To view table
+ information, select the table and activate menu <em>View &gt;
+ Table information</em>, or right-click and select option <em>Table
+ info</em>.</p>
<p>You can use <seealso marker="stdlib:re">regular
expressions</seealso> and search for objects, and edit or delete them.
</p>
@@ -220,11 +264,12 @@
<section>
<title>Trace Overview Tab</title>
- <p>Tab <em>Trace Overview</em> handles tracing. Trace
- by selecting the processes to be traced and how to trace
- them. You can trace messages, function calls, and events, where
- events are process-related events such as <c>spawn</c>,
- <c>exit</c>, and many others.
+ <p>Tab <em>Trace Overview</em> handles tracing. Trace by selecting
+ the processes or ports to be traced and how to trace them. For
+ processes, you can trace messages, function calls, scheduling,
+ garbage collections, and process-related events such
+ as <c>spawn</c>, <c>exit</c>, and many others. For ports, you can
+ trace messages, scheduling and port-related events.
</p>
<p>To trace function calls, you also need to set up
@@ -234,27 +279,51 @@
specifications can also be used to trigger more information
in the trace messages.
</p>
- <note><p>Trace patterns only apply to the traced processes.</p></note>
+
+ <p>You can also set match specifications on messages. By default,
+ if tracing messages, all messages sent and/or received by the
+ process or port are traced. Match specifications can be used to
+ reduce the number of traced messages and/or to trigger more
+ information in the trace messages.</p>
+
+ <note><p>Trace patterns only apply to the traced processes and
+ ports.</p></note>
<p>
- Processes are added from the <em>Applications</em> or <em>Processes</em> tabs.
- A special <em>new</em> identifier, meaning all processes spawned after trace
- start, can be added with button <em>Add 'new' Process</em>.
+ Processes are added from the <em>Applications</em>
+ or <em>Processes</em> tabs. Ports are added from
+ the <em>Ports</em> tab. A special <em>new</em> identifier,
+ meaning all processes, or ports, started after trace start, can
+ be added with buttons <em>Add 'new' Processes</em> and <em>Add
+ 'new' Ports</em>, respecively.
</p>
<p>
- When adding processes, a window with trace options is displayed. The chosen
- options are set for the selected processes.
- Process options can be changed by right-clicking a process.
+ When adding processes or ports, a window with trace options is
+ displayed. The chosen options are set for the selected
+ processes/ports. To change the options, right-click the process
+ or port and select <em>Edit process options</em>. To remove a
+ process or port from the list, right-click and select <em>Remove
+ process</em> or <em>Remove port</em>, respectively.
</p>
<p>
- Processes added by process identifiers add the nodes these
- processes reside on in the node list. More nodes can be added by clicking
- button <em>Add Nodes</em>.
+ Processes and ports added by process/port identifiers add the
+ nodes these processes/ports reside on in the node list. More
+ nodes can be added by clicking button <em>Add Nodes</em>, or by
+ right-clicking in the <em>Nodes</em> list and select <em>Add
+ Nodes</em>. To remove nodes, select them, then right-click and
+ choose <em>Remove nodes</em>.
</p>
<p>
If function calls are traced, trace patterns must be added by clicking button
<em>Add Trace Pattern</em>. Select a module, function(s), and a match specification.
- If no functions are selected, all functions in the module are traced.
+ If no functions are selected, all functions in the module are traced.</p>
+ <p>
+ Trace patterns can also be added for traced messages. Click
+ button <em>Add Trace Pattern</em> and select <em>Messages
+ sent</em> or <em>Messages received</em>, and a match
+ specification.
+ </p>
+ <p>
A few basic match specifications are provided in the tool, and
you can provide your own match specifications. The syntax of match
specifications is described in the <seealso
diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml
index 2b637551db..94ecef24b4 100644
--- a/lib/observer/doc/src/ttb.xml
+++ b/lib/observer/doc/src/ttb.xml
@@ -229,27 +229,33 @@ ttb:p(all, call).</input></pre>
</func>
<func>
- <name>p(Procs,Flags) -> Return</name>
- <fsummary>Set the specified trace flags on the specified processes.</fsummary>
+ <name>p(Item,Flags) -> Return</name>
+ <fsummary>Set the specified trace flags on the specified processes or ports.</fsummary>
<type>
- <v>Return = {ok,[{Procs,MatchDesc}]}</v>
- <v>Procs = Process | [Process] | all | new | existing</v>
- <v>Process = pid() | atom() | {global,atom()}</v>
+ <v>Return = {ok,[{Item,MatchDesc}]}</v>
+ <v>Items = Item | [Item]</v>
+ <v>Item = pid() | port() | RegName | {global,GlobalRegName} |
+ all | processes | ports |
+ existing | existing_processes | existing_ports |
+ new | new_processes | new_ports</v>
+ <v>RegName = atom()</v>
+ <v>GlobalRegName = term()</v>
<v>Flags = Flag | [Flag]</v>
</type>
<desc>
- <p>Sets the specified trace flags on the specified
- processes. Flag <c>timestamp</c> is always turned on.
+ <p>Sets the specified trace flags on the specified processes
+ or ports. Flag <c>timestamp</c> is always turned on.
</p>
<p>See the Reference Manual for module
<seealso marker="runtime_tools:dbg"><c>dbg</c></seealso>
- and the possible trace flags. Parameter
+ for the possible trace flags. Parameter
<c>MatchDesc</c> is the same as returned from
<c>dbg:p/2</c>.</p>
<p>Processes can be specified as registered names, globally
- registered names, or process identifiers. If a registered name
- is specified, the flags are set on processes with this name on all
- active nodes.</p>
+ registered names, or process identifiers. Ports can be
+ specified as registered names or port identifiers. If a
+ registered name is specified, the flags are set on
+ processes/ports with this name on all active nodes.</p>
<p>Issuing this command starts the timer for this trace if option
<c>timer</c> is specified with <c>tracer/2</c>.
</p>
@@ -257,17 +263,23 @@ ttb:p(all, call).</input></pre>
</func>
<func>
- <name>tp, tpl, ctp, ctpl, ctpg</name>
+ <name>tp, tpl, tpe, ctp, ctpl, ctpg, ctpe</name>
<fsummary>Set and clear trace patterns.</fsummary>
<desc>
- <p>These functions are to be used with
- trace flag <c>call</c> for setting and clearing trace
- patterns. When trace flag <c>call</c> is set on a process,
+ <p>These functions are to be used with trace
+ flag <c>call</c>, <c>send</c>, and <c>'receive'</c> for
+ setting and clearing trace patterns.</p>
+ <p>When trace flag <c>call</c> is set on a process,
function calls are traced on that process if a trace
- pattern is set for the called function. Trace patterns
- specify how to trace a function by using match
- specifications. Match specifications are described in the
- <seealso marker="erts:users_guide"><c>ERTS User's Guide</c></seealso>.
+ pattern is set for the called function.</p>
+ <p>The <c>send</c> and <c>'receive'</c> flags enable tracing
+ of all messages sent and received by the process/port. Trace
+ patterns set with <c>tpe</c> may limit traced messages based
+ on the message content, the sender, and/or the receiver.</p>
+ <p>Trace patterns specify how to trace a function or a message
+ by using match specifications. Match specifications are
+ described in the
+ <seealso marker="erts:match_spec"><c>ERTS User's Guide</c></seealso>.
</p>
<p>These functions are equivalent to the corresponding
functions in module
@@ -284,6 +296,8 @@ ttb:p(all, call).</input></pre>
<item><p>Sets trace patterns on global function calls.</p></item>
<tag><c>tpl</c></tag>
<item><p>Sets trace patterns on local and global function calls.</p></item>
+ <tag><c>tpe</c></tag>
+ <item><p>Sets trace patterns on messages.</p></item>
<tag><c>ctp</c></tag>
<item><p>Clears trace patterns on local and global function
calls.</p></item>
@@ -291,13 +305,15 @@ ttb:p(all, call).</input></pre>
<item><p>Clears trace patterns on local function calls.</p></item>
<tag><c>ctpg</c></tag>
<item><p>Clears trace patterns on global function calls.</p></item>
+ <tag><c>ctpe</c></tag>
+ <item><p>Clears trace patterns on messages.</p></item>
</taglist>
<p>With <c>tp</c> and <c>tpl</c>, one of the match specification shortcuts
can be used (for example, <c>ttb:tp(foo_module, caller)</c>).</p>
<p>The shortcuts are as follows:</p>
<list type="bulleted">
<item><c>return</c> - for <c>[{'_',[],[{return_trace}]}]</c>
- (report the return value)</item>
+ (report the return value from a traced function)</item>
<item><c>caller</c> - for <c>[{'_',[],[{message,{caller}}]}]</c>
(report the calling function)</item>
<item><c>{codestr, Str}</c> - for <c>dbg:fun2ms/1</c> arguments
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
index 85dc5933c1..dd7831fa2b 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
@@ -67,6 +67,7 @@ MODULES= \
observer_html_lib \
observer_lib \
observer_perf_wx \
+ observer_port_wx \
observer_pro_wx \
observer_procinfo \
observer_sys_wx \
diff --git a/lib/observer/src/crashdump_viewer.erl b/lib/observer/src/crashdump_viewer.erl
index de52e2a995..9268dac180 100644
--- a/lib/observer/src/crashdump_viewer.erl
+++ b/lib/observer/src/crashdump_viewer.erl
@@ -1491,6 +1491,9 @@ get_portinfo(Fd,Port) ->
"Port controls linked-in driver" ->
Str = lists:flatten(["Linked in driver: " | val(Fd)]),
get_portinfo(Fd,Port#port{controls=Str});
+ "Port controls forker process" ->
+ Str = lists:flatten(["Forker process: " | val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port controls external process" ->
Str = lists:flatten(["External proc: " | val(Fd)]),
get_portinfo(Fd,Port#port{controls=Str});
diff --git a/lib/observer/src/observer.app.src b/lib/observer/src/observer.app.src
index 5ddf65fa59..3a5bd172e7 100644
--- a/lib/observer/src/observer.app.src
+++ b/lib/observer/src/observer.app.src
@@ -51,6 +51,7 @@
observer_html_lib,
observer_lib,
observer_perf_wx,
+ observer_port_wx,
observer_pro_wx,
observer_procinfo,
observer_sys_wx,
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl
index cef83037d0..936b2783e2 100644
--- a/lib/observer/src/observer_app_wx.erl
+++ b/lib/observer/src/observer_app_wx.erl
@@ -221,21 +221,21 @@ handle_event(#wx{id=?ID_PROC_KILL, event=#wxCommand{type=command_menu_selected}}
%%% Trace api
handle_event(#wx{id=?ID_TRACE_PID, event=#wxCommand{type=command_menu_selected}},
State = #state{sel={Box,_}}) ->
- observer_trace_wx:add_processes(observer_wx:get_tracer(), [box_to_pid(Box)]),
+ observer_trace_wx:add_processes([box_to_pid(Box)]),
{noreply, State};
handle_event(#wx{id=?ID_TRACE_NAME, event=#wxCommand{type=command_menu_selected}},
State = #state{sel={Box,_}}) ->
- observer_trace_wx:add_processes(observer_wx:get_tracer(), [box_to_reg(Box)]),
+ observer_trace_wx:add_processes([box_to_reg(Box)]),
{noreply, State};
handle_event(#wx{id=?ID_TRACE_TREE_PIDS, event=#wxCommand{type=command_menu_selected}},
State = #state{sel=Sel}) ->
Get = fun(Box) -> box_to_pid(Box) end,
- observer_trace_wx:add_processes(observer_wx:get_tracer(), tree_map(Sel, Get)),
+ observer_trace_wx:add_processes(tree_map(Sel, Get)),
{noreply, State};
handle_event(#wx{id=?ID_TRACE_TREE_NAMES, event=#wxCommand{type=command_menu_selected}},
State = #state{sel=Sel}) ->
Get = fun(Box) -> box_to_reg(Box) end,
- observer_trace_wx:add_processes(observer_wx:get_tracer(), tree_map(Sel, Get)),
+ observer_trace_wx:add_processes(tree_map(Sel, Get)),
{noreply, State};
handle_event(Event, _State) ->
diff --git a/lib/observer/src/observer_port_wx.erl b/lib/observer/src/observer_port_wx.erl
new file mode 100644
index 0000000000..3b788642cc
--- /dev/null
+++ b/lib/observer/src/observer_port_wx.erl
@@ -0,0 +1,479 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+-module(observer_port_wx).
+
+-export([start_link/2]).
+
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_sync_event/3, handle_cast/2]).
+
+-behaviour(wx_object).
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+-define(GRID, 300).
+-define(ID_REFRESH, 301).
+-define(ID_REFRESH_INTERVAL, 302).
+-define(ID_PORT_INFO, 303).
+-define(ID_PORT_INFO_SELECTED, 304).
+-define(ID_TRACE_PORTS, 305).
+-define(ID_TRACE_NAMES, 306).
+-define(ID_TRACE_NEW, 307).
+-define(ID_TRACE_ALL, 308).
+-define(ID_CLOSE_PORT, 309).
+
+-define(TRACE_PORTS_STR, "Trace selected ports").
+-define(TRACE_NAMES_STR, "Trace selected ports, "
+ "if a process have a registered name "
+ "processes with same name will be traced on all nodes").
+
+-record(port,
+ {id,
+ connected,
+ name,
+ controls,
+ slot,
+ id_str,
+ links,
+ monitors}).
+
+-record(opt, {sort_key=2,
+ sort_incr=true
+ }).
+
+-record(state,
+ {
+ parent,
+ grid,
+ panel,
+ node=node(),
+ opt=#opt{},
+ right_clicked_port,
+ ports,
+ timer,
+ open_wins=[]
+ }).
+
+start_link(Notebook, Parent) ->
+ wx_object:start_link(?MODULE, [Notebook, Parent], []).
+
+init([Notebook, Parent]) ->
+ Panel = wxPanel:new(Notebook),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ Style = ?wxLC_REPORT bor ?wxLC_HRULES,
+ Grid = wxListCtrl:new(Panel, [{winid, ?GRID}, {style, Style}]),
+ wxSizer:add(Sizer, Grid, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1}, {border, 5}]),
+ wxWindow:setSizer(Panel, Sizer),
+ Li = wxListItem:new(),
+ AddListEntry = fun({Name, Align, DefSize}, Col) ->
+ wxListItem:setText(Li, Name),
+ wxListItem:setAlign(Li, Align),
+ wxListCtrl:insertColumn(Grid, Col, Li),
+ wxListCtrl:setColumnWidth(Grid, Col, DefSize),
+ Col + 1
+ end,
+ ListItems = [{"Id", ?wxLIST_FORMAT_LEFT, 150},
+ {"Connected", ?wxLIST_FORMAT_LEFT, 150},
+ {"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Controls", ?wxLIST_FORMAT_LEFT, 200},
+ {"Slot", ?wxLIST_FORMAT_RIGHT, 50}],
+ lists:foldl(AddListEntry, 0, ListItems),
+ wxListItem:destroy(Li),
+
+ wxListCtrl:connect(Grid, command_list_item_right_click),
+ wxListCtrl:connect(Grid, command_list_item_activated),
+ wxListCtrl:connect(Grid, command_list_col_click),
+ wxListCtrl:connect(Grid, size, [{skip, true}]),
+
+ wxWindow:setFocus(Grid),
+ {Panel, #state{grid=Grid, parent=Parent, panel=Panel, timer={false, 10}}}.
+
+handle_event(#wx{id=?ID_REFRESH},
+ State = #state{node=Node, grid=Grid, opt=Opt}) ->
+ Ports0 = get_ports(Node),
+ Ports = update_grid(Grid, Opt, Ports0),
+ {noreply, State#state{ports=Ports}};
+
+handle_event(#wx{obj=Obj, event=#wxClose{}}, #state{open_wins=Opened} = State) ->
+ NewOpened =
+ case lists:keytake(Obj,2,Opened) of
+ false -> Opened;
+ {value,_,Rest} -> Rest
+ end,
+ {noreply, State#state{open_wins=NewOpened}};
+
+handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},
+ State = #state{node=Node, grid=Grid,
+ opt=Opt0=#opt{sort_key=Key, sort_incr=Bool}}) ->
+ Opt = case Col+2 of
+ Key -> Opt0#opt{sort_incr=not Bool};
+ NewKey -> Opt0#opt{sort_key=NewKey}
+ end,
+ Ports0 = get_ports(Node),
+ Ports = update_grid(Grid, Opt, Ports0),
+ wxWindow:setFocus(Grid),
+ {noreply, State#state{opt=Opt, ports=Ports}};
+
+handle_event(#wx{event=#wxSize{size={W,_}}}, State=#state{grid=Grid}) ->
+ observer_lib:set_listctrl_col_size(Grid, W),
+ {noreply, State};
+
+handle_event(#wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=Index}},
+ State=#state{grid=Grid, ports=Ports, open_wins=Opened}) ->
+ Port = lists:nth(Index+1, Ports),
+ NewOpened = display_port_info(Grid, Port, Opened),
+ {noreply, State#state{open_wins=NewOpened}};
+
+handle_event(#wx{event=#wxList{type=command_list_item_right_click,
+ itemIndex=Index}},
+ State=#state{panel=Panel, ports=Ports}) ->
+ case Index of
+ -1 ->
+ {noreply, State};
+ _ ->
+ Port = lists:nth(Index+1, Ports),
+ Menu = wxMenu:new(),
+ wxMenu:append(Menu, ?ID_PORT_INFO,
+ "Port info for " ++ erlang:port_to_list(Port#port.id)),
+ wxMenu:append(Menu, ?ID_TRACE_PORTS,
+ "Trace selected ports",
+ [{help, ?TRACE_PORTS_STR}]),
+ wxMenu:append(Menu, ?ID_TRACE_NAMES,
+ "Trace selected ports by name (all nodes)",
+ [{help, ?TRACE_NAMES_STR}]),
+ wxMenu:append(Menu, ?ID_CLOSE_PORT,
+ "Close " ++ erlang:port_to_list(Port#port.id)),
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu),
+ {noreply, State#state{right_clicked_port=Port}}
+ end;
+
+handle_event(#wx{id=?ID_PORT_INFO},
+ State = #state{grid=Grid, right_clicked_port=Port,
+ open_wins=Opened}) ->
+ case Port of
+ undefined ->
+ {noreply, State};
+ _ ->
+ NewOpened = display_port_info(Grid, Port, Opened),
+ {noreply, State#state{right_clicked_port=undefined,
+ open_wins=NewOpened}}
+ end;
+
+handle_event(#wx{id=?ID_PORT_INFO_SELECTED},
+ State = #state{grid=Grid, ports=Ports, open_wins=Opened}) ->
+ case get_selected_items(Grid,Ports) of
+ [] ->
+ observer_wx:create_txt_dialog(State#state.panel, "No selected ports",
+ "Port Info", ?wxICON_EXCLAMATION),
+ {noreply, State};
+ Selected ->
+ NewOpened = lists:foldl(fun(P,O) -> display_port_info(Grid, P, O) end,
+ Opened, Selected),
+ {noreply, State#state{open_wins = NewOpened}}
+ end;
+
+handle_event(#wx{id=?ID_CLOSE_PORT}, State = #state{right_clicked_port=Port}) ->
+ case Port of
+ undefined ->
+ {noreply, State};
+ _ ->
+ erlang:port_close(Port#port.id),
+ {noreply, State#state{right_clicked_port=undefined}}
+ end;
+
+handle_event(#wx{id=?ID_TRACE_PORTS}, #state{grid=Grid, ports=Ports}=State) ->
+ case get_selected_items(Grid, Ports) of
+ [] ->
+ observer_wx:create_txt_dialog(State#state.panel, "No selected ports",
+ "Tracer", ?wxICON_EXCLAMATION);
+ Selected ->
+ SelectedIds = [Port#port.id || Port <- Selected],
+ observer_trace_wx:add_ports(SelectedIds)
+ end,
+ {noreply, State};
+
+handle_event(#wx{id=?ID_TRACE_NAMES}, #state{grid=Grid, ports=Ports}=State) ->
+ case get_selected_items(Grid, Ports) of
+ [] ->
+ observer_wx:create_txt_dialog(State#state.panel, "No selected ports",
+ "Tracer", ?wxICON_EXCLAMATION);
+ Selected ->
+ IdsOrRegs =
+ [case Port#port.name of
+ [] -> Port#port.id;
+ Name -> Name
+ end || Port <- Selected],
+ observer_trace_wx:add_ports(IdsOrRegs)
+ end,
+ {noreply, State};
+
+handle_event(#wx{id=?ID_TRACE_NEW, event=#wxCommand{type=command_menu_selected}}, State) ->
+ observer_trace_wx:add_ports([new_ports]),
+ {noreply, State};
+
+handle_event(#wx{id=?ID_REFRESH_INTERVAL},
+ State = #state{grid=Grid, timer=Timer0}) ->
+ Timer = observer_lib:interval_dialog(Grid, Timer0, 10, 5*60),
+ {noreply, State#state{timer=Timer}};
+
+handle_event(#wx{event=#wxMouse{type=left_down}, userData=TargetPid}, State) ->
+ observer ! {open_link, TargetPid},
+ {noreply, State};
+
+handle_event(#wx{obj=Obj, event=#wxMouse{type=enter_window}}, State) ->
+ wxTextCtrl:setForegroundColour(Obj,{0,0,100,255}),
+ {noreply, State};
+
+handle_event(#wx{obj=Obj, event=#wxMouse{type=leave_window}}, State) ->
+ wxTextCtrl:setForegroundColour(Obj,?wxBLUE),
+ {noreply, State};
+
+handle_event(Event, _State) ->
+ error({unhandled_event, Event}).
+
+handle_sync_event(_Event, _Obj, _State) ->
+ ok.
+
+handle_call(Event, From, _State) ->
+ error({unhandled_call, Event, From}).
+
+handle_cast(Event, _State) ->
+ error({unhandled_cast, Event}).
+
+handle_info({portinfo_open, PortIdStr},
+ State = #state{grid=Grid, ports=Ports, open_wins=Opened}) ->
+ Port = lists:keyfind(PortIdStr,#port.id_str,Ports),
+ NewOpened = display_port_info(Grid, Port, Opened),
+ {noreply, State#state{open_wins = NewOpened}};
+
+handle_info(refresh_interval, State = #state{node=Node, grid=Grid, opt=Opt,
+ ports=OldPorts}) ->
+ case get_ports(Node) of
+ OldPorts ->
+ %% no change
+ {noreply, State};
+ Ports0 ->
+ Ports = update_grid(Grid, Opt, Ports0),
+ {noreply, State#state{ports=Ports}}
+ end;
+
+handle_info({active, Node}, State = #state{parent=Parent, grid=Grid, opt=Opt,
+ timer=Timer0}) ->
+ Ports0 = get_ports(Node),
+ Ports = update_grid(Grid, Opt, Ports0),
+ wxWindow:setFocus(Grid),
+ create_menus(Parent),
+ Timer = observer_lib:start_timer(Timer0),
+ {noreply, State#state{node=Node, ports=Ports, timer=Timer}};
+
+handle_info(not_active, State = #state{timer = Timer0}) ->
+ Timer = observer_lib:stop_timer(Timer0),
+ {noreply, State#state{timer=Timer}};
+
+handle_info({error, Error}, State) ->
+ handle_error(Error),
+ {noreply, State};
+
+handle_info(_Event, State) ->
+ {noreply, State}.
+
+terminate(_Event, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ State.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+create_menus(Parent) ->
+ MenuEntries =
+ [{"View",
+ [#create_menu{id = ?ID_PORT_INFO_SELECTED,
+ text = "Port info for selected ports\tCtrl-I"},
+ separator,
+ #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl-R"},
+ #create_menu{id = ?ID_REFRESH_INTERVAL, text = "Refresh Interval..."}
+ ]},
+ {"Trace",
+ [#create_menu{id=?ID_TRACE_PORTS, text="Trace selected ports"},
+ #create_menu{id=?ID_TRACE_NAMES, text="Trace selected ports by name (all nodes)"},
+ #create_menu{id=?ID_TRACE_NEW, text="Trace new ports"}
+ ]}
+ ],
+ observer_wx:create_menus(Parent, MenuEntries).
+
+get_ports(Node) ->
+ case get_ports2(Node) of
+ Error = {error, _} ->
+ self() ! Error,
+ [];
+ Res ->
+ Res
+ end.
+get_ports2(Node) ->
+ case rpc:call(Node, observer_backend, get_port_list, []) of
+ {badrpc, Error} ->
+ {error, Error};
+ Error = {error, _} ->
+ Error;
+ Result ->
+ [list_to_portrec(Port) || Port <- Result]
+ end.
+
+list_to_portrec(PL) ->
+ %% PortInfo:
+ %% {registered_name, RegisteredName :: atom()} |
+ %% {id, Index :: integer() >= 0} |
+ %% {connected, Pid :: pid()} |
+ %% {links, Pids :: [pid()]} |
+ %% {name, String :: string()} |
+ %% {input, Bytes :: integer() >= 0} |
+ %% {output, Bytes :: integer() >= 0} |
+ %% {os_pid, OsPid :: integer() >= 0 | undefined},
+ PortId = proplists:get_value(port_id, PL),
+ #port{id = PortId,
+ id_str = erlang:port_to_list(PortId),
+ slot = proplists:get_value(id, PL),
+ connected = proplists:get_value(connected, PL),
+ links = proplists:get_value(links, PL, []),
+ name = proplists:get_value(registered_name, PL, []),
+ monitors = proplists:get_value(monitors, PL, []),
+ controls = proplists:get_value(name, PL)}.
+
+portrec_to_list(#port{id = Id,
+ slot = Slot,
+ connected = Connected,
+ links = Links,
+ name = Name,
+ monitors = Monitors,
+ controls = Controls}) ->
+ [{id,Id},
+ {slot,Slot},
+ {connected,Connected},
+ {links,Links},
+ {name,Name},
+ {monitors,Monitors},
+ {controls,Controls}].
+
+display_port_info(Parent, PortRec, Opened) ->
+ PortIdStr = PortRec#port.id_str,
+ case lists:keyfind(PortIdStr,1,Opened) of
+ false ->
+ Frame = do_display_port_info(Parent, PortRec),
+ [{PortIdStr,Frame}|Opened];
+ {_,Win} ->
+ wxFrame:raise(Win),
+ Opened
+ end.
+
+do_display_port_info(Parent0, PortRec) ->
+ Parent = observer_lib:get_wx_parent(Parent0),
+ Title = "Port Info: " ++ PortRec#port.id_str,
+ Frame = wxMiniFrame:new(Parent, ?wxID_ANY, Title,
+ [{style, ?wxSYSTEM_MENU bor ?wxCAPTION
+ bor ?wxCLOSE_BOX bor ?wxRESIZE_BORDER}]),
+
+ Port = portrec_to_list(PortRec),
+ Fields0 = port_info_fields(Port),
+ {_FPanel, _Sizer, _UpFields} = observer_lib:display_info(Frame, Fields0),
+ wxFrame:center(Frame),
+ wxFrame:connect(Frame, close_window, [{skip, true}]),
+ wxFrame:show(Frame),
+ Frame.
+
+
+port_info_fields(Port) ->
+ Struct =
+ [{"Overview",
+ [{"Name", name},
+ {"Connected", {click,connected}},
+ {"Slot", slot},
+ {"Controls", controls}]},
+ {scroll_boxes,
+ [{"Links",1,{click,links}},
+ {"Monitors",1,{click,filter_monitor_info()}}]}],
+ observer_lib:fill_info(Struct, Port).
+
+filter_monitor_info() ->
+ fun(Data) ->
+ Ms = proplists:get_value(monitors, Data),
+ [Pid || {process, Pid} <- Ms]
+ end.
+
+
+handle_error(Foo) ->
+ Str = io_lib:format("ERROR: ~s~n",[Foo]),
+ observer_lib:display_info_dialog(Str).
+
+update_grid(Grid, Opt, Ports) ->
+ wx:batch(fun() -> update_grid2(Grid, Opt, Ports) end).
+update_grid2(Grid, #opt{sort_key=Sort,sort_incr=Dir}, Ports) ->
+ wxListCtrl:deleteAllItems(Grid),
+ Update =
+ fun(#port{id = Id,
+ slot = Slot,
+ connected = Connected,
+ name = Name,
+ controls = Ctrl},
+ Row) ->
+ _Item = wxListCtrl:insertItem(Grid, Row, ""),
+ if (Row rem 2) =:= 0 ->
+ wxListCtrl:setItemBackgroundColour(Grid, Row, ?BG_EVEN);
+ true -> ignore
+ end,
+
+ lists:foreach(fun({Col, Val}) ->
+ wxListCtrl:setItem(Grid, Row, Col,
+ observer_lib:to_str(Val))
+ end,
+ [{0,Id},{1,Connected},{2,Name},{3,Ctrl},{4,Slot}]),
+ Row + 1
+ end,
+ PortInfo = case Dir of
+ false -> lists:reverse(lists:keysort(Sort, Ports));
+ true -> lists:keysort(Sort, Ports)
+ end,
+ lists:foldl(Update, 0, PortInfo),
+ PortInfo.
+
+
+get_selected_items(Grid, Data) ->
+ get_indecies(get_selected_items(Grid, -1, []), Data).
+get_selected_items(Grid, Index, ItemAcc) ->
+ Item = wxListCtrl:getNextItem(Grid, Index, [{geometry, ?wxLIST_NEXT_ALL},
+ {state, ?wxLIST_STATE_SELECTED}]),
+ case Item of
+ -1 ->
+ lists:reverse(ItemAcc);
+ _ ->
+ get_selected_items(Grid, Item, [Item | ItemAcc])
+ end.
+
+get_indecies(Items, Data) ->
+ get_indecies(Items, 0, Data).
+get_indecies([I|Rest], I, [H|T]) ->
+ [H|get_indecies(Rest, I+1, T)];
+get_indecies(Rest = [_|_], I, [_|T]) ->
+ get_indecies(Rest, I+1, T);
+get_indecies(_, _, _) ->
+ [].
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl
index bd914cdf65..ee6829b847 100644
--- a/lib/observer/src/observer_pro_wx.erl
+++ b/lib/observer/src/observer_pro_wx.erl
@@ -83,6 +83,7 @@
timer,
procinfo_menu_pids=[],
sel={[], []},
+ right_clicked_pid,
holder}).
start_link(Notebook, Parent) ->
@@ -303,13 +304,14 @@ handle_event(#wx{id=?ID_REFRESH_INTERVAL},
Timer = observer_lib:interval_dialog(Panel, Timer0, 1, 5*60),
{noreply, State#state{timer=Timer}};
-handle_event(#wx{id=?ID_KILL}, #state{sel={[_|Ids], [ToKill|Pids]}}=State) ->
- exit(ToKill, kill),
- {noreply, State#state{sel={Ids,Pids}}};
+handle_event(#wx{id=?ID_KILL}, #state{right_clicked_pid=Pid, sel=Sel0}=State) ->
+ exit(Pid, kill),
+ Sel = rm_selected(Pid,Sel0),
+ {noreply, State#state{sel=Sel}};
handle_event(#wx{id=?ID_PROC},
- #state{panel=Panel, sel={_, [Pid|_]},procinfo_menu_pids=Opened}=State) ->
+ #state{panel=Panel, right_clicked_pid=Pid, procinfo_menu_pids=Opened}=State) ->
Opened2 = start_procinfo(Pid, Panel, Opened),
{noreply, State#state{procinfo_menu_pids=Opened2}};
@@ -319,7 +321,7 @@ handle_event(#wx{id=?ID_TRACE_PIDS}, #state{sel={_, Pids}, panel=Panel}=State)
observer_wx:create_txt_dialog(Panel, "No selected processes", "Tracer", ?wxICON_EXCLAMATION),
{noreply, State};
Pids ->
- observer_trace_wx:add_processes(observer_wx:get_tracer(), Pids),
+ observer_trace_wx:add_processes(Pids),
{noreply, State}
end;
@@ -330,12 +332,12 @@ handle_event(#wx{id=?ID_TRACE_NAMES}, #state{sel={SelIds,_Pids}, holder=Holder,
{noreply, State};
_ ->
PidsOrReg = call(Holder, {get_name_or_pid, self(), SelIds}),
- observer_trace_wx:add_processes(observer_wx:get_tracer(), PidsOrReg),
+ observer_trace_wx:add_processes(PidsOrReg),
{noreply, State}
end;
handle_event(#wx{id=?ID_TRACE_NEW, event=#wxCommand{type=command_menu_selected}}, State) ->
- observer_trace_wx:add_processes(observer_wx:get_tracer(), [new]),
+ observer_trace_wx:add_processes([new_processes]),
{noreply, State};
handle_event(#wx{event=#wxSize{size={W,_}}},
@@ -347,20 +349,26 @@ handle_event(#wx{event=#wxList{type=command_list_item_right_click,
itemIndex=Row}},
#state{panel=Panel, holder=Holder}=State) ->
- case call(Holder, {get_row, self(), Row, pid}) of
- {error, undefined} ->
- undefined;
- {ok, _} ->
- Menu = wxMenu:new(),
- wxMenu:append(Menu, ?ID_PROC, "Process info"),
- wxMenu:append(Menu, ?ID_TRACE_PIDS, "Trace processes", [{help, ?TRACE_PIDS_STR}]),
- wxMenu:append(Menu, ?ID_TRACE_NAMES, "Trace named processes (all nodes)",
- [{help, ?TRACE_NAMES_STR}]),
- wxMenu:append(Menu, ?ID_KILL, "Kill Process"),
- wxWindow:popupMenu(Panel, Menu),
- wxMenu:destroy(Menu)
- end,
- {noreply, State};
+ Pid =
+ case call(Holder, {get_row, self(), Row, pid}) of
+ {error, undefined} ->
+ undefined;
+ {ok, P} ->
+ Menu = wxMenu:new(),
+ wxMenu:append(Menu, ?ID_PROC,
+ "Process info for " ++ pid_to_list(P)),
+ wxMenu:append(Menu, ?ID_TRACE_PIDS,
+ "Trace selected processes",
+ [{help, ?TRACE_PIDS_STR}]),
+ wxMenu:append(Menu, ?ID_TRACE_NAMES,
+ "Trace selected processes by name (all nodes)",
+ [{help, ?TRACE_NAMES_STR}]),
+ wxMenu:append(Menu, ?ID_KILL, "Kill process " ++ pid_to_list(P)),
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu),
+ P
+ end,
+ {noreply, State#state{right_clicked_pid=Pid}};
handle_event(#wx{event=#wxList{type=command_list_item_focused,
itemIndex=Row}},
@@ -432,6 +440,17 @@ set_focus([Old|_], [New|_], Grid) ->
wxListCtrl:setItemState(Grid, Old, 0, ?wxLIST_STATE_FOCUSED),
wxListCtrl:setItemState(Grid, New, 16#FFFF, ?wxLIST_STATE_FOCUSED).
+rm_selected(Pid, {Ids, Pids}) ->
+ rm_selected(Pid, Ids, Pids, [], []).
+
+rm_selected(Pid, [_Id|Ids], [Pid|Pids], AccIds, AccPids) ->
+ {lists:reverse(AccIds)++Ids,lists:reverse(AccPids)++Pids};
+rm_selected(Pid, [Id|Ids], [OtherPid|Pids], AccIds, AccPids) ->
+ rm_selected(Pid, Ids, Pids, [Id|AccIds], [OtherPid|AccPids]);
+rm_selected(_, [], [], AccIds, AccPids) ->
+ {lists:reverse(AccIds), lists:reverse(AccPids)}.
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%TABLE HOLDER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
init_table_holder(Parent, Attrs) ->
diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl
index fe2aa11450..620979dcc9 100644
--- a/lib/observer/src/observer_procinfo.erl
+++ b/lib/observer/src/observer_procinfo.erl
@@ -317,7 +317,7 @@ fetch_state_info2(Pid, M) ->
of
{status, _, {module, _},
[_PDict, _SysState, _Parent, _Dbg,
- [Header,{data, First},{data, Second}]]} ->
+ [Header,{data, First},{data, Second}|_]]} ->
[{"Behaviour", B}, Header] ++ First ++ Second;
{status, _, {module, _},
[_PDict, _SysState, _Parent, _Dbg,
diff --git a/lib/observer/src/observer_trace_wx.erl b/lib/observer/src/observer_trace_wx.erl
index 9c0243e4a7..af90e2100c 100644
--- a/lib/observer/src/observer_trace_wx.erl
+++ b/lib/observer/src/observer_trace_wx.erl
@@ -19,7 +19,7 @@
-module(observer_trace_wx).
--export([start_link/2, add_processes/2]).
+-export([start_link/2, add_processes/1, add_ports/1]).
-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
handle_event/2, handle_cast/2]).
@@ -31,11 +31,15 @@
-define(SAVE_TRACEOPTS, 305).
-define(LOAD_TRACEOPTS, 306).
-define(TOGGLE_TRACE, 307).
--define(ADD_NEW, 308).
--define(ADD_TP, 309).
--define(TRACE_OUTPUT, 310).
--define(TRACE_DEFMS, 311).
--define(TRACE_DEFPS, 312).
+-define(ADD_NEW_PROCS, 308).
+-define(ADD_NEW_PORTS, 309).
+-define(ADD_TP, 310).
+-define(TRACE_OUTPUT, 311).
+-define(DEF_MS_FUNCS, 312).
+-define(DEF_MS_SEND, 313).
+-define(DEF_MS_RECV, 314).
+-define(DEF_PROC_OPTS, 315).
+-define(DEF_PORT_OPTS, 316).
-define(NODES_WIN, 330).
-define(ADD_NODES, 331).
@@ -45,36 +49,53 @@
-define(EDIT_PROCS, 341).
-define(REMOVE_PROCS, 342).
--define(MODULES_WIN, 350).
+-define(PORT_WIN, 350).
+-define(EDIT_PORTS, 351).
+-define(REMOVE_PORTS, 352).
--define(FUNCS_WIN, 360).
--define(EDIT_FUNCS_MS, 361).
--define(REMOVE_FUNCS_MS, 362).
+-define(MODULES_WIN, 360).
+-define(REMOVE_MOD_MS, 361).
--define(LOG_WIN, 370).
--define(LOG_SAVE, 321).
--define(LOG_CLEAR, 322).
+-define(FUNCS_WIN, 370).
+-define(EDIT_FUNCS_MS, 371).
+-define(REMOVE_FUNCS_MS, 372).
+
+-define(LOG_WIN, 380).
+-define(LOG_SAVE, 381).
+-define(LOG_CLEAR, 382).
+
+-define(NO_NODES_HELP,"Right click to add nodes").
+-define(NODES_HELP,"Select nodes to see traced processes and ports").
+-define(NO_P_HELP,"Add items from Processes/Ports tab").
+-define(P_HELP,"Select nodes to see traced processes and ports").
+-define(NO_TP_HELP,"Add trace pattern with button below").
+-define(TP_HELP,"Select module to see trace patterns").
-record(state,
{parent,
panel,
- n_view, p_view, m_view, f_view, %% The listCtrl's
+ n_view, proc_view, port_view, m_view, f_view, %% The listCtrl's
logwin, %% The latest log window
nodes = [],
toggle_button,
- tpids = [], %% #tpid
- def_trace_opts = [],
+ tpids = [], % #titem
+ tports = [], % #titem
+ def_proc_flags = [],
+ def_port_flags = [],
output = [],
tpatterns = dict:new(), % Key =:= Module::atom, Value =:= {M, F, A, MatchSpec}
match_specs = []}). % [ #match_spec{} ]
--record(tpid, {pid, opts}).
+-record(titem, {id, opts}).
start_link(Notebook, ParentPid) ->
wx_object:start_link(?MODULE, [Notebook, ParentPid], []).
-add_processes(Tracer, Pids) when is_list(Pids) ->
- wx_object:cast(Tracer, {add_processes, Pids}).
+add_processes(Pids) when is_list(Pids) ->
+ wx_object:cast(observer_wx:get_tracer(), {add_processes, Pids}).
+
+add_ports(Ports) when is_list(Ports) ->
+ wx_object:cast(observer_wx:get_tracer(), {add_ports, Ports}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -87,11 +108,13 @@ create_window(Notebook, ParentPid) ->
Sizer = wxBoxSizer:new(?wxVERTICAL),
Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)},
{style, ?SASH_STYLE}]),
- {NodeProcView, NodeView, ProcessView} = create_process_view(Splitter),
+ {NodeProcView, NodeView, ProcessView, PortView} =
+ create_proc_port_view(Splitter),
{MatchSpecView,ModView,FuncView} = create_matchspec_view(Splitter),
wxSplitterWindow:setSashGravity(Splitter, 0.5),
wxSplitterWindow:setMinimumPaneSize(Splitter,50),
- wxSplitterWindow:splitHorizontally(Splitter, NodeProcView, MatchSpecView),
+ wxSplitterWindow:splitHorizontally(Splitter, NodeProcView, MatchSpecView,
+ [{sashPosition,368}]),
wxSizer:add(Sizer, Splitter, [{flag, ?wxEXPAND bor ?wxALL}, {border, 5}, {proportion, 1}]),
%% Buttons
Buttons = wxBoxSizer:new(?wxHORIZONTAL),
@@ -99,7 +122,8 @@ create_window(Notebook, ParentPid) ->
wxSizer:add(Buttons, ToggleButton, [{flag, ?wxALIGN_CENTER_VERTICAL}]),
wxSizer:addSpacer(Buttons, 15),
wxSizer:add(Buttons, wxButton:new(Panel, ?ADD_NODES, [{label, "Add Nodes"}])),
- wxSizer:add(Buttons, wxButton:new(Panel, ?ADD_NEW, [{label, "Add 'new' Process"}])),
+ wxSizer:add(Buttons, wxButton:new(Panel, ?ADD_NEW_PROCS, [{label, "Add 'new' Processes"}])),
+ wxSizer:add(Buttons, wxButton:new(Panel, ?ADD_NEW_PORTS, [{label, "Add 'new' Ports"}])),
wxSizer:add(Buttons, wxButton:new(Panel, ?ADD_TP, [{label, "Add Trace Pattern"}])),
wxMenu:connect(Panel, command_togglebutton_clicked, [{skip, true}]),
wxMenu:connect(Panel, command_button_clicked, [{skip, true}]),
@@ -107,24 +131,47 @@ create_window(Notebook, ParentPid) ->
{border, 5}, {proportion,0}]),
wxWindow:setSizer(Panel, Sizer),
{Panel, #state{parent=ParentPid, panel=Panel,
- n_view=NodeView, p_view=ProcessView, m_view=ModView, f_view=FuncView,
+ n_view=NodeView, proc_view=ProcessView, port_view=PortView,
+ m_view=ModView, f_view=FuncView,
toggle_button = ToggleButton,
match_specs=default_matchspecs()}}.
default_matchspecs() ->
- Ms = [{"Return Trace", [{'_', [], [{return_trace}]}], "fun(_) -> return_trace() end"},
- {"Exception Trace", [{'_', [], [{exception_trace}]}], "fun(_) -> exception_trace() end"},
- {"Message Caller", [{'_', [], [{message,{caller}}]}], "fun(_) -> message(caller()) end"},
- {"Message Dump", [{'_', [], [{message,{process_dump}}]}], "fun(_) -> message(process_dump()) end"}],
+ [{Key,default_matchspecs(Key)} || Key <- [funcs,send,'receive']].
+default_matchspecs(Key) ->
+ Ms = get_default_matchspecs(Key),
[make_ms(Name,Term,FunStr) || {Name,Term,FunStr} <- Ms].
-create_process_view(Parent) ->
+get_default_matchspecs(funcs) ->
+ [{"Return Trace", [{'_', [], [{return_trace}]}],
+ "fun(_) -> return_trace() end"},
+ {"Exception Trace", [{'_', [], [{exception_trace}]}],
+ "fun(_) -> exception_trace() end"},
+ {"Message Caller", [{'_', [], [{message,{caller}}]}],
+ "fun(_) -> message(caller()) end"},
+ {"Message Dump", [{'_', [], [{message,{process_dump}}]}],
+ "fun(_) -> message(process_dump()) end"}];
+get_default_matchspecs(send) ->
+ [{"To local node", [{['$1','_'], [{'==',{node,'$1'},{node}}], []}],
+ "fun([Pid,_]) when node(Pid)==node() ->\n true\nend"},
+ {"To remote node", [{['$1','_'], [{'=/=',{node,'$1'},{node}}], []}],
+ "fun([Pid,_]) when node(Pid)=/=node() ->\n true\nend"}];
+get_default_matchspecs('receive') ->
+ [{"From local node", [{['$1','_','_'], [{'==','$1',{node}}], []}],
+ "fun([Node,_,_]) when Node==node() ->\n true\nend"},
+ {"From remote node", [{['$1','_','_'], [{'=/=','$1',{node}}], []}],
+ "fun([Node,_,_]) when Node=/=node() ->\n true\nend"}].
+
+
+create_proc_port_view(Parent) ->
Panel = wxPanel:new(Parent),
MainSz = wxBoxSizer:new(?wxHORIZONTAL),
Style = ?wxLC_REPORT bor ?wxLC_HRULES,
Splitter = wxSplitterWindow:new(Panel, [{style, ?SASH_STYLE}]),
Nodes = wxListCtrl:new(Splitter, [{winid, ?NODES_WIN}, {style, Style}]),
- Procs = wxListCtrl:new(Splitter, [{winid, ?PROC_WIN}, {style, Style}]),
+ ProcsPortsSplitter = wxSplitterWindow:new(Splitter, [{style, ?SASH_STYLE}]),
+ Procs = wxListCtrl:new(ProcsPortsSplitter, [{winid,?PROC_WIN},{style,Style}]),
+ Ports = wxListCtrl:new(ProcsPortsSplitter, [{winid,?PORT_WIN},{style,Style}]),
Li = wxListItem:new(),
wxListItem:setText(Li, "Nodes"),
wxListCtrl:insertColumn(Nodes, 0, Li),
@@ -136,31 +183,57 @@ create_process_view(Parent) ->
wxListCtrl:setColumnWidth(Procs, Col, DefSize),
Col + 1
end,
- ListItems = [{"Process Id", ?wxLIST_FORMAT_CENTER, 120},
- {"Trace Options", ?wxLIST_FORMAT_LEFT, 300}],
- lists:foldl(AddProc, 0, ListItems),
+ ProcListItems = [{"Process Id", ?wxLIST_FORMAT_CENTER, 120},
+ {"Trace Options", ?wxLIST_FORMAT_LEFT, 300}],
+ lists:foldl(AddProc, 0, ProcListItems),
+
+ AddPort = fun({Name, Align, DefSize}, Col) ->
+ wxListItem:setText(Li, Name),
+ wxListItem:setAlign(Li, Align),
+ wxListCtrl:insertColumn(Ports, Col, Li),
+ wxListCtrl:setColumnWidth(Ports, Col, DefSize),
+ Col + 1
+ end,
+ PortListItems = [{"Port Id", ?wxLIST_FORMAT_CENTER, 120},
+ {"Trace Options", ?wxLIST_FORMAT_LEFT, 300}],
+ lists:foldl(AddPort, 0, PortListItems),
+
wxListItem:destroy(Li),
wxSplitterWindow:setSashGravity(Splitter, 0.0),
wxSplitterWindow:setMinimumPaneSize(Splitter,50),
- wxSplitterWindow:splitVertically(Splitter, Nodes, Procs, [{sashPosition, 155}]),
+ wxSplitterWindow:splitVertically(Splitter, Nodes, ProcsPortsSplitter,
+ [{sashPosition, 155}]),
wxSizer:add(MainSz, Splitter, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ wxSplitterWindow:setSashGravity(ProcsPortsSplitter, 0.5),
+ wxSplitterWindow:setMinimumPaneSize(ProcsPortsSplitter,50),
+ wxSplitterWindow:splitHorizontally(ProcsPortsSplitter, Procs, Ports,
+ [{sashPosition, 182}]),
+
wxListCtrl:connect(Procs, command_list_item_right_click),
+ wxListCtrl:connect(Ports, command_list_item_right_click),
wxListCtrl:connect(Nodes, command_list_item_right_click),
+ wxListCtrl:connect(Nodes, command_list_item_selected),
wxListCtrl:connect(Procs, size, [{skip, true}]),
+ wxListCtrl:connect(Ports, size, [{skip, true}]),
wxListCtrl:connect(Nodes, size, [{skip, true}]),
+ wxListCtrl:setToolTip(Nodes, ?NO_NODES_HELP),
+ wxListCtrl:setToolTip(Procs, ?NO_P_HELP),
+ wxListCtrl:setToolTip(Ports, ?NO_P_HELP),
+
wxPanel:setSizer(Panel, MainSz),
wxWindow:setFocus(Procs),
- {Panel, Nodes, Procs}.
+ {Panel, Nodes, Procs, Ports}.
create_matchspec_view(Parent) ->
Panel = wxPanel:new(Parent),
MainSz = wxBoxSizer:new(?wxHORIZONTAL),
Style = ?wxLC_REPORT bor ?wxLC_HRULES,
Splitter = wxSplitterWindow:new(Panel, [{style, ?SASH_STYLE}]),
- Modules = wxListCtrl:new(Splitter, [{winid, ?MODULES_WIN}, {style, Style}]),
+ Modules = wxListCtrl:new(Splitter, [{winid, ?MODULES_WIN},
+ {style, Style bor ?wxLC_SINGLE_SEL}]),
Funcs = wxListCtrl:new(Splitter, [{winid, ?FUNCS_WIN}, {style, Style}]),
Li = wxListItem:new(),
@@ -182,7 +255,9 @@ create_matchspec_view(Parent) ->
wxListCtrl:connect(Modules, size, [{skip, true}]),
wxListCtrl:connect(Funcs, size, [{skip, true}]),
wxListCtrl:connect(Modules, command_list_item_selected),
+ wxListCtrl:connect(Modules, command_list_item_right_click),
wxListCtrl:connect(Funcs, command_list_item_right_click),
+ wxListCtrl:setToolTip(Panel, ?NO_TP_HELP),
wxPanel:setSizer(Panel, MainSz),
{Panel, Modules, Funcs}.
@@ -192,8 +267,11 @@ create_menues(Parent) ->
#create_menu{id = ?SAVE_TRACEOPTS, text = "Save settings"}]},
{"Options",
[#create_menu{id = ?TRACE_OUTPUT, text = "Output"},
- #create_menu{id = ?TRACE_DEFMS, text = "Match Specifications"},
- #create_menu{id = ?TRACE_DEFPS, text = "Default Process Options"}]}
+ #create_menu{id = ?DEF_MS_FUNCS, text = "Default Match Specifications for Functions"},
+ #create_menu{id = ?DEF_MS_SEND, text = "Default Match Specifications for 'send'"},
+ #create_menu{id = ?DEF_MS_RECV, text = "Default Match Specifications for 'receive'"},
+ #create_menu{id = ?DEF_PROC_OPTS, text = "Default Process Options"},
+ #create_menu{id = ?DEF_PORT_OPTS, text = "Default Port Options"}]}
],
observer_wx:create_menus(Parent, Menus).
@@ -206,11 +284,19 @@ handle_event(#wx{obj=Obj, event=#wxSize{size={W,_}}}, State) ->
end,
{noreply, State};
-handle_event(#wx{id=?ADD_NEW}, State = #state{panel=Parent, def_trace_opts=TraceOpts}) ->
+handle_event(#wx{id=?ADD_NEW_PROCS}, State = #state{panel=Parent, def_proc_flags=TraceOpts}) ->
try
Opts = observer_traceoptions_wx:process_trace(Parent, TraceOpts),
- Process = #tpid{pid=new, opts=Opts},
- {noreply, do_add_processes([Process], State#state{def_trace_opts=Opts})}
+ Process = #titem{id=new_processes, opts=Opts},
+ {noreply, do_add_processes([Process], State#state{def_proc_flags=Opts})}
+ catch cancel -> {noreply, State}
+ end;
+
+handle_event(#wx{id=?ADD_NEW_PORTS}, State = #state{panel=Parent, def_port_flags=TraceOpts}) ->
+ try
+ Opts = observer_traceoptions_wx:port_trace(Parent, TraceOpts),
+ Port = #titem{id=new_ports, opts=Opts},
+ {noreply, do_add_ports([Port], State#state{def_port_flags=Opts})}
catch cancel -> {noreply, State}
end;
@@ -233,26 +319,36 @@ handle_event(#wx{id=?MODULES_WIN, event=#wxList{type=command_list_item_selected,
update_functions_view(dict:fetch(Module, TPs), Fview),
{noreply, State};
+handle_event(#wx{id=?NODES_WIN,
+ event=#wxList{type=command_list_item_selected}},
+ State = #state{tpids=Tpids, tports=Tports, n_view=Nview,
+ proc_view=ProcView, port_view=PortView, nodes=Ns}) ->
+ Nodes = get_selected_items(Nview, Ns),
+ update_p_view(Tpids, ProcView, Nodes),
+ update_p_view(Tports, PortView, Nodes),
+ {noreply, State};
+
handle_event(#wx{event = #wxCommand{type = command_togglebutton_clicked, commandInt = 1}},
#state{panel = Panel,
nodes = Nodes,
tpids = TProcs,
+ tports = TPorts,
tpatterns = TPs0,
toggle_button = ToggleBtn,
output = Opts
} = State) ->
try
TPs = dict:to_list(TPs0),
- (TProcs == []) andalso throw({error, "No processes traced"}),
+ (TProcs == []) andalso (TPorts == []) andalso throw({error, "No processes or ports traced"}),
(Nodes == []) andalso throw({error, "No nodes traced"}),
- HaveCallTrace = fun(#tpid{opts=Os}) -> lists:member(functions,Os) end,
+ HaveCallTrace = fun(#titem{opts=Os}) -> lists:member(functions,Os) end,
WStr = "Call trace actived but no trace patterns used",
(TPs == []) andalso lists:any(HaveCallTrace, TProcs) andalso
observer_wx:create_txt_dialog(Panel, WStr, "Warning", ?wxICON_WARNING),
{TTB, LogWin} = ttb_output_args(Panel, Opts),
{ok, _} = ttb:tracer(Nodes, TTB),
- setup_ttb(TPs, TProcs),
+ setup_ttb(TPs, TProcs, TPorts),
wxToggleButton:setLabel(ToggleBtn, "Stop Trace"),
{noreply, State#state{logwin=LogWin}}
catch {error, Msg} ->
@@ -302,7 +398,8 @@ handle_event(#wx{id=?LOG_SAVE, userData=TCtrl}, #state{panel=Panel} = State) ->
handle_event(#wx{id = ?SAVE_TRACEOPTS},
#state{panel = Panel,
- def_trace_opts = TraceOpts,
+ def_proc_flags = ProcFlags,
+ def_port_flags = PortFlags,
match_specs = MatchSpecs,
tpatterns = TracePatterns,
output = Output
@@ -312,7 +409,7 @@ handle_event(#wx{id = ?SAVE_TRACEOPTS},
?wxID_OK ->
Path = wxFileDialog:getPath(Dialog),
write_file(Panel, Path,
- TraceOpts, MatchSpecs, Output,
+ ProcFlags, PortFlags, MatchSpecs, Output,
dict:to_list(TracePatterns)
);
_ ->
@@ -333,52 +430,159 @@ handle_event(#wx{id = ?LOAD_TRACEOPTS}, #state{panel = Panel} = State) ->
wxDialog:destroy(Dialog),
{noreply, State2};
-handle_event(#wx{id=Type, event=#wxList{type=command_list_item_right_click}},
- State = #state{panel=Panel}) ->
- Menus = case Type of
- ?PROC_WIN ->
- [{?EDIT_PROCS, "Edit process options"},
- {?REMOVE_PROCS, "Remove processes"}];
- ?FUNCS_WIN ->
- [{?EDIT_FUNCS_MS, "Edit matchspecs"},
- {?REMOVE_FUNCS_MS, "Remove trace patterns"}];
- ?NODES_WIN ->
- [{?ADD_NODES, "Trace other nodes"},
- {?REMOVE_NODES, "Remove nodes"}]
- end,
- Menu = wxMenu:new(),
- [wxMenu:append(Menu,Id,Str) || {Id,Str} <- Menus],
- wxWindow:popupMenu(Panel, Menu),
- wxMenu:destroy(Menu),
+handle_event(#wx{id=?PROC_WIN, event=#wxList{type=command_list_item_right_click}},
+ State = #state{panel=Panel, proc_view=LCtrl, tpids=Tpids,
+ n_view=Nview, nodes=Nodes}) ->
+ case get_visible_ps(Tpids, Nodes, Nview) of
+ [] ->
+ ok;
+ Visible ->
+ case get_selected_items(LCtrl, Visible) of
+ [] ->
+ ok;
+ _ ->
+ create_right_click_menu(
+ Panel,
+ [{?EDIT_PROCS, "Edit process options"},
+ {?REMOVE_PROCS, "Remove processes"}])
+ end
+ end,
+ {noreply, State};
+
+handle_event(#wx{id=?PORT_WIN, event=#wxList{type=command_list_item_right_click}},
+ State = #state{panel=Panel, port_view=LCtrl, tports=Tports,
+ n_view=Nview, nodes=Nodes}) ->
+ case get_visible_ps(Tports, Nodes, Nview) of
+ [] ->
+ ok;
+ Visible ->
+ case get_selected_items(LCtrl, Visible) of
+ [] ->
+ ok;
+ _ ->
+ create_right_click_menu(
+ Panel,
+ [{?EDIT_PORTS, "Edit port options"},
+ {?REMOVE_PORTS, "Remove ports"}])
+ end
+ end,
+ {noreply, State};
+
+handle_event(#wx{id=?MODULES_WIN,event=#wxList{type=command_list_item_right_click}},
+ State = #state{panel=Panel, m_view=Mview, tpatterns=TPs}) ->
+ case get_selected_items(Mview, lists:sort(dict:fetch_keys(TPs))) of
+ [] ->
+ ok;
+ _ ->
+ create_right_click_menu(
+ Panel,
+ [{?REMOVE_MOD_MS, "Remove trace patterns"}])
+ end,
+ {noreply,State};
+
+handle_event(#wx{id=?FUNCS_WIN,event=#wxList{type=command_list_item_right_click}},
+ State = #state{panel=Panel, m_view=Mview, f_view=Fview,
+ tpatterns=TPs}) ->
+ case get_selected_items(Mview, lists:sort(dict:fetch_keys(TPs))) of
+ [] ->
+ ok;
+ [Module] ->
+ case get_selected_items(Fview, dict:fetch(Module, TPs)) of
+ [] ->
+ ok;
+ _ ->
+ create_right_click_menu(
+ Panel,
+ [{?EDIT_FUNCS_MS, "Edit matchspecs"},
+ {?REMOVE_FUNCS_MS, "Remove trace patterns"}])
+ end
+ end,
+ {noreply,State};
+
+handle_event(#wx{id=?NODES_WIN,event=#wxList{type=command_list_item_right_click}},
+ State = #state{panel=Panel, n_view=Nview, nodes=Nodes}) ->
+ Menu =
+ case get_selected_items(Nview, Nodes) of
+ [] ->
+ [{?ADD_NODES, "Add nodes"}];
+ _ ->
+ [{?ADD_NODES, "Add nodes"},
+ {?REMOVE_NODES, "Remove nodes"}]
+ end,
+ create_right_click_menu(Panel,Menu),
{noreply, State};
-handle_event(#wx{id=?EDIT_PROCS}, #state{panel=Panel, tpids=Tpids, p_view=Ps} = State) ->
+handle_event(#wx{id=?EDIT_PROCS}, #state{panel=Panel, tpids=Tpids, proc_view=Procs} = State) ->
try
- [#tpid{opts=DefOpts}|_] = Selected = get_selected_items(Ps, Tpids),
+ [#titem{opts=DefOpts}|_] = Selected = get_selected_items(Procs, Tpids),
Opts = observer_traceoptions_wx:process_trace(Panel, DefOpts),
- Changed = [Tpid#tpid{opts=Opts} || Tpid <- Selected],
- {noreply, do_add_processes(Changed, State#state{def_trace_opts=Opts})}
+ Changed = [Tpid#titem{opts=Opts} || Tpid <- Selected],
+ {noreply, do_add_processes(Changed, State#state{def_proc_flags=Opts})}
catch _:_ ->
{noreply, State}
end;
-handle_event(#wx{id=?REMOVE_PROCS}, #state{tpids=Tpids, p_view=LCtrl} = State) ->
+handle_event(#wx{id=?REMOVE_PROCS},
+ #state{tpids=Tpids, proc_view=LCtrl,
+ n_view=Nview, nodes=Nodes} = State) ->
Selected = get_selected_items(LCtrl, Tpids),
Pids = Tpids -- Selected,
- update_process_view(Pids, LCtrl),
+ update_p_view(Pids, LCtrl, Nodes, Nview),
{noreply, State#state{tpids=Pids}};
-handle_event(#wx{id=?TRACE_DEFPS}, #state{panel=Panel, def_trace_opts=PO} = State) ->
+handle_event(#wx{id=?EDIT_PORTS}, #state{panel=Panel, tports=Tports, port_view=Ports} = State) ->
+ try
+ [#titem{opts=DefOpts}|_] = Selected = get_selected_items(Ports, Tports),
+ Opts = observer_traceoptions_wx:port_trace(Panel, DefOpts),
+ Changed = [Tport#titem{opts=Opts} || Tport <- Selected],
+ {noreply, do_add_ports(Changed, State#state{def_port_flags=Opts})}
+ catch _:_ ->
+ {noreply, State}
+ end;
+
+handle_event(#wx{id=?REMOVE_PORTS},
+ #state{tports=Tports, port_view=LCtrl,
+ n_view=Nview, nodes=Nodes} = State) ->
+ Selected = get_selected_items(LCtrl, Tports),
+ Ports = Tports -- Selected,
+ update_p_view(Ports, LCtrl, Nodes, Nview),
+ {noreply, State#state{tports=Ports}};
+
+handle_event(#wx{id=?DEF_PROC_OPTS}, #state{panel=Panel, def_proc_flags=PO} = State) ->
try
Opts = observer_traceoptions_wx:process_trace(Panel, PO),
- {noreply, State#state{def_trace_opts=Opts}}
+ {noreply, State#state{def_proc_flags=Opts}}
catch _:_ ->
{noreply, State}
end;
-handle_event(#wx{id=?TRACE_DEFMS}, #state{panel=Panel, match_specs=Ms} = State) ->
+handle_event(#wx{id=?DEF_PORT_OPTS}, #state{panel=Panel, def_port_flags=PO} = State) ->
+ try
+ Opts = observer_traceoptions_wx:port_trace(Panel, PO),
+ {noreply, State#state{def_port_flags=Opts}}
+ catch _:_ ->
+ {noreply, State}
+ end;
+
+handle_event(#wx{id=?DEF_MS_FUNCS}, #state{panel=Panel, match_specs=Ms} = State) ->
try %% Return selected MS and sends new MS's to us
- observer_traceoptions_wx:select_matchspec(self(), Panel, Ms)
+ observer_traceoptions_wx:select_matchspec(self(), Panel, Ms, funcs)
+ catch _:_ ->
+ cancel
+ end,
+ {noreply, State};
+
+handle_event(#wx{id=?DEF_MS_SEND}, #state{panel=Panel, match_specs=Ms} = State) ->
+ try %% Return selected MS and sends new MS's to us
+ observer_traceoptions_wx:select_matchspec(self(), Panel, Ms, send)
+ catch _:_ ->
+ cancel
+ end,
+ {noreply, State};
+
+handle_event(#wx{id=?DEF_MS_RECV}, #state{panel=Panel, match_specs=Ms} = State) ->
+ try %% Return selected MS and sends new MS's to us
+ observer_traceoptions_wx:select_matchspec(self(), Panel, Ms, 'receive')
catch _:_ ->
cancel
end,
@@ -389,12 +593,34 @@ handle_event(#wx{id=?EDIT_FUNCS_MS}, #state{panel=Panel, tpatterns=TPs,
match_specs=Mss
} = State) ->
try
- [Module] = get_selected_items(Mview, lists:sort(dict:fetch_keys(TPs))),
- Selected = get_selected_items(LCtrl, dict:fetch(Module, TPs)),
- Ms = observer_traceoptions_wx:select_matchspec(self(), Panel, Mss),
- Changed = [TP#tpattern{ms=Ms} || TP <- Selected],
- {noreply, do_add_patterns({Module, Changed}, State)}
- catch _:_ ->
+ case get_selected_items(Mview, lists:sort(dict:fetch_keys(TPs))) of
+ [] ->
+ throw({error,"No module selected"});
+ [Module] ->
+ Selected = get_selected_items(LCtrl, dict:fetch(Module, TPs)),
+ Key = case Module of
+ 'Events' ->
+ SelectedEvents =
+ [Event || #tpattern{fa=Event} <- Selected],
+ E1 = hd(SelectedEvents),
+ case lists:all(fun(E) when E==E1 -> true;
+ (_) -> false
+ end,
+ SelectedEvents) of
+ true -> E1;
+ false -> throw({error,"Can not set match specs for multiple event types"})
+ end;
+ _ -> funcs
+ end,
+ Ms = observer_traceoptions_wx:select_matchspec(self(), Panel,
+ Mss, Key),
+ Changed = [TP#tpattern{ms=Ms} || TP <- Selected],
+ {noreply, do_add_patterns({Module, Changed}, State)}
+ end
+ catch {error, Msg} ->
+ observer_wx:create_txt_dialog(Panel, Msg, "Error", ?wxICON_ERROR),
+ {noreply, State};
+ cancel ->
{noreply, State}
end;
@@ -417,6 +643,16 @@ handle_event(#wx{id=?REMOVE_FUNCS_MS}, #state{tpatterns=TPs0, f_view=LCtrl, m_vi
{noreply, State#state{tpatterns=TPs}}
end;
+handle_event(#wx{id=?REMOVE_MOD_MS}, #state{tpatterns=TPs0, f_view=LCtrl, m_view=Mview} = State) ->
+ case get_selected_items(Mview, lists:sort(dict:fetch_keys(TPs0))) of
+ [] -> {noreply, State};
+ [Module] ->
+ update_functions_view([], LCtrl),
+ TPs = dict:erase(Module, TPs0),
+ update_modules_view(lists:sort(dict:fetch_keys(TPs)), Module, Mview),
+ {noreply, State#state{tpatterns=TPs}}
+ end;
+
handle_event(#wx{id=?TRACE_OUTPUT}, #state{panel=Panel, output=Out0} = State) ->
try
Out = observer_traceoptions_wx:output(Panel, Out0),
@@ -458,11 +694,20 @@ handle_call(Msg, From, _State) ->
error({unhandled_call, Msg, From}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-handle_cast({add_processes, Pids}, State = #state{panel=Parent, def_trace_opts=TraceOpts}) ->
+handle_cast({add_processes, Pids}, State = #state{panel=Parent, def_proc_flags=TraceOpts}) ->
try
Opts = observer_traceoptions_wx:process_trace(Parent, TraceOpts),
- POpts = [#tpid{pid=Pid, opts=Opts} || Pid <- Pids],
- S = do_add_processes(POpts, State#state{def_trace_opts=Opts}),
+ POpts = [#titem{id=Pid, opts=Opts} || Pid <- Pids],
+ S = do_add_processes(POpts, State#state{def_proc_flags=Opts}),
+ {noreply, S}
+ catch cancel ->
+ {noreply, State}
+ end;
+handle_cast({add_ports, Ports}, State = #state{panel=Parent, def_port_flags=TraceOpts}) ->
+ try
+ Opts = observer_traceoptions_wx:port_trace(Parent, TraceOpts),
+ POpts = [#titem{id=Id, opts=Opts} || Id <- Ports],
+ S = do_add_ports(POpts, State#state{def_port_flags=Opts}),
{noreply, S}
catch cancel ->
{noreply, State}
@@ -510,45 +755,93 @@ do_add_patterns({Module, NewPs}, State=#state{tpatterns=TPs0, m_view=Mview, f_vi
State#state{tpatterns=TPs}
end.
-do_add_processes(POpts, S0=#state{n_view=Nview, p_view=LCtrl, tpids=OldPids, nodes=Ns0}) ->
- case merge_pids(POpts, OldPids) of
- {OldPids, [], []} ->
- S0;
- {Pids, New, _Changed} ->
- update_process_view(Pids, LCtrl),
- Ns1 = lists:usort([node(Pid) || #tpid{pid=Pid} <- New, is_pid(Pid)]),
+do_add_processes(POpts, S0=#state{n_view=Nview, proc_view=LCtrl, tpids=OldPids, nodes=OldNodes}) ->
+ CheckFun = fun(Pid) -> is_pid(Pid) end,
+ {Pids, Nodes} = do_add_pid_or_port(POpts, Nview, LCtrl,
+ OldPids, OldNodes, CheckFun),
+ S0#state{tpids=Pids, nodes=Nodes}.
+
+do_add_ports(POpts, S0=#state{n_view=Nview, port_view=LCtrl, tports=OldPorts, nodes=OldNodes}) ->
+ CheckFun = fun(Port) -> is_port(Port) end,
+ {Ports, Nodes} = do_add_pid_or_port(POpts, Nview, LCtrl,
+ OldPorts, OldNodes, CheckFun),
+ S0#state{tports=Ports, nodes=Nodes}.
+
+do_add_pid_or_port(POpts, Nview, LCtrl, OldPs, Ns0, Check) ->
+ case merge_trace_items(POpts, OldPs) of
+ {OldPs, [], []} ->
+ {OldPs,Ns0};
+ {Ps, New, _Changed} ->
+ Ns1 = lists:usort([node(Id) || #titem{id=Id} <- New, Check(Id)]),
Nodes = case ordsets:subtract(Ns1, Ns0) of
+ [] when Ns0==[] -> [observer_wx:get_active_node()];
[] -> Ns0; %% No new Nodes
- NewNs ->
- %% if dynamicly updates add trace patterns for new nodes
- All = ordsets:union(NewNs, Ns0),
- update_nodes_view(All, Nview),
- All
+ NewNs -> ordsets:union(NewNs, Ns0)
end,
- S0#state{tpids=Pids, nodes=Nodes}
+ update_nodes_view(Nodes, Nview),
+ update_p_view(Ps, LCtrl, Nodes, Nview),
+ {Ps, Nodes}
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-update_process_view(Pids, LCtrl) ->
+get_visible_ps(PidsOrPorts, [Node], _Nview) ->
+ %% If only one node, treat this as selected
+ get_visible_ps(PidsOrPorts, [Node]);
+get_visible_ps(PidsOrPorts, Nodes, Nview) ->
+ get_visible_ps(PidsOrPorts, get_selected_items(Nview, Nodes)).
+
+get_visible_ps(PidsOrPorts, Nodes) ->
+ %% Show pids/ports belonging to the selected nodes only (+ named pids/ports)
+ [P || P <- PidsOrPorts,
+ is_atom(P#titem.id) orelse
+ lists:member(node(P#titem.id),Nodes)].
+
+update_p_view(PidsOrPorts, LCtrl, Nodes, Nview) ->
+ update_p_view(get_visible_ps(PidsOrPorts, Nodes, Nview), LCtrl).
+update_p_view(PidsOrPorts, LCtrl, Nodes) ->
+ update_p_view(get_visible_ps(PidsOrPorts, Nodes), LCtrl).
+
+update_p_view(PidsOrPorts, LCtrl) ->
+ %% pid- or port-view
wxListCtrl:deleteAllItems(LCtrl),
- wx:foldl(fun(#tpid{pid=Pid, opts=Opts}, Row) ->
+ wx:foldl(fun(#titem{id=Id, opts=Opts}, Row) ->
_Item = wxListCtrl:insertItem(LCtrl, Row, ""),
?EVEN(Row) andalso
wxListCtrl:setItemBackgroundColour(LCtrl, Row, ?BG_EVEN),
- wxListCtrl:setItem(LCtrl, Row, 0, observer_lib:to_str(Pid)),
+ wxListCtrl:setItem(LCtrl, Row, 0, observer_lib:to_str(Id)),
wxListCtrl:setItem(LCtrl, Row, 1, observer_lib:to_str(Opts)),
Row+1
- end, 0, Pids).
+ end, 0, PidsOrPorts),
+ case PidsOrPorts of
+ [] ->
+ wxListCtrl:setToolTip(LCtrl,?NO_P_HELP);
+ _ ->
+ wxListCtrl:setToolTip(LCtrl,?P_HELP)
+ end.
update_nodes_view(Nodes, LCtrl) ->
+ Selected =
+ case Nodes of
+ [_] -> Nodes;
+ _ -> get_selected_items(LCtrl, Nodes)
+ end,
wxListCtrl:deleteAllItems(LCtrl),
wx:foldl(fun(Node, Row) ->
_Item = wxListCtrl:insertItem(LCtrl, Row, ""),
?EVEN(Row) andalso
wxListCtrl:setItemBackgroundColour(LCtrl, Row, ?BG_EVEN),
wxListCtrl:setItem(LCtrl, Row, 0, observer_lib:to_str(Node)),
+ lists:member(Node,Selected) andalso % keep selection
+ wxListCtrl:setItemState(LCtrl, Row, 16#FFFF,
+ ?wxLIST_STATE_SELECTED),
Row+1
- end, 0, Nodes).
+ end, 0, Nodes),
+ case Nodes of
+ [] ->
+ wxListCtrl:setToolTip(LCtrl,?NO_NODES_HELP);
+ _ ->
+ wxListCtrl:setToolTip(LCtrl,?NODES_HELP)
+ end.
update_modules_view(Mods, Module, LCtrl) ->
wxListCtrl:deleteAllItems(LCtrl),
@@ -560,33 +853,51 @@ update_modules_view(Mods, Module, LCtrl) ->
(Mod =:= Module) andalso
wxListCtrl:setItemState(LCtrl, Row, 16#FFFF, ?wxLIST_STATE_SELECTED),
Row+1
- end, 0, Mods).
+ end, 0, Mods),
+ Parent = wxListCtrl:getParent(LCtrl),
+ case Mods of
+ [] ->
+ wxListCtrl:setToolTip(Parent,?NO_TP_HELP);
+ _ ->
+ wxListCtrl:setToolTip(Parent,?TP_HELP)
+ end.
update_functions_view(Funcs, LCtrl) ->
wxListCtrl:deleteAllItems(LCtrl),
- wx:foldl(fun(#tpattern{fa=FA, ms=#match_spec{str=Ms}}, Row) ->
+ wx:foldl(fun(#tpattern{m=M, fa=FA, ms=#match_spec{str=Ms}}, Row) ->
_Item = wxListCtrl:insertItem(LCtrl, Row, ""),
?EVEN(Row) andalso wxListCtrl:setItemBackgroundColour(LCtrl, Row, ?BG_EVEN),
- wxListCtrl:setItem(LCtrl, Row, 0, observer_lib:to_str({func,FA})),
+ FuncStr =
+ case M of
+ 'Events' ->
+ observer_lib:to_str(FA);
+ _ ->
+ observer_lib:to_str({func,FA})
+ end,
+ wxListCtrl:setItem(LCtrl, Row, 0, FuncStr),
wxListCtrl:setItem(LCtrl, Row, 1, Ms),
Row+1
end, 0, Funcs).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-merge_pids([N1=#tpid{pid=new}|Ns], [N2=#tpid{pid=new}|Old]) ->
- {Pids, New, Changed} = merge_pids_1(Ns,Old),
- {[N1|Pids], New, [{N2,N2}|Changed]};
-merge_pids([N1=#tpid{pid=new}|Ns], Old) ->
- {Pids, New, Changed} = merge_pids_1(Ns,Old),
- {[N1|Pids], [N1|New], Changed};
-merge_pids(Ns, [N2=#tpid{pid=new}|Old]) ->
- {Pids, New, Changed} = merge_pids_1(Ns,Old),
- {[N2|Pids], New, Changed};
-merge_pids(New, Old) ->
- merge_pids_1(New, Old).
-
-merge_pids_1(New, Old) ->
- merge(lists:sort(New), Old, #tpid.pid, [], [], []).
+%% Trace items are processes and ports
+merge_trace_items([N1=#titem{id=NewP}|Ns], [N2=#titem{id=NewP}|Old])
+ when NewP==new_processes; NewP==new_ports ->
+ {Ids, New, Changed} = merge_trace_items_1(Ns,Old),
+ {[N1|Ids], New, [{N2,N2}|Changed]};
+merge_trace_items([N1=#titem{id=NewP}|Ns], Old)
+ when NewP==new_processes; NewP==new_ports ->
+ {Ids, New, Changed} = merge_trace_items_1(Ns,Old),
+ {[N1|Ids], [N1|New], Changed};
+merge_trace_items(Ns, [N2=#titem{id=NewP}|Old])
+ when NewP==new_processes; NewP==new_ports ->
+ {Ids, New, Changed} = merge_trace_items_1(Ns,Old),
+ {[N2|Ids], New, Changed};
+merge_trace_items(New, Old) ->
+ merge_trace_items_1(New, Old).
+
+merge_trace_items_1(New, Old) ->
+ merge(lists:sort(New), Old, #titem.id, [], [], []).
merge_patterns(New, Old) ->
merge(lists:sort(New), Old, #tpattern.fa, [], [], []).
@@ -676,10 +987,12 @@ create_logwindow(Parent, true) ->
wxFrame:show(LogWin),
{LogWin, Text}.
-setup_ttb(TPs, TPids) ->
+setup_ttb(TPs, TPids, TPorts) ->
_R1 = [setup_tps(FTP, []) || {_, FTP} <- TPs],
- _R2 = [ttb:p(Pid, dbg_flags(Flags)) || #tpid{pid=Pid, opts=Flags} <- TPids],
- [#tpid{pid=_Pid, opts=_Flags}|_] = TPids,
+ _R2 = [ttb:p(Pid, dbg_flags(proc,Flags)) ||
+ #titem{id=Pid, opts=Flags} <- TPids],
+ _R3 = [ttb:p(Port, dbg_flags(port,Flags)) ||
+ #titem{id=Port, opts=Flags} <- TPorts],
ok.
%% Sigh order is important
@@ -695,20 +1008,24 @@ setup_tps([First|Rest], Prev) ->
setup_tps([], Prev) ->
[setup_tp(TP) || TP <- lists:reverse(Prev)].
+setup_tp(#tpattern{m='Events',fa=Event, ms=#match_spec{term=Ms}}) ->
+ ttb:tpe(Event,Ms);
setup_tp(#tpattern{m=M,fa={F,A}, ms=#match_spec{term=Ms}}) ->
ttb:tpl(M,F,A,Ms).
-dbg_flags(Flags) ->
- [dbg_flag(Flag) || Flag <- Flags].
+dbg_flags(Type,Flags) ->
+ [dbg_flag(Type,Flag) || Flag <- Flags].
-dbg_flag(send) -> s;
-dbg_flag('receive') -> r;
-dbg_flag(functions) -> c;
-dbg_flag(on_spawn) -> sos;
-dbg_flag(on_link) -> sol;
-dbg_flag(on_first_spawn) -> sofs;
-dbg_flag(on_first_link) -> sofl;
-dbg_flag(events) -> p.
+dbg_flag(_,send) -> s;
+dbg_flag(_,'receive') -> r;
+dbg_flag(proc,functions) -> c;
+dbg_flag(proc,on_spawn) -> sos;
+dbg_flag(proc,on_link) -> sol;
+dbg_flag(proc,on_first_spawn) -> sofs;
+dbg_flag(proc,on_first_link) -> sofl;
+dbg_flag(proc,events) -> p;
+dbg_flag(port,events) -> ports;
+dbg_flag(_,Flag) -> Flag.
textformat(Trace) when element(1, Trace) == trace_ts, tuple_size(Trace) >= 4 ->
format_trace(Trace, tuple_size(Trace)-1, element(tuple_size(Trace),Trace));
@@ -784,23 +1101,28 @@ ftup(Trace, Index, Size) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-write_file(Frame, Filename, TraceOps, MatchSpecs, Output, TPs) ->
- FormatMS = fun(#match_spec{name=Id, term=T, func=F}) ->
- io_lib:format("[{name,\"~s\"}, {term, ~w}, {func, \"~s\"}]",
- [Id, T, F])
- end,
- FormatTP = fun({Module, FTPs}) ->
- List = format_ftp(FTPs, FormatMS),
- io_lib:format("{tp, ~w, [~s]}.~n",[Module, List])
+write_file(Frame, Filename, ProcFlags, PortFlags, MatchSpecs, Output, TPs) ->
+ MSToList = fun(#match_spec{name=Id, term=T, func=F}) ->
+ [{name,Id},{term,T},{func,F}]
end,
+ MSTermList = [{ms,Key,[MSToList(MS) || MS <- MSs]} ||
+ {Key,MSs} <- MatchSpecs],
+ TPToTuple = fun(#tpattern{fa={F,A}, ms=Ms}) ->
+ {F,A,MSToList(Ms)}
+ end,
+ ModuleTermList = [{tp, Module, [TPToTuple(FTP) || FTP <- FTPs]} ||
+ {Module,FTPs} <- TPs],
+
Str =
["%%%\n%%% This file is generated by Observer\n",
"%%%\n%%% DO NOT EDIT!\n%%%\n",
- [["{ms, ", FormatMS(Ms), "}.\n"] || Ms <- MatchSpecs],
- "{traceopts, ", io_lib:format("~w",[TraceOps]) ,"}.\n",
- "{output, ", io_lib:format("~w",[Output]) ,"}.\n",
- [FormatTP(TP) || TP <- TPs]
+ [io_lib:format("~p.~n",[MSTerm]) || MSTerm <- MSTermList],
+ io_lib:format("~p.~n",[{procflags,ProcFlags}]),
+ io_lib:format("~p.~n",[{portflags,PortFlags}]),
+ io_lib:format("~p.~n",[{output,Output}]),
+ [io_lib:format("~p.~n",[ModuleTerm]) || ModuleTerm <- ModuleTermList]
],
+
case file:write_file(Filename, list_to_binary(Str)) of
ok ->
success;
@@ -809,38 +1131,66 @@ write_file(Frame, Filename, TraceOps, MatchSpecs, Output, TPs) ->
observer_wx:create_txt_dialog(Frame, FailMsg, "Error", ?wxICON_ERROR)
end.
-format_ftp([#tpattern{fa={F,A}, ms=Ms}], FormatMS) ->
- io_lib:format("{~w, ~w, ~s}", [F,A,FormatMS(Ms)]);
-format_ftp([#tpattern{fa={F,A}, ms=Ms}|Rest], FormatMS) ->
- [io_lib:format("{~w, ~w, ~s},~n ", [F,A,FormatMS(Ms)]),
- format_ftp(Rest, FormatMS)].
-
-read_settings(Filename, #state{match_specs=Ms0, def_trace_opts=TO0} = State) ->
+read_settings(Filename, #state{match_specs=Ms0, def_proc_flags=ProcFs0, def_port_flags=PortFs0} = State) ->
case file:consult(Filename) of
{ok, Terms} ->
- Ms = lists:usort(Ms0 ++ [parse_ms(MsList) || {ms, MsList} <- Terms]),
- TOs = lists:usort(TO0 ++ proplists:get_value(traceopts, Terms, [])),
+ Ms = parse_ms(Terms, Ms0),
+ ProcFs1 = proplists:get_value(procflags, Terms, []) ++
+ proplists:get_value(traceopts, Terms, []), % for backwards comp.
+ ProcFs = lists:usort(ProcFs0 ++ ProcFs1),
+ PortFs = lists:usort(PortFs0 ++
+ proplists:get_value(portflags, Terms, [])),
Out = proplists:get_value(output, Terms, []),
lists:foldl(fun parse_tp/2,
- State#state{match_specs=Ms, def_trace_opts=TOs, output=Out},
+ State#state{match_specs=Ms, def_proc_flags=ProcFs,
+ def_port_flags=PortFs, output=Out},
Terms);
{error, _} ->
- observer_wx:create_txt_dialog(State#state.panel, "Could not load settings",
+ observer_wx:create_txt_dialog(State#state.panel,
+ "Could not load settings",
"Error", ?wxICON_ERROR),
State
end.
-parse_ms(Opts) ->
- Name = proplists:get_value(name, Opts, "TracePattern"),
- Term = proplists:get_value(term, Opts, [{'_',[],[ok]}]),
- FunStr = proplists:get_value(term, Opts, "fun(_) -> ok end"),
- make_ms(Name, Term, FunStr).
+parse_ms(Terms, OldMSs) ->
+ MSs =
+ case [{Key,[make_ms(MS) || MS <- MSs]} || {ms,Key,MSs} <- Terms] of
+ [] ->
+ case [make_ms(MS) || {ms,MS} <- Terms] of
+ [] ->
+ [];
+ FuncMSs -> % for backwards compatibility
+ [{funcs,FuncMSs}]
+ end;
+ KeyMSs ->
+ KeyMSs
+ end,
+ parse_ms_1(MSs, dict:from_list(OldMSs)).
+
+parse_ms_1([{Key,MSs} | T], Dict) ->
+ parse_ms_1(T, dict:append_list(Key,MSs,Dict));
+parse_ms_1([],Dict) ->
+ [{Key,rm_dups(MSs,[])} || {Key,MSs} <- dict:to_list(Dict)].
+
+rm_dups([H|T],Acc) ->
+ case lists:member(H,Acc) of
+ true ->
+ rm_dups(T,Acc);
+ false ->
+ rm_dups(T,[H|Acc])
+ end;
+rm_dups([],Acc) ->
+ lists:reverse(Acc).
+
+make_ms(MS) ->
+ [{func,FunStr},{name,Name},{term,Term}] = lists:keysort(1,MS),
+ make_ms(Name,Term,FunStr).
make_ms(Name, Term, FunStr) ->
#match_spec{name=Name, term=Term, str=io_lib:format("~w", Term), func = FunStr}.
parse_tp({tp, Mod, FAs}, State) ->
- Patterns = [#tpattern{m=Mod,fa={F,A}, ms=parse_ms(List)} ||
+ Patterns = [#tpattern{m=Mod,fa={F,A}, ms=make_ms(List)} ||
{F,A,List} <- FAs],
do_add_patterns({Mod, Patterns}, State);
parse_tp(_, State) ->
@@ -866,3 +1216,9 @@ get_indecies(Rest = [_|_], I, [_|T]) ->
get_indecies(Rest, I+1, T);
get_indecies(_, _, _) ->
[].
+
+create_right_click_menu(Panel,Menus) ->
+ Menu = wxMenu:new(),
+ [wxMenu:append(Menu,Id,Str) || {Id,Str} <- Menus],
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu).
diff --git a/lib/observer/src/observer_traceoptions_wx.erl b/lib/observer/src/observer_traceoptions_wx.erl
index 9ba9b72b6f..285c298c4b 100644
--- a/lib/observer/src/observer_traceoptions_wx.erl
+++ b/lib/observer/src/observer_traceoptions_wx.erl
@@ -22,8 +22,8 @@
-include_lib("wx/include/wx.hrl").
-include("observer_defs.hrl").
--export([process_trace/2, trace_pattern/4, select_nodes/2,
- output/2, select_matchspec/3]).
+-export([process_trace/2, port_trace/2, trace_pattern/4, select_nodes/2,
+ output/2, select_matchspec/4]).
process_trace(Parent, Default) ->
Dialog = wxDialog:new(Parent, ?wxID_ANY, "Process Options",
@@ -36,12 +36,20 @@ process_trace(Parent, Default) ->
FuncBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace function call", []),
check_box(FuncBox, lists:member(functions, Default)),
+ ArityBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace arity instead of arguments", []),
+ check_box(ArityBox, lists:member(functions, Default)),
SendBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace send message", []),
check_box(SendBox, lists:member(send, Default)),
RecBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace receive message", []),
check_box(RecBox, lists:member('receive', Default)),
EventBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace process events", []),
check_box(EventBox, lists:member(events, Default)),
+ SchedBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace scheduling of processes", []),
+ check_box(SchedBox, lists:member(running_procs, Default)),
+ ExitBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace scheduling of exiting processes", []),
+ check_box(ExitBox, lists:member(exiting, Default)),
+ GCBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace garbage collections", []),
+ check_box(GCBox, lists:member(garbage_collection, Default)),
{SpawnBox, SpwnAllRadio, SpwnFirstRadio} =
optionpage_top_right(Panel, RightSz, [{flag, ?wxBOTTOM},{border, 5}], "spawn"),
@@ -57,7 +65,7 @@ process_trace(Parent, Default) ->
{Radio, Opt} <- [{SpwnAllRadio, on_spawn}, {SpwnFirstRadio, on_first_spawn},
{LinkAllRadio, on_link}, {LinkFirstRadio, on_first_link}]],
- [wxSizer:add(LeftSz, CheckBox, []) || CheckBox <- [FuncBox,SendBox,RecBox,EventBox]],
+ [wxSizer:add(LeftSz, CheckBox, []) || CheckBox <- [FuncBox,ArityBox,SendBox,RecBox,EventBox,SchedBox,ExitBox,GCBox]],
wxSizer:add(LeftSz, 150, -1),
wxSizer:add(PanelSz, LeftSz, [{flag, ?wxEXPAND}, {proportion,1}]),
@@ -80,7 +88,9 @@ process_trace(Parent, Default) ->
case wxDialog:showModal(Dialog) of
?wxID_OK ->
All = [{SendBox, send}, {RecBox, 'receive'},
- {FuncBox, functions}, {EventBox, events},
+ {FuncBox, functions}, {ArityBox, arity},
+ {EventBox, events}, {SchedBox, running_procs},
+ {ExitBox, exiting}, {GCBox, garbage_collection},
{{SpawnBox, SpwnAllRadio}, on_spawn},
{{SpawnBox,SpwnFirstRadio}, on_first_spawn},
{{LinkBox, LinkAllRadio}, on_link},
@@ -98,12 +108,57 @@ process_trace(Parent, Default) ->
throw(cancel)
end.
+port_trace(Parent, Default) ->
+ Dialog = wxDialog:new(Parent, ?wxID_ANY, "Port Options",
+ [{style, ?wxDEFAULT_DIALOG_STYLE bor ?wxRESIZE_BORDER}]),
+ Panel = wxPanel:new(Dialog),
+ MainSz = wxBoxSizer:new(?wxVERTICAL),
+ OptsSz = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label, "Tracing options"}]),
+
+ SendBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace send message", []),
+ check_box(SendBox, lists:member(send, Default)),
+ RecBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace receive message", []),
+ check_box(RecBox, lists:member('receive', Default)),
+ EventBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace port events", []),
+ check_box(EventBox, lists:member(events, Default)),
+ SchedBox = wxCheckBox:new(Panel, ?wxID_ANY, "Trace scheduling of ports", []),
+ check_box(SchedBox, lists:member(running_ports, Default)),
+
+ [wxSizer:add(OptsSz, CheckBox, []) || CheckBox <- [SendBox,RecBox,EventBox,SchedBox]],
+ wxSizer:add(OptsSz, 150, -1),
+
+ wxPanel:setSizer(Panel, OptsSz),
+ wxSizer:add(MainSz, Panel, [{flag, ?wxEXPAND}, {proportion,1}]),
+ Buttons = wxDialog:createButtonSizer(Dialog, ?wxOK bor ?wxCANCEL),
+ wxSizer:add(MainSz, Buttons, [{flag, ?wxEXPAND bor ?wxALL}, {border, 5}]),
+ wxWindow:setSizerAndFit(Dialog, MainSz),
+ wxSizer:setSizeHints(MainSz, Dialog),
+
+ case wxDialog:showModal(Dialog) of
+ ?wxID_OK ->
+ All = [{SendBox, send}, {RecBox, 'receive'},
+ {EventBox, events}, {SchedBox, running_ports}],
+ Opts = [Id || {Tick, Id} <- All, wxCheckBox:getValue(Tick)],
+ wxDialog:destroy(Dialog),
+ lists:reverse(Opts);
+ ?wxID_CANCEL ->
+ wxDialog:destroy(Dialog),
+ throw(cancel)
+ end.
+
trace_pattern(ParentPid, Parent, Node, MatchSpecs) ->
try
- Module = module_selector(Parent, Node),
- MFAs = function_selector(Parent, Node, Module),
- MatchSpec = select_matchspec(ParentPid, Parent, MatchSpecs),
- {Module, [#tpattern{m=M,fa={F,A},ms=MatchSpec} || {M,F,A} <- MFAs]}
+ {Module,MFAs,MatchSpec} =
+ case module_selector(Parent, Node) of
+ {'$trace_event',Event} ->
+ MS = select_matchspec(ParentPid, Parent, MatchSpecs, Event),
+ {'Events',[{'Events',Event}],MS};
+ Mod ->
+ MFAs0 = function_selector(Parent, Node, Mod),
+ MS = select_matchspec(ParentPid, Parent, MatchSpecs, funcs),
+ {Mod,MFAs0,MS}
+ end,
+ {Module, [#tpattern{m=M,fa=FA,ms=MatchSpec} || {M,FA} <- MFAs]}
catch cancel -> cancel
end.
@@ -112,7 +167,7 @@ select_nodes(Parent, Nodes) ->
check_selector(Parent, Choices).
module_selector(Parent, Node) ->
- Dialog = wxDialog:new(Parent, ?wxID_ANY, "Select Module",
+ Dialog = wxDialog:new(Parent, ?wxID_ANY, "Select Module or Event",
[{style, ?wxDEFAULT_DIALOG_STYLE bor ?wxRESIZE_BORDER},
{size, {400, 400}}]),
Panel = wxPanel:new(Dialog),
@@ -136,7 +191,9 @@ module_selector(Parent, Node) ->
wxWindow:setFocus(TxtCtrl),
%% init data
Modules = get_modules(Node),
- AllModules = [{atom_to_list(X), X} || X <- Modules],
+ Events = [{"Messages sent",{'$trace_event',send}},
+ {"Messages received",{'$trace_event','receive'}}],
+ AllModules = Events ++ [{atom_to_list(X), X} || X <- Modules],
filter_listbox_data("", AllModules, ListBox),
wxTextCtrl:connect(TxtCtrl, command_text_updated,
[{callback, fun(#wx{event=#wxCommand{cmdString=Input}}, _) ->
@@ -174,9 +231,9 @@ function_selector(Parent, Node, Module) ->
not(erl_internal:guard_bif(Name, Arity))]),
ParsedChoices = parse_function_names(Choices),
case check_selector(Parent, ParsedChoices) of
- [] -> [{Module, '_', '_'}];
+ [] -> [{Module, {'_', '_'}}];
FAs ->
- [{Module, F, A} || {F,A} <- FAs]
+ [{Module, {F, A}} || {F,A} <- FAs]
end.
check_selector(Parent, ParsedChoices) ->
@@ -268,7 +325,12 @@ get_checked(ListBox, Acc) ->
lists:reverse(Acc)
end.
-select_matchspec(Pid, Parent, MatchSpecs) ->
+select_matchspec(Pid, Parent, AllMatchSpecs, Key) ->
+ {MatchSpecs,RestMS} =
+ case lists:keytake(Key,1,AllMatchSpecs) of
+ {value,{Key,MSs0},Rest} -> {MSs0,Rest};
+ false -> {[],AllMatchSpecs}
+ end,
Dialog = wxDialog:new(Parent, ?wxID_ANY, "Trace Match Specifications",
[{style, ?wxDEFAULT_DIALOG_STYLE bor ?wxRESIZE_BORDER},
{size, {400, 400}}]),
@@ -313,8 +375,12 @@ select_matchspec(Pid, Parent, MatchSpecs) ->
filter_listbox_data("", Choices, ListBox),
Add = fun(_,_) ->
- case edit_ms(TextCtrl, new, Parent) of
- Ms = #match_spec{} -> add_and_select(-1, Ms, ListBox);
+ case edit_ms(TextCtrl, new, Dialog) of
+ Ms = #match_spec{} ->
+ add_and_select(-1, Ms, ListBox),
+ wxWindow:enable(OkButt),
+ wxWindow:enable(EditMsBtn),
+ wxWindow:enable(DelMsBtn);
Else -> Else
end
end,
@@ -323,8 +389,12 @@ select_matchspec(Pid, Parent, MatchSpecs) ->
case SelId >= 0 of
true ->
#match_spec{name=Name} = wxListBox:getClientData(ListBox,SelId),
- case edit_ms(TextCtrl, Name, Parent) of
- Ms = #match_spec{} -> add_and_select(SelId, Ms, ListBox);
+ case edit_ms(TextCtrl, Name, Dialog) of
+ Ms = #match_spec{} ->
+ add_and_select(SelId, Ms, ListBox),
+ wxWindow:enable(OkButt),
+ wxWindow:enable(EditMsBtn),
+ wxWindow:enable(DelMsBtn);
Else -> Else
end;
false ->
@@ -367,7 +437,7 @@ select_matchspec(Pid, Parent, MatchSpecs) ->
Count = wxListBox:getCount(ListBox),
MSs = [wxListBox:getClientData(ListBox, Id) ||
Id <- lists:seq(0, Count-1)],
- Pid ! {update_ms, MSs},
+ Pid ! {update_ms, [{Key,MSs}|RestMS]},
MS = lists:nth(SelId+1, MSs),
wxDialog:destroy(Dialog),
MS;
diff --git a/lib/observer/src/observer_tv_wx.erl b/lib/observer/src/observer_tv_wx.erl
index 1860f2f469..59f6443551 100644
--- a/lib/observer/src/observer_tv_wx.erl
+++ b/lib/observer/src/observer_tv_wx.erl
@@ -37,7 +37,8 @@
-define(ID_UNREADABLE, 405).
-define(ID_SYSTEM_TABLES, 406).
-define(ID_TABLE_INFO, 407).
-
+-define(ID_SHOW_TABLE, 408).
+
-record(opt, {type=ets,
sys_hidden=true,
unread_hidden=true,
@@ -49,6 +50,7 @@
{
parent,
grid,
+ panel,
node=node(),
opt=#opt{},
selected,
@@ -86,12 +88,13 @@ init([Notebook, Parent]) ->
wxListItem:destroy(Li),
wxListCtrl:connect(Grid, command_list_item_activated),
+ wxListCtrl:connect(Grid, command_list_item_right_click),
wxListCtrl:connect(Grid, command_list_item_selected),
wxListCtrl:connect(Grid, command_list_col_click),
wxListCtrl:connect(Grid, size, [{skip, true}]),
wxWindow:setFocus(Grid),
- {Panel, #state{grid=Grid, parent=Parent, timer={false, 10}}}.
+ {Panel, #state{grid=Grid, parent=Parent, panel=Panel, timer={false, 10}}}.
handle_event(#wx{id=?ID_REFRESH},
State = #state{node=Node, grid=Grid, opt=Opt}) ->
@@ -145,6 +148,16 @@ handle_event(#wx{event=#wxList{type=command_list_item_activated,
end,
{noreply, State};
+handle_event(#wx{event=#wxList{type=command_list_item_right_click}},
+ State=#state{panel=Panel}) ->
+
+ Menu = wxMenu:new(),
+ wxMenu:append(Menu, ?ID_TABLE_INFO, "Table info"),
+ wxMenu:append(Menu, ?ID_SHOW_TABLE, "Show Table Content"),
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu),
+ {noreply, State};
+
handle_event(#wx{event=#wxList{type=command_list_item_selected, itemIndex=Index}},
State) ->
{noreply, State#state{selected=Index}};
@@ -160,6 +173,22 @@ handle_event(#wx{id=?ID_TABLE_INFO},
{noreply, State}
end;
+handle_event(#wx{id=?ID_SHOW_TABLE},
+ State=#state{grid=Grid, node=Node, opt=#opt{type=Type}, tabs=Tabs, selected=Sel}) ->
+ case Sel of
+ undefined ->
+ {noreply, State};
+ R when is_integer(R) ->
+ Table = lists:nth(Sel+1, Tabs),
+ case Table#tab.protection of
+ private ->
+ self() ! {error, "Table has 'private' protection and can not be read"};
+ _ ->
+ observer_tv_table:start_link(Grid, [{node,Node}, {type,Type}, {table,Table}])
+ end,
+ {noreply, State}
+ end;
+
handle_event(#wx{id=?ID_REFRESH_INTERVAL},
State = #state{grid=Grid, timer=Timer0}) ->
Timer = observer_lib:interval_dialog(Grid, Timer0, 10, 5*60),
@@ -315,6 +344,7 @@ display_table_info(Parent0, Node, Source, Table) ->
{_, Sizer, _} = observer_lib:display_info(Frame, [IdInfo,Settings,Memory]),
wxSizer:setSizeHints(Sizer, Frame),
+ wxWindow:setMinSize(Frame, {300, -1}),
wxFrame:center(Frame),
wxFrame:show(Frame).
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 30bd4043e4..301bb4b32f 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -21,8 +21,8 @@
-behaviour(wx_object).
-export([start/0, stop/0]).
--export([create_menus/2, get_attrib/1, get_tracer/0, set_status/1,
- create_txt_dialog/4, try_rpc/4, return_to_localnode/2]).
+-export([create_menus/2, get_attrib/1, get_tracer/0, get_active_node/0,
+ set_status/1, create_txt_dialog/4, try_rpc/4, return_to_localnode/2]).
-export([init/1, handle_event/2, handle_cast/2, terminate/2, code_change/3,
handle_call/3, handle_info/2, check_page_title/1]).
@@ -55,6 +55,7 @@
notebook,
main_panel,
pro_panel,
+ port_panel,
tv_panel,
sys_panel,
trace_panel,
@@ -90,6 +91,9 @@ set_status(What) ->
get_tracer() ->
wx_object:call(observer, get_tracer).
+get_active_node() ->
+ wx_object:call(observer, get_active_node).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
init(_Args) ->
@@ -165,6 +169,10 @@ setup(#state{frame = Frame} = State) ->
ProPanel = observer_pro_wx:start_link(Notebook, self()),
wxNotebook:addPage(Notebook, ProPanel, "Processes", []),
+ %% Port Panel
+ PortPanel = observer_port_wx:start_link(Notebook, self()),
+ wxNotebook:addPage(Notebook, PortPanel, "Ports", []),
+
%% Table Viewer Panel
TVPanel = observer_tv_wx:start_link(Notebook, self()),
wxNotebook:addPage(Notebook, TVPanel, "Table Viewer", []),
@@ -188,6 +196,7 @@ setup(#state{frame = Frame} = State) ->
status_bar = StatusBar,
sys_panel = SysPanel,
pro_panel = ProPanel,
+ port_panel = PortPanel,
tv_panel = TVPanel,
trace_panel = TracePanel,
app_panel = AppPanel,
@@ -379,6 +388,9 @@ handle_call({get_attrib, Attrib}, _From, State) ->
handle_call(get_tracer, _From, State=#state{trace_panel=TraceP}) ->
{reply, TraceP, State};
+handle_call(get_active_node, _From, State=#state{node=Node}) ->
+ {reply, Node, State};
+
handle_call(stop, From, State) ->
stop_servers(State),
{noreply, State#state{reply_to=From}};
@@ -406,16 +418,21 @@ handle_info({nodedown, Node},
create_txt_dialog(Frame, Msg, "Node down", ?wxICON_EXCLAMATION),
{noreply, State3};
-handle_info({open_link, Pid0}, State = #state{pro_panel=ProcViewer, frame=Frame}) ->
- Pid = case Pid0 of
- [_|_] -> try list_to_pid(Pid0) catch _:_ -> Pid0 end;
- _ -> Pid0
+handle_info({open_link, Id0}, State = #state{pro_panel=ProcViewer,
+ port_panel=PortViewer,
+ frame=Frame}) ->
+ Id = case Id0 of
+ [_|_] -> try list_to_pid(Id0) catch _:_ -> Id0 end;
+ _ -> Id0
end,
%% Forward to process tab
- case is_pid(Pid) of
- true -> wx_object:get_pid(ProcViewer) ! {procinfo_open, Pid};
- false ->
- Msg = io_lib:format("Information about ~p is not available or implemented",[Pid]),
+ case Id of
+ Pid when is_pid(Pid) ->
+ wx_object:get_pid(ProcViewer) ! {procinfo_open, Pid};
+ "#Port" ++ _ = Port ->
+ wx_object:get_pid(PortViewer) ! {portinfo_open, Port};
+ _ ->
+ Msg = io_lib:format("Information about ~p is not available or implemented",[Id]),
Info = wxMessageDialog:new(Frame, Msg),
wxMessageDialog:showModal(Info),
wxMessageDialog:destroy(Info)
@@ -541,10 +558,11 @@ check_page_title(Notebook) ->
get_active_pid(#state{notebook=Notebook, pro_panel=Pro, sys_panel=Sys,
tv_panel=Tv, trace_panel=Trace, app_panel=App,
- perf_panel=Perf, allc_panel=Alloc
+ perf_panel=Perf, allc_panel=Alloc, port_panel=Port
}) ->
Panel = case check_page_title(Notebook) of
"Processes" -> Pro;
+ "Ports" -> Port;
"System" -> Sys;
"Table Viewer" -> Tv;
?TRACE_STR -> Trace;
diff --git a/lib/observer/src/ttb.erl b/lib/observer/src/ttb.erl
index 4d6eb3ba8d..ac6c4572eb 100644
--- a/lib/observer/src/ttb.erl
+++ b/lib/observer/src/ttb.erl
@@ -25,7 +25,8 @@
-export([tracer/0,tracer/1,tracer/2,p/2,stop/0,stop/1,start_trace/4]).
-export([get_et_handler/0]).
-export([tp/2, tp/3, tp/4, ctp/0, ctp/1, ctp/2, ctp/3, tpl/2, tpl/3, tpl/4,
- ctpl/0, ctpl/1, ctpl/2, ctpl/3, ctpg/0, ctpg/1, ctpg/2, ctpg/3]).
+ ctpl/0, ctpl/1, ctpl/2, ctpl/3, ctpg/0, ctpg/1, ctpg/2, ctpg/3,
+ tpe/2, ctpe/1]).
-export([seq_trigger_ms/0,seq_trigger_ms/1]).
-export([write_trace_info/2]).
-export([write_config/2,write_config/3,run_config/1,run_config/2,list_config/1]).
@@ -397,16 +398,16 @@ arg_list([A1|A],Acc) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Set trace flags on processes
-p(Procs0,Flags0) ->
+p(ProcsPorts0,Flags0) ->
ensure_no_overloaded_nodes(),
- store(p,[Procs0,Flags0]),
- no_store_p(Procs0,Flags0).
-no_store_p(Procs0,Flags0) ->
+ store(p,[ProcsPorts0,Flags0]),
+ no_store_p(ProcsPorts0,Flags0).
+no_store_p(ProcsPorts0,Flags0) ->
case transform_flags(to_list(Flags0)) of
{error,Reason} ->
{error,Reason};
Flags ->
- Procs = procs(Procs0),
+ ProcsPorts = procs_ports(ProcsPorts0),
case lists:foldl(fun(P,{PMatched,Ps}) -> case dbg:p(P,Flags) of
{ok,Matched} ->
{[{P,Matched}|PMatched],[P|Ps]};
@@ -414,7 +415,7 @@ no_store_p(Procs0,Flags0) ->
display_warning(P,Reason),
{PMatched,Ps}
end
- end,{[],[]},Procs) of
+ end,{[],[]},ProcsPorts) of
{[],[]} -> {error, no_match};
{SuccMatched,Succ} ->
no_store_write_trace_info(flags,{Succ,Flags}),
@@ -429,20 +430,22 @@ transform_flags(Flags) ->
dbg:transform_flags([timestamp | Flags]).
-procs(Procs) when is_list(Procs) ->
- lists:foldl(fun(P,Acc) -> proc(P)++Acc end,[],Procs);
-procs(Proc) ->
- proc(Proc).
+procs_ports(Procs) when is_list(Procs) ->
+ lists:foldl(fun(P,Acc) -> proc_port(P)++Acc end,[],Procs);
+procs_ports(Proc) ->
+ proc_port(Proc).
-proc(Procs) when Procs=:=all; Procs=:=ports; Procs=:=processes;
- Procs=:=existing; Procs=:=existing_ports; Procs=:=existing_processes;
- Procs=:=new; Procs=:=new_ports; Procs=:=new_processes ->
- [Procs];
-proc(Name) when is_atom(Name) ->
+proc_port(P) when P=:=all; P=:=ports; P=:=processes;
+ P=:=existing; P=:=existing_ports; P=:=existing_processes;
+ P=:=new; P=:=new_ports; P=:=new_processes ->
+ [P];
+proc_port(Name) when is_atom(Name) ->
[Name]; % can be registered on this node or other node
-proc(Pid) when is_pid(Pid) ->
+proc_port(Pid) when is_pid(Pid) ->
[Pid];
-proc({global,Name}) ->
+proc_port(Port) when is_port(Port) ->
+ [Port];
+proc_port({global,Name}) ->
case global:whereis_name(Name) of
Pid when is_pid(Pid) ->
[Pid];
@@ -479,6 +482,11 @@ tpl(A,B,C,D) ->
store(tpl,[A,B,C,ms(D)]),
dbg:tpl(A,B,C,ms(D)).
+tpe(A,B) ->
+ ensure_no_overloaded_nodes(),
+ store(tpe,[A,ms(B)]),
+ dbg:tpe(A,ms(B)).
+
ctp() ->
store(ctp,[]),
dbg:ctp().
@@ -518,6 +526,10 @@ ctpg(A,B,C) ->
store(ctpg,[A,B,C]),
dbg:ctpg(A,B,C).
+ctpe(A) ->
+ store(ctpe,[A]),
+ dbg:ctpe(A).
+
ms(return) ->
[{'_',[],[{return_trace}]}];
ms(caller) ->
@@ -1298,6 +1310,9 @@ ip_to_file(Trace, {shell_only, Fun} = State) ->
ip_to_file(Trace,{{file,File}, ShellOutput}) ->
Fun = dbg:trace_port(file,File), %File can be a filename or a wrap spec
Port = Fun(),
+ %% Just in case this is on the traced node,
+ %% make sure the port is not traced.
+ p(Port,clear),
%% Store the port so it can be properly closed
?MODULE ! {ip_to_file_trace_port, Port, self()},
receive {?MODULE,ok} -> ok end,
diff --git a/lib/observer/test/observer_SUITE.erl b/lib/observer/test/observer_SUITE.erl
index ae8111dcd6..4c882ad951 100644
--- a/lib/observer/test/observer_SUITE.erl
+++ b/lib/observer/test/observer_SUITE.erl
@@ -171,6 +171,7 @@ test_page("Applications" ++ _, _Window) ->
test_page("Processes" ++ _, _Window) ->
timer:sleep(500), %% Give it time to refresh
Active = get_active(),
+ Active ! refresh_interval,
ChangeSort = fun(N) ->
FakeEv = #wx{event=#wxList{type=command_list_col_click, col=N}},
Active ! FakeEv,
@@ -184,7 +185,23 @@ test_page("Processes" ++ _, _Window) ->
timer:sleep(1000), %% Give it time to refresh
ok;
-test_page(_Title = "Table" ++ _, _Window) ->
+test_page("Ports" ++ _, _Window) ->
+ timer:sleep(500), %% Give it time to refresh
+ Active = get_active(),
+ Active ! refresh_interval,
+ ChangeSort = fun(N) ->
+ FakeEv = #wx{event=#wxList{type=command_list_col_click, col=N}},
+ Active ! FakeEv,
+ timer:sleep(200)
+ end,
+ [ChangeSort(N) || N <- lists:seq(1,4) ++ [0]],
+ Activate = #wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=2}},
+ Active ! Activate,
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
+test_page("Table" ++ _, _Window) ->
Tables = [ets:new(list_to_atom("Test-" ++ [C]), [public]) || C <- lists:seq($A, $Z)],
Table = lists:nth(3, Tables),
ets:insert(Table, [{N,100-N} || N <- lists:seq(1,100)]),
@@ -208,6 +225,13 @@ test_page(_Title = "Table" ++ _, _Window) ->
timer:sleep(1000),
ok;
+test_page("Trace Overview" ++ _, _Window) ->
+ timer:sleep(500), %% Give it time to refresh
+ Active = get_active(),
+ Active ! refresh_interval,
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
test_page(Title, Window) ->
io:format("Page ~p: ~p~n", [Title, Window]),
%% Just let it display some info and hopefully it doesn't crash
diff --git a/lib/public_key/doc/src/Makefile b/lib/public_key/doc/src/Makefile
index f3db24afc9..5bdc5d4159 100644
--- a/lib/public_key/doc/src/Makefile
+++ b/lib/public_key/doc/src/Makefile
@@ -38,7 +38,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
XML_REF3_FILES = public_key.xml
-XML_REF6_FILES =
+XML_REF6_FILES = public_key_app.xml
XML_PART_FILES = part.xml part_notes.xml
XML_CHAPTER_FILES = \
@@ -50,7 +50,7 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
- $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+ $(XML_REF6_FILES) $(XML_PART_FILES) $(XML_CHAPTER_FILES)
GIF_FILES = note.gif
@@ -67,9 +67,11 @@ EXTRA_FILES = \
$(DEFAULT_GIF_FILES) \
$(DEFAULT_HTML_FILES) \
$(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
$(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
@@ -98,10 +100,11 @@ html: gifs $(HTML_REF_MAN_FILE)
clean clean_docs:
rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
+ rm -f $(MAN6DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
rm -f errs core *~
-man: $(MAN3_FILES)
+man: $(MAN3_FILES) $(MAN6_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
@@ -122,6 +125,8 @@ release_docs_spec: docs
$(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
$(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
$(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
+ $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
release_spec:
info:
diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml
index 04daee460f..1aa601dc55 100644
--- a/lib/public_key/doc/src/public_key.xml
+++ b/lib/public_key/doc/src/public_key.xml
@@ -34,40 +34,13 @@
<module>public_key</module>
<modulesummary>API module for public-key infrastructure.</modulesummary>
<description>
- <p>This module provides functions to handle public-key infrastructure. It can
- encode/decode different file formats (PEM, OpenSSH), sign and verify digital signatures,
- and validate certificate paths and certificate revocation lists.
+ <p>Provides functions to handle public-key infrastructure,
+ for details see
+ <seealso marker="public_key_app">public_key(6)</seealso>.
</p>
</description>
<section>
- <title>public_key</title>
-
- <list type="bulleted">
- <item> Public Key requires the Crypto and ASN1 applications,
- the latter as OTP R16 (hopefully the runtime dependency on ASN1 will
- be removed again in the future).</item>
-
- <item>Supports <url href="http://www.ietf.org/rfc/rfc5280.txt">RFC 5280 </url> -
- Internet X.509 Public-Key Infrastructure Certificate and Certificate Revocation List
- (CRL) Profile </item>
- <item>Supports <url href="http://www.ietf.org/rfc/rfc3447.txt"> PKCS-1 </url> -
- RSA Cryptography Standard </item>
- <item>Supports <url href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf"> DSS</url> -
- Digital Signature Standard (DSA - Digital Signature Algorithm)</item>
- <item>Supports
- <url href="http://www.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-3-diffie-hellman-key-agreement-standar.htm"> PKCS-3 </url> -
- Diffie-Hellman Key Agreement Standard </item>
- <item>Supports <url href="http://www.ietf.org/rfc/rfc2898.txt"> PKCS-5</url> -
- Password-Based Cryptography Standard </item>
- <item>Supports <url href="http://www.ietf.org/rfc/rfc5208.txt"> PKCS-8</url> -
- Private-Key Information Syntax Standard</item>
- <item>Supports <url href="http://www.ietf.org/rfc/rfc5967.txt"> PKCS-10</url> -
- Certification Request Syntax Standard</item>
- </list>
- </section>
-
- <section>
<title>DATA TYPES</title>
<note><p>All records used in this Reference Manual
diff --git a/lib/public_key/doc/src/public_key_app.xml b/lib/public_key/doc/src/public_key_app.xml
new file mode 100644
index 0000000000..1f87932b6c
--- /dev/null
+++ b/lib/public_key/doc/src/public_key_app.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE appref SYSTEM "appref.dtd">
+
+<appref>
+ <header>
+ <copyright>
+ <year>2016</year><year>2016</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ </legalnotice>
+
+ <title>public_key</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>public_key_app.sgml</file>
+ </header>
+ <app>public_key</app>
+ <appsummary>Provides functions to handle public-key infrastructure. </appsummary>
+ <description>
+
+ <p> Provides encode/decode of different file formats (PEM, OpenSSH),
+ digital signature and verification functions,
+ validation of certificate paths and certificate revocation lists (CRLs) and
+ other functions for handling of certificates, keys and CRLs.</p>
+
+ <list type="bulleted">
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc5280.txt">RFC 5280 </url> -
+ Internet X.509 Public-Key Infrastructure Certificate and Certificate Revocation List
+ (CRL) Profile. Certificate policies are currently not supported. </item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc3447.txt"> PKCS-1 </url> -
+ RSA Cryptography Standard </item>
+ <item>Supports <url href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf"> DSS</url> -
+ Digital Signature Standard (DSA - Digital Signature Algorithm)</item>
+ <item>Supports
+ <url href="http://www.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-3-diffie-hellman-key-agreement-standar.htm"> PKCS-3 </url> -
+ Diffie-Hellman Key Agreement Standard </item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc2898.txt"> PKCS-5</url> -
+ Password-Based Cryptography Standard </item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc5208.txt"> PKCS-8</url> -
+ Private-Key Information Syntax Standard</item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc5967.txt"> PKCS-10</url> -
+ Certification Request Syntax Standard</item>
+ </list>
+ </description>
+
+ <section>
+ <title>DEPENDENCIES</title>
+ <p>The <c>public_key</c> application uses the
+ Crypto application to preform cryptographic operations and the
+ ASN-1 application to handle PKIX-ASN-1 specifications, hence
+ these applications must be loaded for the <c>public_key</c> application to work.
+ In an embedded environment this means they must be started with
+ <c>application:start/[1,2]</c> before the <c>public_key</c> application is
+ started.</p>
+ </section>
+
+ <section>
+ <title>ERROR LOGGER AND EVENT HANDLERS</title>
+ <p> The <c>public_key</c> application is a library application
+ and does not use the error logger. The functions will either sucssed
+ or fail with a runtime error.
+ </p>
+ </section>
+
+ <section>
+ <title>SEE ALSO</title>
+ <p><seealso marker="kernel:application">application(3)</seealso></p>
+ </section>
+
+</appref>
diff --git a/lib/public_key/doc/src/ref_man.xml b/lib/public_key/doc/src/ref_man.xml
index 75c5374257..2bd1733dbc 100644
--- a/lib/public_key/doc/src/ref_man.xml
+++ b/lib/public_key/doc/src/ref_man.xml
@@ -36,6 +36,7 @@
from RFC 3280 (X.509 certificates) and parts of the PKCS standard.
</p>
</description>
+ <xi:include href="public_key_app.xml"/>
<xi:include href="public_key.xml"/>
</application>
diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl
index c5e6ffded5..f45f2c2e9a 100644
--- a/lib/public_key/src/pubkey_cert.erl
+++ b/lib/public_key/src/pubkey_cert.erl
@@ -547,7 +547,9 @@ cert_auth_key_id(#'AuthorityKeyIdentifier'{authorityCertIssuer =
{ok, {SerialNr, decode_general_name(AuthCertIssuer)}}.
decode_general_name([{directoryName, Issuer}]) ->
- normalize_general_name(Issuer).
+ normalize_general_name(Issuer);
+decode_general_name([{_, Issuer}]) ->
+ Issuer.
%% Strip all leading and trailing spaces and make
%% sure there is no double spaces in between.
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index 9c39c36be4..71a77efa2e 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -44,7 +44,7 @@ all() ->
encrypt_decrypt,
{group, sign_verify},
pkix, pkix_countryname, pkix_emailaddress, pkix_path_validation,
- pkix_iso_rsa_oid, pkix_iso_dsa_oid, pkix_crl].
+ pkix_iso_rsa_oid, pkix_iso_dsa_oid, pkix_crl, general_name].
groups() ->
[{pem_decode_encode, [], [dsa_pem, rsa_pem, ec_pem, encrypted_pem,
@@ -644,11 +644,10 @@ pkix(Config) when is_list(Config) ->
[{'AttributeTypeAndValue', {2,5,4,3},{printableString," erlang ca "}}]]},
VerifyStr = {rdnSequence,
[[{'AttributeTypeAndValue', {2,5,4,3},{printableString,"erlangca"}}],
- [{'AttributeTypeAndValue', {2,5,4,3},{printableString,"erlang ca"}}]]},
- VerifyStr = public_key:pkix_normalize_name(TestStr),
-
- ok.
-
+ [{'AttributeTypeAndValue', {2,5,4,3},{printableString,"erlang ca"}}]]},
+ VerifyStr = public_key:pkix_normalize_name(TestStr).
+
+
%%--------------------------------------------------------------------
pkix_countryname() ->
[{doc, "Test workaround for certs that code x509countryname as utf8"}].
@@ -805,6 +804,18 @@ pkix_crl(Config) when is_list(Config) ->
reasons = asn1_NOVALUE,
distributionPoint = Point} = public_key:pkix_dist_point(OTPIDPCert).
+general_name() ->
+ [{doc, "Test that decoding of general name filed may have other values"
+ " than {rdnSequence, Seq}"}].
+
+general_name(Config) when is_list(Config) ->
+ DummyRfc822Name = "CN=CNDummy, OU=OUDummy, O=ODummy, C=SE",
+ {ok, {1, DummyRfc822Name}} =
+ pubkey_cert:cert_auth_key_id(
+ #'AuthorityKeyIdentifier'{authorityCertIssuer =
+ [{rfc822Name, DummyRfc822Name}],
+ authorityCertSerialNumber =
+ 1}).
%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
diff --git a/lib/runtime_tools/c_src/dyntrace.c b/lib/runtime_tools/c_src/dyntrace.c
index e7a4a73373..3d2de9c21c 100644
--- a/lib/runtime_tools/c_src/dyntrace.c
+++ b/lib/runtime_tools/c_src/dyntrace.c
@@ -96,14 +96,14 @@ static ErlNifFunc nif_funcs[] = {
{"user_trace_i4s4", 9, user_trace_i4s4},
{"user_trace_n", 10, user_trace_n},
#ifdef HAVE_USE_LTTNG
- {"trace_procs", 6, trace_procs},
- {"trace_ports", 6, trace_ports},
- {"trace_running_procs", 6, trace_running_procs},
- {"trace_running_ports", 6, trace_running_ports},
- {"trace_call", 6, trace_call},
- {"trace_send", 6, trace_send},
- {"trace_receive", 6, trace_receive},
- {"trace_garbage_collection", 6, trace_garbage_collection},
+ {"trace_procs", 5, trace_procs},
+ {"trace_ports", 5, trace_ports},
+ {"trace_running_procs", 5, trace_running_procs},
+ {"trace_running_ports", 5, trace_running_ports},
+ {"trace_call", 5, trace_call},
+ {"trace_send", 5, trace_send},
+ {"trace_receive", 5, trace_receive},
+ {"trace_garbage_collection", 5, trace_garbage_collection},
{"enabled_procs", 3, enabled_procs},
{"enabled_ports", 3, enabled_ports},
{"enabled_running_procs", 3, enabled_running_procs},
@@ -114,8 +114,7 @@ static ErlNifFunc nif_funcs[] = {
{"enabled_garbage_collection", 3, enabled_garbage_collection},
#endif
{"enabled", 3, enabled},
- {"trace", 5, trace},
- {"trace", 6, trace}
+ {"trace", 5, trace}
};
ERL_NIF_INIT(dyntrace, nif_funcs, load, NULL, NULL, NULL)
@@ -123,6 +122,7 @@ ERL_NIF_INIT(dyntrace, nif_funcs, load, NULL, NULL, NULL)
static ERL_NIF_TERM atom_true;
static ERL_NIF_TERM atom_false;
static ERL_NIF_TERM atom_error;
+static ERL_NIF_TERM atom_extra;
static ERL_NIF_TERM atom_not_available;
static ERL_NIF_TERM atom_badarg;
static ERL_NIF_TERM atom_ok;
@@ -187,6 +187,7 @@ static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
atom_true = enif_make_atom(env,"true");
atom_false = enif_make_atom(env,"false");
atom_error = enif_make_atom(env,"error");
+ atom_extra = enif_make_atom(env,"extra");
atom_not_available = enif_make_atom(env,"not_available");
atom_badarg = enif_make_atom(env,"badarg");
atom_ok = enif_make_atom(env,"ok");
@@ -325,7 +326,7 @@ static ERL_NIF_TERM trace_garbage_collection(ErlNifEnv* env, int argc, const ERL
int arity;
unsigned long ohbsz, nhbsz, size;
- ASSERT(argc == 6);
+ ASSERT(argc == 5);
/* Assume gc info order does not change */
gci = argv[3];
@@ -428,11 +429,13 @@ static ERL_NIF_TERM trace_call(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
}
} else if (argv[0] == atom_exception_from) {
const ERL_NIF_TERM* tuple;
+ ERL_NIF_TERM extra;
int arity;
lttng_decl_mfabuf(mfa);
char class[LTTNG_BUFFER_SZ];
- enif_get_tuple(env, argv[4], &arity, &tuple);
+ enif_get_map_value(env, argv[4], atom_extra, &extra);
+ enif_get_tuple(env, extra, &arity, &tuple);
enif_snprintf(class, LTTNG_BUFFER_SZ, "%T", tuple[0]);
if (enif_get_tuple(env, argv[3], &arity, &tuple)) {
@@ -457,14 +460,17 @@ static ERL_NIF_TERM enabled_send(ErlNifEnv *env, int argc, const ERL_NIF_TERM ar
static ERL_NIF_TERM trace_send(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
+ ERL_NIF_TERM extra;
lttng_decl_procbuf(pid);
lttng_pid_to_str(argv[2], pid);
+ enif_get_map_value(env, argv[4], atom_extra, &extra);
+
if (argv[0] == atom_send) {
lttng_decl_procbuf(to);
char msg[LTTNG_BUFFER_SZ];
- lttng_pid_to_str(argv[4], to);
+ lttng_pid_to_str(extra, to);
enif_snprintf(msg, LTTNG_BUFFER_SZ, "%T", argv[3]);
LTTNG3(message_send, pid, to, msg);
@@ -472,7 +478,7 @@ static ERL_NIF_TERM trace_send(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
lttng_decl_procbuf(to);
char msg[LTTNG_BUFFER_SZ];
- lttng_pid_to_str(argv[4], to);
+ lttng_pid_to_str(extra, to);
enif_snprintf(msg, LTTNG_BUFFER_SZ, "%T", argv[3]);
/* mark it as non existing ? */
@@ -537,6 +543,7 @@ static ERL_NIF_TERM trace_procs(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
/* spawn */
if (argv[0] == atom_spawn) {
+ ERL_NIF_TERM extra;
char undef[] = "undefined";
const ERL_NIF_TERM* tuple;
int arity;
@@ -545,7 +552,9 @@ static ERL_NIF_TERM trace_procs(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
lttng_pid_to_str(argv[3], to);
- if (enif_get_tuple(env, argv[4], &arity, &tuple)) {
+ enif_get_map_value(env, argv[4], atom_extra, &extra);
+
+ if (enif_get_tuple(env, extra, &arity, &tuple)) {
if (enif_is_list(env, tuple[2])) {
enif_get_list_length(env, tuple[2], &len);
} else {
@@ -618,11 +627,13 @@ static ERL_NIF_TERM trace_ports(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
/* open and closed */
if (argv[0] == atom_open) {
+ ERL_NIF_TERM extra;
char driver[LTTNG_BUFFER_SZ];
lttng_decl_procbuf(pid);
lttng_pid_to_str(argv[3], pid);
+ enif_get_map_value(env, argv[4], atom_extra, &extra);
- enif_snprintf(driver, LTTNG_BUFFER_SZ, "%T", argv[4]);
+ enif_snprintf(driver, LTTNG_BUFFER_SZ, "%T", extra);
LTTNG3(port_open, pid, driver, port);
} else if (argv[0] == atom_closed) {
char reason[LTTNG_BUFFER_SZ];
diff --git a/lib/runtime_tools/c_src/dyntrace_lttng.h b/lib/runtime_tools/c_src/dyntrace_lttng.h
index 2a3224e191..5e838892d6 100644
--- a/lib/runtime_tools/c_src/dyntrace_lttng.h
+++ b/lib/runtime_tools/c_src/dyntrace_lttng.h
@@ -19,7 +19,7 @@
*/
#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER com_ericsson_dyntrace
+#define TRACEPOINT_PROVIDER org_erlang_dyntrace
#if !defined(DYNTRACE_LTTNG_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define DYNTRACE_LTTNG_H
@@ -27,22 +27,22 @@
#include <lttng/tracepoint.h>
#define LTTNG1(Name, Arg1) \
- tracepoint(com_ericsson_dyntrace, Name, (Arg1))
+ tracepoint(org_erlang_dyntrace, Name, (Arg1))
#define LTTNG2(Name, Arg1, Arg2) \
- tracepoint(com_ericsson_dyntrace, Name, (Arg1), (Arg2))
+ tracepoint(org_erlang_dyntrace, Name, (Arg1), (Arg2))
#define LTTNG3(Name, Arg1, Arg2, Arg3) \
- tracepoint(com_ericsson_dyntrace, Name, (Arg1), (Arg2), (Arg3))
+ tracepoint(org_erlang_dyntrace, Name, (Arg1), (Arg2), (Arg3))
#define LTTNG4(Name, Arg1, Arg2, Arg3, Arg4) \
- tracepoint(com_ericsson_dyntrace, Name, (Arg1), (Arg2), (Arg3), (Arg4))
+ tracepoint(org_erlang_dyntrace, Name, (Arg1), (Arg2), (Arg3), (Arg4))
#define LTTNG5(Name, Arg1, Arg2, Arg3, Arg4, Arg5) \
- tracepoint(com_ericsson_dyntrace, Name, (Arg1), (Arg2), (Arg3), (Arg4), (Arg5))
+ tracepoint(org_erlang_dyntrace, Name, (Arg1), (Arg2), (Arg3), (Arg4), (Arg5))
#define LTTNG_ENABLED(Name) \
- tracepoint_enabled(com_ericsson_dyntrace, Name)
+ tracepoint_enabled(org_erlang_dyntrace, Name)
#define LTTNG_BUFFER_SZ (256)
#define LTTNG_PROC_BUFFER_SZ (16)
@@ -76,7 +76,7 @@
/* Process scheduling */
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
process_spawn,
TP_ARGS(
char*, p,
@@ -91,7 +91,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
process_link,
TP_ARGS(
char*, from,
@@ -106,7 +106,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
process_exit,
TP_ARGS(
char*, p,
@@ -119,7 +119,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
process_register,
TP_ARGS(
char*, pid,
@@ -136,7 +136,7 @@ TRACEPOINT_EVENT(
/* Scheduled */
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
process_scheduled,
TP_ARGS(
char*, p,
@@ -154,7 +154,7 @@ TRACEPOINT_EVENT(
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
port_open,
TP_ARGS(
char*, pid,
@@ -169,7 +169,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
port_exit,
TP_ARGS(
char*, port,
@@ -182,7 +182,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
port_link,
TP_ARGS(
char*, from,
@@ -197,7 +197,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
port_scheduled,
TP_ARGS(
char*, p,
@@ -214,7 +214,7 @@ TRACEPOINT_EVENT(
/* Call tracing */
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
function_call,
TP_ARGS(
char*, pid,
@@ -229,7 +229,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
function_return,
TP_ARGS(
char*, pid,
@@ -244,7 +244,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
function_exception,
TP_ARGS(
char*, pid,
@@ -261,7 +261,7 @@ TRACEPOINT_EVENT(
/* Process messages */
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
message_send,
TP_ARGS(
char*, sender,
@@ -276,7 +276,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
message_receive,
TP_ARGS(
char*, receiver,
@@ -291,7 +291,7 @@ TRACEPOINT_EVENT(
/* Process Memory */
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
gc_minor_start,
TP_ARGS(
char*, p,
@@ -308,7 +308,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
gc_minor_end,
TP_ARGS(
char*, p,
@@ -325,7 +325,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
gc_major_start,
TP_ARGS(
char*, p,
@@ -342,7 +342,7 @@ TRACEPOINT_EVENT(
)
TRACEPOINT_EVENT(
- com_ericsson_dyntrace,
+ org_erlang_dyntrace,
gc_major_end,
TP_ARGS(
char*, p,
diff --git a/lib/runtime_tools/doc/src/LTTng.xml b/lib/runtime_tools/doc/src/LTTng.xml
index 06152c66d6..82a4c79379 100644
--- a/lib/runtime_tools/doc/src/LTTng.xml
+++ b/lib/runtime_tools/doc/src/LTTng.xml
@@ -66,7 +66,7 @@ $ make </code>
<section>
<title>Dyntrace Tracepoints</title>
- <p>All tracepoints are in the domain of <c>com_ericsson_dyntrace</c></p>
+ <p>All tracepoints are in the domain of <c>org_erlang_dyntrace</c></p>
<p>All Erlang types are the string equivalent in LTTng.</p>
<p><em>process_spawn</em></p>
@@ -75,6 +75,10 @@ $ make </code>
<item><c>parent : string</c> :: Process ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>entry : string</c> :: Code Location. Ex. <c>"lists:sort/1"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>procs</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">process_spawn: { cpu_id = 3 }, { pid = "&lt;0.131.0&gt;", parent = "&lt;0.130.0&gt;", entry = "erlang:apply/2" }</code>
@@ -84,6 +88,10 @@ $ make </code>
<item><c>from : string</c> :: Process ID or Port ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>type : string</c> :: <c>"link" | "unlink"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>procs</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">process_link: { cpu_id = 3 }, { from = "&lt;0.130.0&gt;", to = "&lt;0.131.0&gt;", type = "link" }</code>
@@ -93,6 +101,10 @@ $ make </code>
<item><c>pid : string</c> :: Process ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>reason : string</c> :: Exit reason. Ex. <c>"normal"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>procs</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">process_exit: { cpu_id = 3 }, { pid = "&lt;0.130.0&gt;", reason = "normal" }</code>
@@ -111,7 +123,10 @@ $ make </code>
<item><c>entry : string</c> :: Code Location. Ex. <c>"lists:sort/1"</c></item>
<item><c>type : string</c> :: <c>"in" | "out" | "in_exiting" | "out_exiting" | "out_exited"</c></item>
</list>
-
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>running</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">process_scheduled: { cpu_id = 0 }, { pid = "&lt;0.136.0&gt;", entry = "erlang:apply/2", type = "in" }</code>
@@ -122,7 +137,10 @@ $ make </code>
<item><c>driver : string</c> :: Driver name. Ex. <c>"efile"</c></item>
<item><c>port : string</c> :: Port ID. Ex. <c>"#Port&lt;0.1031&gt;"</c></item>
</list>
-
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>ports</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">port_open: { cpu_id = 5 }, { pid = "&lt;0.131.0&gt;", driver = "'/bin/sh -s unix:cmd'", port = "#Port&lt;0.1887&gt;" }</code>
@@ -131,6 +149,10 @@ $ make </code>
<item><c>port : string</c> :: Port ID. Ex. <c>"#Port&lt;0.1031&gt;"</c></item>
<item><c>reason : string</c> :: Exit reason. Ex. <c>"normal"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>ports</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">port_exit: { cpu_id = 5 }, { port = "#Port&lt;0.1887&gt;", reason = "normal" }</code>
@@ -140,10 +162,18 @@ $ make </code>
<item><c>from : string</c> :: Process ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>type : string</c> :: <c>"link" | "unlink"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>ports</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">port_link: { cpu_id = 5 }, { from = "#Port&lt;0.1887&gt;", to = "&lt;0.131.0&gt;", type = "unlink" }</code>
<p><em>port_scheduled</em></p>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>running</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<list type="bulleted">
<item><c>port : string</c> :: Port ID. Ex. <c>"#Port&lt;0.1031&gt;"</c></item>
<item><c>entry : string</c> :: Callback. Ex. <c>"open"</c></item>
@@ -152,13 +182,20 @@ $ make </code>
<p>Example:</p>
<code type="none">port_scheduled: { cpu_id = 5 }, { pid = "#Port&lt;0.1905&gt;", entry = "close", type = "out" }</code>
-
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>running</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p><em>function_call</em></p>
<list type="bulleted">
<item><c>pid : string</c> :: Process ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>entry : string</c> :: Code Location. Ex. <c>"lists:sort/1"</c></item>
<item><c>depth : integer</c> :: Stack depth. Ex. <c>0</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>call</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">function_call: { cpu_id = 5 }, { pid = "&lt;0.145.0&gt;", entry = "dyntrace_lttng_SUITE:'-t_call/1-fun-1-'/0", depth = 0 }</code>
@@ -168,6 +205,10 @@ $ make </code>
<item><c>entry : string</c> :: Code Location. Ex. <c>"lists:sort/1"</c></item>
<item><c>depth : integer</c> :: Stack depth. Ex. <c>0</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>call</c> or <c>return_to</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">function_return: { cpu_id = 5 }, { pid = "&lt;0.145.0&gt;", entry = "dyntrace_lttng_SUITE:waiter/0", depth = 0 }</code>
@@ -177,6 +218,10 @@ $ make </code>
<item><c>entry : string</c> :: Code Location. Ex. <c>"lists:sort/1"</c></item>
<item><c>class : string</c> :: Error reason. Ex. <c>"error"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>call</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">function_exception: { cpu_id = 5 }, { pid = "&lt;0.144.0&gt;", entry = "t:call_exc/1", class = "error" }</code>
@@ -186,6 +231,10 @@ $ make </code>
<item><c>to : string</c> :: Process ID or Port ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>message : string</c> :: Message sent. Ex. <c>"{&lt;0.162.0&gt;,ok}"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>send</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">message_send: { cpu_id = 3 }, { from = "#Port&lt;0.1938&gt;", to = "&lt;0.160.0&gt;", message = "{#Port&lt;0.1938&gt;,eof}" }</code>
@@ -194,6 +243,10 @@ $ make </code>
<item><c>to : string</c> :: Process ID or Port ID. Ex. <c>"&lt;0.131.0&gt;"</c></item>
<item><c>message : string</c> :: Message received. Ex. <c>"{&lt;0.162.0&gt;,ok}"</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>'receive'</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">message_receive: { cpu_id = 7 }, { to = "&lt;0.167.0&gt;", message = "{&lt;0.165.0&gt;,ok}" }</code>
@@ -204,6 +257,10 @@ $ make </code>
<item><c>heap : integer</c> :: Young heap word size. Ex. <c>233</c></item>
<item><c>old_heap : integer</c> :: Old heap word size. Ex. <c>233</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>garbage_collection</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">gc_minor_start: { cpu_id = 0 }, { pid = "&lt;0.172.0&gt;", need = 0, heap = 610, old_heap = 0 }</code>
@@ -214,6 +271,10 @@ $ make </code>
<item><c>heap : integer</c> :: Young heap word size. Ex. <c>233</c></item>
<item><c>old_heap : integer</c> :: Old heap word size. Ex. <c>233</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>garbage_collection</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">gc_minor_end: { cpu_id = 0 }, { pid = "&lt;0.172.0&gt;", reclaimed = 120, heap = 1598, old_heap = 1598 }</code>
@@ -224,6 +285,10 @@ $ make </code>
<item><c>heap : integer</c> :: Young heap word size. Ex. <c>233</c></item>
<item><c>old_heap : integer</c> :: Old heap word size. Ex. <c>233</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>garbage_collection</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">gc_major_start: { cpu_id = 0 }, { pid = "&lt;0.172.0&gt;", need = 8, heap = 2586, old_heap = 1598 }</code>
@@ -234,6 +299,10 @@ $ make </code>
<item><c>heap : integer</c> :: Young heap word size. Ex. <c>233</c></item>
<item><c>old_heap : integer</c> :: Old heap word size. Ex. <c>233</c></item>
</list>
+ <p>
+ Available through
+ <seealso marker="erts:erlang#trace-3"><c>erlang:trace/3</c></seealso> with trace flag <c>garbage_collection</c> and <c>{tracer,dyntrace,[]}</c> as tracer module.
+ </p>
<p>Example:</p>
<code type="none">gc_major_end: { cpu_id = 0 }, { pid = "&lt;0.172.0&gt;", reclaimed = 240, heap = 4185, old_heap = 0 }</code>
@@ -241,7 +310,7 @@ $ make </code>
<section>
<title>BEAM Tracepoints</title>
- <p>All tracepoints are in the domain of <c>com_ericsson_otp</c></p>
+ <p>All tracepoints are in the domain of <c>org_erlang_otp</c></p>
<p>All Erlang types are the string equivalent in LTTng.</p>
<p><em>scheduler_poll</em></p>
@@ -454,6 +523,73 @@ $ make </code>
</section>
<section>
- <title>Examples</title>
+ <title>Example of process tracing</title>
+ <p>An example of process tracing of <c>os_mon</c> and friends.</p>
+
+ <p>Clean start of lttng in a bash shell.</p>
+
+ <pre>$ lttng create erlang-demo
+Spawning a session daemon
+Session erlang-demo created.
+Traces will be written in /home/egil/lttng-traces/erlang-demo-20160526-165920</pre>
+
+ <p>Start an Erlang node with lttng enabled.</p>
+
+ <pre>$ erl
+Erlang/OTP 19 [erts-8.0] [source-4d7b24d] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [lttng]
+
+Eshell V8.0 (abort with ^G)
+1></pre>
+
+ <p>Load the <c>dyntrace</c> module.</p>
+
+ <pre>1> <input>l(dyntrace).</input>
+{module,dyntrace}</pre>
+
+ <p>All tracepoints via dyntrace are now visibile and can be listed through <c>lttng list -u</c>.</p>
+
+ <p>Enable the process_register LTTng tracepoint for Erlang.</p>
+
+ <pre>$ lttng enable-event -u org_erlang_dyntrace:process_register
+UST event org_erlang_dyntrace:process_register created in channel channel0</pre>
+
+ <p>Enable process tracing for new processes and use <c>dyntrace</c> as tracer backend.</p>
+
+ <pre>2> <input>erlang:trace(new,true,[procs,{tracer,dyntrace,[]}]).</input>
+0</pre>
+
+ <p>Start LTTng tracing.</p>
+
+ <pre>$ lttng start
+Tracing started for session erlang-demo</pre>
+
+ <p>Start the <c>os_mon</c> application in Erlang.</p>
+
+ <pre>3> <input>application:ensure_all_started(os_mon).</input>
+{ok,[sasl,os_mon]}</pre>
+
+ <p>Stop LTTng tracing and view the result.</p>
+
+ <pre>$ lttng stop
+Tracing stopped for session erlang-demo
+$ lttng view
+[17:20:42.561168759] (+?.?????????) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.66.0&gt;", name = "sasl_sup", type = "register" }
+[17:20:42.561215519] (+0.000046760) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.67.0&gt;", name = "sasl_safe_sup", type = "register" }
+[17:20:42.562149024] (+0.000933505) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.68.0&gt;", name = "alarm_handler", type = "register" }
+[17:20:42.571035803] (+0.008886779) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.69.0&gt;", name = "release_handler", type = "register" }
+[17:20:42.574939868] (+0.003904065) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.74.0&gt;", name = "os_mon_sup", type = "register" }
+[17:20:42.576818712] (+0.001878844) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.75.0&gt;", name = "disksup", type = "register" }
+[17:20:42.580032013] (+0.003213301) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.76.0&gt;", name = "memsup", type = "register" }
+[17:20:42.583046339] (+0.003014326) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.78.0&gt;", name = "cpu_sup", type = "register" }
+[17:20:42.586206242] (+0.003159903) elxd1168lx9 org_erlang_dyntrace:process_register: \
+ { cpu_id = 5 }, { pid = "&lt;0.82.0&gt;", name = "timer_server", type = "register" }</pre>
</section>
</chapter>
diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml
index 49b11ddc3c..14a81b2293 100644
--- a/lib/runtime_tools/doc/src/dbg.xml
+++ b/lib/runtime_tools/doc/src/dbg.xml
@@ -189,9 +189,9 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard)\
<tag><c>all</c></tag>
<item>All processes and ports in the system as well as all processes and ports
created hereafter are to be traced.</item>
- <tag><c>all_processes</c></tag>
+ <tag><c>processes</c></tag>
<item>All processes in the system as well as all processes created hereafter are to be traced.</item>
- <tag><c>all_ports</c></tag>
+ <tag><c>ports</c></tag>
<item>All ports in the system as well as all ports created hereafter are to be traced.</item>
<tag><c>new</c></tag>
<item>All processes and ports created after the call is are to be traced.</item>
diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl
index 8cdb5a43e3..c0d4665bda 100644
--- a/lib/runtime_tools/src/dbg.erl
+++ b/lib/runtime_tools/src/dbg.erl
@@ -1155,7 +1155,7 @@ all() ->
[send,'receive',call,procs,ports,garbage_collection,running,
set_on_spawn,set_on_first_spawn,set_on_link,set_on_first_link,
timestamp,monotonic_timestamp,strict_monotonic_timestamp,
- arity,return_to,silent,running_procs,running_ports].
+ arity,return_to,silent,running_procs,running_ports,exiting].
display_info([Node|Nodes]) ->
io:format("~nNode ~w:~n",[Node]),
@@ -1313,6 +1313,9 @@ tc_loop(Other, _Handler, _HData) ->
gen_reader(ip, {Host, Portno}) ->
case gen_tcp:connect(Host, Portno, [{active, false}, binary]) of
{ok, Sock} ->
+ %% Just in case this is on the traced node,
+ %% make sure the port is not traced.
+ p(Sock,clear),
mk_reader(fun ip_read/2, Sock);
Error ->
exit(Error)
diff --git a/lib/runtime_tools/src/dyntrace.erl b/lib/runtime_tools/src/dyntrace.erl
index 28e6d67d96..58c5a773c3 100644
--- a/lib/runtime_tools/src/dyntrace.erl
+++ b/lib/runtime_tools/src/dyntrace.erl
@@ -42,15 +42,14 @@
-export([put_tag/1, get_tag/0, get_tag_data/0, spread_tag/1, restore_tag/1]).
-export([trace/5,
- trace/6,
- trace_procs/6,
- trace_ports/6,
- trace_running_procs/6,
- trace_running_ports/6,
- trace_call/6,
- trace_send/6,
- trace_receive/6,
- trace_garbage_collection/6]).
+ trace_procs/5,
+ trace_ports/5,
+ trace_running_procs/5,
+ trace_running_ports/5,
+ trace_call/5,
+ trace_send/5,
+ trace_receive/5,
+ trace_garbage_collection/5]).
-export([enabled_procs/3,
enabled_ports/3,
@@ -147,34 +146,31 @@ user_trace_i4s4(_, _, _, _, _, _, _, _, _) ->
user_trace_n(_, _, _, _, _, _, _, _, _, _) ->
erlang:nif_error(nif_not_loaded).
-trace(_TracerState, _Label, _SeqTraceInfo, _, _Opts) ->
+trace(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_procs(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_procs(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_ports(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_ports(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_running_procs(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_running_procs(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_running_ports(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_running_ports(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_call(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_call(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_send(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_send(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_receive(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_receive(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
- erlang:nif_error(nif_not_loaded).
-
-trace_garbage_collection(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_garbage_collection(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
enabled(_TraceTag, _TracerState, _Tracee) ->
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 66653c5b7f..cedb677178 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -23,7 +23,8 @@
-export([vsn/0]).
%% observer stuff
--export([sys_info/0, get_table/3, get_table_list/2, fetch_stats/2]).
+-export([sys_info/0, get_port_list/0,
+ get_table/3, get_table_list/2, fetch_stats/2]).
%% etop stuff
-export([etop_collect/1]).
@@ -139,6 +140,15 @@ get_mnesia_loop(Parent, {Match, Cont}) ->
Parent ! {self(), Match},
get_mnesia_loop(Parent, mnesia:select(Cont)).
+get_port_list() ->
+ [begin
+ [{port_id,P}|erlang:port_info(P)] ++
+ case erlang:port_info(P,monitors) of
+ undefined -> [];
+ Monitors -> [Monitors]
+ end
+ end || P <- erlang:ports()].
+
get_table_list(ets, Opts) ->
HideUnread = proplists:get_value(unread_hidden, Opts, true),
HideSys = proplists:get_value(sys_hidden, Opts, true),
diff --git a/lib/runtime_tools/test/dbg_SUITE.erl b/lib/runtime_tools/test/dbg_SUITE.erl
index 5a3c885571..4b0864858c 100644
--- a/lib/runtime_tools/test/dbg_SUITE.erl
+++ b/lib/runtime_tools/test/dbg_SUITE.erl
@@ -30,7 +30,7 @@
erl_tracer/1, distributed_erl_tracer/1]).
-export([tracee1/1, tracee2/1]).
-export([dummy/0, exported/1]).
--export([enabled/3, trace/6, load_nif/1]).
+-export([enabled/3, trace/5, load_nif/1]).
-include_lib("common_test/include/ct.hrl").
@@ -961,7 +961,7 @@ erl_tracer(Config) ->
{ok, _} = dbg:p(self(), [c, timestamp]),
{ok, _} = dbg:tp(?MODULE, dummy, []),
ok = ?MODULE:dummy(),
- [{Self, call, Self, Self, {?MODULE, dummy, []}, undefined, #{}}] = flush(),
+ [{Self, call, Self, Self, {?MODULE, dummy, []}, #{}}] = flush(),
ok.
%% Test that distributed erl_tracer modules work
@@ -997,10 +997,10 @@ distributed_erl_tracer(Config) ->
{ok, {?MODULE, RNifProxy}} = dbg:get_tracer(RNode),
LCall = spawn_link(LNode, fun() -> ?MODULE:dummy() end),
- [{LCall, call, LNifProxy, LCall, {?MODULE, dummy, []}, undefined, #{}}] = flush(),
+ [{LCall, call, LNifProxy, LCall, {?MODULE, dummy, []}, #{}}] = flush(),
RCall = spawn_link(RNode, fun() -> ?MODULE:dummy() end),
- [{RCall, call, RNifProxy, RCall, {?MODULE, dummy, []}, undefined, #{}}] = flush(),
+ [{RCall, call, RNifProxy, RCall, {?MODULE, dummy, []}, #{}}] = flush(),
ok.
@@ -1018,7 +1018,7 @@ load_nif(Config) ->
enabled(_, _, _) ->
erlang:nif_error(nif_not_loaded).
-trace(_, _, _, _, _, _) ->
+trace(_, _, _, _, _) ->
erlang:nif_error(nif_not_loaded).
%%
diff --git a/lib/runtime_tools/test/dbg_SUITE_data/dbg_SUITE.c b/lib/runtime_tools/test/dbg_SUITE_data/dbg_SUITE.c
index 45f14938c6..ecdee7e3a2 100644
--- a/lib/runtime_tools/test/dbg_SUITE_data/dbg_SUITE.c
+++ b/lib/runtime_tools/test/dbg_SUITE_data/dbg_SUITE.c
@@ -36,7 +36,7 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ErlNifFunc nif_funcs[] = {
{"enabled", 3, enabled},
- {"trace", 6, trace}
+ {"trace", 5, trace}
};
ERL_NIF_INIT(dbg_SUITE, nif_funcs, load, NULL, upgrade, unload)
@@ -93,7 +93,7 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
int state_arity;
ErlNifPid self, to;
ERL_NIF_TERM *tuple, msg;
- ASSERT(argc == 6);
+ ASSERT(argc == 5);
tuple = enif_alloc(sizeof(ERL_NIF_TERM)*(argc+1));
memcpy(tuple+1,argv,sizeof(ERL_NIF_TERM)*argc);
diff --git a/lib/runtime_tools/test/dyntrace_lttng_SUITE.erl b/lib/runtime_tools/test/dyntrace_lttng_SUITE.erl
index e6c147b003..a98ac6e99c 100644
--- a/lib/runtime_tools/test/dyntrace_lttng_SUITE.erl
+++ b/lib/runtime_tools/test/dyntrace_lttng_SUITE.erl
@@ -84,25 +84,25 @@ end_per_testcase(Case, _Config) ->
%% tracepoints
%%
-%% com_ericsson_dyntrace:gc_major_end
-%% com_ericsson_dyntrace:gc_major_start
-%% com_ericsson_dyntrace:gc_minor_end
-%% com_ericsson_dyntrace:gc_minor_start
-%% com_ericsson_dyntrace:message_receive
-%% com_ericsson_dyntrace:message_send
-%% -com_ericsson_dyntrace:message_queued
-%% com_ericsson_dyntrace:function_exception
-%% com_ericsson_dyntrace:function_return
-%% com_ericsson_dyntrace:function_call
-%% com_ericsson_dyntrace:port_link
-%% com_ericsson_dyntrace:port_exit
-%% com_ericsson_dyntrace:port_open
-%% com_ericsson_dyntrace:port_scheduled
-%% com_ericsson_dyntrace:process_scheduled
-%% com_ericsson_dyntrace:process_register
-%% com_ericsson_dyntrace:process_exit
-%% com_ericsson_dyntrace:process_link
-%% com_ericsson_dyntrace:process_spawn
+%% org_erlang_dyntrace:gc_major_end
+%% org_erlang_dyntrace:gc_major_start
+%% org_erlang_dyntrace:gc_minor_end
+%% org_erlang_dyntrace:gc_minor_start
+%% org_erlang_dyntrace:message_receive
+%% org_erlang_dyntrace:message_send
+%% -org_erlang_dyntrace:message_queued
+%% org_erlang_dyntrace:function_exception
+%% org_erlang_dyntrace:function_return
+%% org_erlang_dyntrace:function_call
+%% org_erlang_dyntrace:port_link
+%% org_erlang_dyntrace:port_exit
+%% org_erlang_dyntrace:port_open
+%% org_erlang_dyntrace:port_scheduled
+%% org_erlang_dyntrace:process_scheduled
+%% org_erlang_dyntrace:process_register
+%% org_erlang_dyntrace:process_exit
+%% org_erlang_dyntrace:process_link
+%% org_erlang_dyntrace:process_spawn
%%
%% Testcases
%%
@@ -112,7 +112,7 @@ t_lttng_list(_Config) ->
ok.
t_procs(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:process_*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:process_*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},procs]),
Pid = spawn_link(fun() -> waiter() end),
@@ -122,27 +122,27 @@ t_procs(Config) when is_list(Config) ->
_ = erlang:trace(all, false, [procs]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:process_spawn", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_link", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_exit", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_register", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_spawn", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_link", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_exit", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_register", Res),
ok.
t_ports(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:port_*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:port_*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},ports]),
_ = os:cmd("ls"),
_ = erlang:trace(all, false, [{tracer, dyntrace, []},ports]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:port_open", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:port_link", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:port_exit", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_open", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_link", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_exit", Res),
ok.
t_running_process(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:process_scheduled", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:process_scheduled", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},running]),
Pid = spawn_link(fun() -> waiter() end),
@@ -152,11 +152,11 @@ t_running_process(Config) when is_list(Config) ->
_ = erlang:trace(all, false, [running]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:process_scheduled", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_scheduled", Res),
ok.
t_running_port(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:port_scheduled", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:port_scheduled", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},running_ports]),
_ = os:cmd("ls"),
@@ -164,12 +164,12 @@ t_running_port(Config) when is_list(Config) ->
_ = erlang:trace(all, false, [running_ports]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:port_scheduled", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_scheduled", Res),
ok.
t_call(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:function_*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:function_*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []}, call]),
_ = erlang:trace_pattern({?MODULE, '_', '_'}, [{'_',[],[{exception_trace}]}], [local]),
@@ -184,13 +184,13 @@ t_call(Config) when is_list(Config) ->
_ = erlang:trace_pattern({?MODULE, '_', '_'}, false, [local]),
_ = erlang:trace(all, false, [call]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:function_call", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:function_return", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:function_exception", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:function_call", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:function_return", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:function_exception", Res),
ok.
t_send(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:message_send", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:message_send", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},send]),
Pid = spawn_link(fun() -> waiter() end),
@@ -201,11 +201,11 @@ t_send(Config) when is_list(Config) ->
_ = erlang:trace(all, false, [send]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:message_send", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:message_send", Res),
ok.
t_call_return_to(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:function_*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:function_*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []}, call, return_to]),
_ = erlang:trace_pattern({lists, '_', '_'}, true, [local]),
_ = erlang:trace_pattern({?MODULE, '_', '_'}, true, [local]),
@@ -219,11 +219,11 @@ t_call_return_to(Config) when is_list(Config) ->
_ = erlang:trace_pattern({lists, '_', '_'}, false, [local]),
_ = erlang:trace(all, false, [call,return_to]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:function_call", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:function_call", Res),
ok.
t_call_silent(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:function_*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:function_*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []}, call, silent]),
_ = erlang:trace_pattern({?MODULE, '_', '_'}, [{'_',[],[{exception_trace}]}], [local]),
@@ -238,27 +238,33 @@ t_call_silent(Config) when is_list(Config) ->
_ = erlang:trace_pattern({?MODULE, '_', '_'}, false, [local]),
_ = erlang:trace(all, false, [call]),
Res = lttng_stop_and_view(Config),
- notfound = check_tracepoint("com_ericsson_dyntrace:function_call", Res),
- notfound = check_tracepoint("com_ericsson_dyntrace:function_return", Res),
- notfound = check_tracepoint("com_ericsson_dyntrace:function_exception", Res),
+ notfound = check_tracepoint("org_erlang_dyntrace:function_call", Res),
+ notfound = check_tracepoint("org_erlang_dyntrace:function_return", Res),
+ notfound = check_tracepoint("org_erlang_dyntrace:function_exception", Res),
ok.
t_receive(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:message_receive", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:message_receive", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},'receive']),
+ timer:sleep(20),
+
+ Pid1 = spawn_link(fun() -> waiter() end),
+ Pid1 ! {self(), ok},
+ ok = receive {Pid1,ok} -> ok end,
+
+ Pid2 = spawn_link(fun() -> waiter() end),
+ Pid2 ! {self(), ok},
+ ok = receive {Pid2,ok} -> ok end,
- Pid = spawn_link(fun() -> waiter() end),
- Pid ! {self(), ok},
- ok = receive {Pid,ok} -> ok end,
timer:sleep(10),
_ = erlang:trace(all, false, ['receive']),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:message_receive", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:message_receive", Res),
ok.
t_garbage_collection(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:gc_*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:gc_*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},garbage_collection]),
Pid = spawn_link(fun() -> gcfier() end),
@@ -267,14 +273,14 @@ t_garbage_collection(Config) when is_list(Config) ->
timer:sleep(10),
_ = erlang:trace(all, false, [garbage_collection]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_major_start", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_major_end", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_minor_start", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_minor_end", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_major_start", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_major_end", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_minor_start", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_minor_end", Res),
ok.
t_all(Config) when is_list(Config) ->
- ok = lttng_start_event("com_ericsson_dyntrace:*", Config),
+ ok = lttng_start_event("org_erlang_dyntrace:*", Config),
_ = erlang:trace(new, true, [{tracer, dyntrace, []},all]),
Pid1 = spawn_link(fun() -> waiter() end),
@@ -291,21 +297,21 @@ t_all(Config) when is_list(Config) ->
_ = erlang:trace(all, false, [all]),
Res = lttng_stop_and_view(Config),
- ok = check_tracepoint("com_ericsson_dyntrace:process_spawn", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_link", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_exit", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_register", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:port_open", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:port_link", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:port_exit", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:process_scheduled", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:port_scheduled", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:message_send", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:message_receive", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_major_start", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_major_end", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_minor_start", Res),
- ok = check_tracepoint("com_ericsson_dyntrace:gc_minor_end", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_spawn", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_link", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_exit", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_register", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_open", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_link", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_exit", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:process_scheduled", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:port_scheduled", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:message_send", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:message_receive", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_major_start", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_major_end", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_minor_start", Res),
+ ok = check_tracepoint("org_erlang_dyntrace:gc_minor_end", Res),
ok.
diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src
index 9c912fb8c3..4ee8a7d6c8 100644
--- a/lib/sasl/src/sasl.app.src
+++ b/lib/sasl/src/sasl.app.src
@@ -45,6 +45,6 @@
{env, [{sasl_error_logger, tty},
{errlog_type, all}]},
{mod, {sasl, []}},
- {runtime_dependencies, ["tools-2.6.14","stdlib-2.8","kernel-4.1",
- "erts-6.0"]}]}.
+ {runtime_dependencies, ["tools-2.6.14","stdlib-3.0","kernel-5.0",
+ "erts-8.0"]}]}.
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index 4dcaec03a7..8134e02221 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1366,7 +1366,7 @@ upgrade_supervisor(Conf) when is_list(Conf) ->
ASupBeam2 = rpc:call(Node, code, which, [a_sup]),
%% Check that the restart strategy and child spec is updated
- {status, _, {module, _}, [_, _, _, _, [_,_,{data,[{"State",State}]}]]} =
+ {status, _, {module, _}, [_, _, _, _, [_,_,{data,[{"State",State}]}|_]]} =
rpc:call(Node,sys,get_status,[a_sup]),
{state,_,RestartStrategy,[Child],_,_,_,_,_,_,_} = State,
one_for_all = RestartStrategy, % changed from one_for_one
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index ff2d6e082a..e6c54d27bf 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -125,8 +125,10 @@
<func>
<name>connect(Host, Port, Options) -> </name>
- <name>connect(Host, Port, Options, Timeout) -> {ok,
- ssh_connection_ref()} | {error, Reason}</name>
+ <name>connect(Host, Port, Options, Timeout) -> </name>
+ <name>connect(TcpSocket, Options) -> </name>
+ <name>connect(TcpSocket, Options, Timeout) ->
+ {ok, ssh_connection_ref()} | {error, Reason}</name>
<fsummary>Connects to an SSH server.</fsummary>
<type>
<v>Host = string()</v>
@@ -137,6 +139,8 @@
<v>Timeout = infinity | integer()</v>
<d>Negotiation time-out in milli-seconds. The default value is <c>infinity</c>.
For connection time-out, use option <c>{connect_timeout, timeout()}</c>.</d>
+ <v>TcpSocket = port()</v>
+ <d>The socket is supposed to be from <seealso marker="kernel:gen_tcp#connect-3">gen_tcp:connect</seealso> or <seealso marker="kernel:gen_tcp#accept-1">gen_tcp:accept</seealso> with option <c>{active,false}</c></d>
</type>
<desc>
<p>Connects to an SSH server. No channel is started. This is done
@@ -347,8 +351,9 @@
<func>
<name>daemon(Port) -> </name>
<name>daemon(Port, Options) -> </name>
- <name>daemon(HostAddress, Port, Options) -> {ok,
- ssh_daemon_ref()} | {error, atom()}</name>
+ <name>daemon(HostAddress, Port, Options) -> </name>
+ <name>daemon(TcpSocket) -> </name>
+ <name>daemon(TcpSocket, Options) -> {ok, ssh_daemon_ref()} | {error, atom()}</name>
<fsummary>Starts a server listening for SSH connections
on the given port.</fsummary>
<type>
@@ -357,6 +362,8 @@
<v>Options = [{Option, Value}]</v>
<v>Option = atom()</v>
<v>Value = term()</v>
+ <v>TcpSocket = port()</v>
+ <d>The socket is supposed to be from <seealso marker="kernel:gen_tcp#connect-3">gen_tcp:connect</seealso> or <seealso marker="kernel:gen_tcp#accept-1">gen_tcp:accept</seealso> with option <c>{active,false}</c></d>
</type>
<desc>
<p>Starts a server listening for SSH connections on the given
@@ -718,12 +725,15 @@
<func>
<name>shell(Host) -> </name>
<name>shell(Host, Option) -> </name>
- <name>shell(Host, Port, Option) -> _</name>
+ <name>shell(Host, Port, Option) -> </name>
+ <name>shell(TcpSocket) -> _</name>
<fsummary>Starts an interactive shell over an SSH server.</fsummary>
<type>
<v>Host = string()</v>
<v>Port = integer()</v>
<v>Options - see ssh:connect/3</v>
+ <v>TcpSocket = port()</v>
+ <d>The socket is supposed to be from <seealso marker="kernel:gen_tcp#connect-3">gen_tcp:connect</seealso> or <seealso marker="kernel:gen_tcp#accept-1">gen_tcp:accept</seealso> with option <c>{active,false}</c></d>
</type>
<desc>
<p>Starts an interactive shell over an SSH server on the
diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml
index 071d46ec57..eb6f43d417 100644
--- a/lib/ssh/doc/src/ssh_sftp.xml
+++ b/lib/ssh/doc/src/ssh_sftp.xml
@@ -527,15 +527,24 @@
<func>
<name>start_channel(ConnectionRef) -></name>
- <name>start_channel(ConnectionRef, Options) -></name>
+ <name>start_channel(ConnectionRef, Options) ->
+ {ok, Pid} | {error, reason()|term()}</name>
+
<name>start_channel(Host, Options) -></name>
- <name>start_channel(Host, Port, Options) -> {ok, Pid} | {ok, Pid, ConnectionRef} |
- {error, reason()|term()}</name>
+ <name>start_channel(Host, Port, Options) ->
+ {ok, Pid, ConnectionRef} | {error, reason()|term()}</name>
+
+ <name>start_channel(TcpSocket) -></name>
+ <name>start_channel(TcpSocket, Options) ->
+ {ok, Pid, ConnectionRef} | {error, reason()|term()}</name>
+
<fsummary>Starts an SFTP client.</fsummary>
<type>
<v>Host = string()</v>
<v>ConnectionRef = ssh_connection_ref()</v>
<v>Port = integer()</v>
+ <v>TcpSocket = port()</v>
+ <d>The socket is supposed to be from <seealso marker="kernel:gen_tcp#connect-3">gen_tcp:connect</seealso> or <seealso marker="kernel:gen_tcp#accept-1">gen_tcp:accept</seealso> with option <c>{active,false}</c></d>
<v>Options = [{Option, Value}]</v>
</type>
<desc>
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 09b07b7a2a..65f1acc6a6 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -27,7 +27,9 @@
-include_lib("public_key/include/public_key.hrl").
-include_lib("kernel/include/file.hrl").
--export([start/0, start/1, stop/0, connect/3, connect/4, close/1, connection_info/2,
+-export([start/0, start/1, stop/0,
+ connect/2, connect/3, connect/4,
+ close/1, connection_info/2,
channel_info/3,
daemon/1, daemon/2, daemon/3,
daemon_info/1,
@@ -70,13 +72,36 @@ stop() ->
application:stop(ssh).
%%--------------------------------------------------------------------
--spec connect(string(), integer(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
+-spec connect(port(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
+
+-spec connect(port(), proplists:proplist(), timeout()) -> {ok, pid()} | {error, term()}
+ ; (string(), integer(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
+
-spec connect(string(), integer(), proplists:proplist(), timeout()) -> {ok, pid()} | {error, term()}.
%%
%% Description: Starts an ssh connection.
%%--------------------------------------------------------------------
-connect(Host, Port, Options) ->
+connect(Socket, Options) ->
+ connect(Socket, Options, infinity).
+
+connect(Socket, Options, Timeout) when is_port(Socket) ->
+ case handle_options(Options) of
+ {error, Error} ->
+ {error, Error};
+ {_SocketOptions, SshOptions} ->
+ case valid_socket_to_use(Socket, Options) of
+ ok ->
+ {ok, {Host,_Port}} = inet:sockname(Socket),
+ Opts = [{user_pid,self()}, {host,fmt_host(Host)} | SshOptions],
+ ssh_connection_handler:start_connection(client, Socket, Opts, Timeout);
+ {error,SockError} ->
+ {error,SockError}
+ end
+ end;
+
+connect(Host, Port, Options) when is_integer(Port), Port>0 ->
connect(Host, Port, Options, infinity).
+
connect(Host, Port, Options, Timeout) ->
case handle_options(Options) of
{error, _Reason} = Error ->
@@ -125,7 +150,7 @@ channel_info(ConnectionRef, ChannelId, Options) ->
%%--------------------------------------------------------------------
-spec daemon(integer()) -> {ok, pid()} | {error, term()}.
--spec daemon(integer(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
+-spec daemon(integer()|port(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
-spec daemon(any | inet:ip_address(), integer(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
%% Description: Starts a server listening for SSH connections
@@ -134,28 +159,16 @@ channel_info(ConnectionRef, ChannelId, Options) ->
daemon(Port) ->
daemon(Port, []).
-daemon(Port, Options) ->
- daemon(any, Port, Options).
+daemon(Port, Options) when is_integer(Port) ->
+ daemon(any, Port, Options);
+
+daemon(Socket, Options0) when is_port(Socket) ->
+ Options = daemon_shell_opt(Options0),
+ start_daemon(Socket, Options).
daemon(HostAddr, Port, Options0) ->
- Options1 = case proplists:get_value(shell, Options0) of
- undefined ->
- [{shell, {shell, start, []}} | Options0];
- _ ->
- Options0
- end,
-
- {Host, Inet, Options} = case HostAddr of
- any ->
- {ok, Host0} = inet:gethostname(),
- {Host0, proplists:get_value(inet, Options1, inet), Options1};
- {_,_,_,_} ->
- {HostAddr, inet,
- [{ip, HostAddr} | Options1]};
- {_,_,_,_,_,_,_,_} ->
- {HostAddr, inet6,
- [{ip, HostAddr} | Options1]}
- end,
+ Options1 = daemon_shell_opt(Options0),
+ {Host, Inet, Options} = daemon_host_inet_opt(HostAddr, Options1),
start_daemon(Host, Port, Options, Inet).
%%--------------------------------------------------------------------
@@ -199,8 +212,8 @@ stop_daemon(Address, Port) ->
stop_daemon(Address, Port, Profile) ->
ssh_system_sup:stop_system(Address, Port, Profile).
%%--------------------------------------------------------------------
--spec shell(string()) -> _.
--spec shell(string(), proplists:proplist()) -> _.
+-spec shell(port() | string()) -> _.
+-spec shell(port() | string(), proplists:proplist()) -> _.
-spec shell(string(), integer(), proplists:proplist()) -> _.
%% Host = string()
@@ -212,27 +225,34 @@ stop_daemon(Address, Port, Profile) ->
%% and will not return until the remote shell is ended.(e.g. on
%% exit from the shell)
%%--------------------------------------------------------------------
+shell(Socket) when is_port(Socket) ->
+ shell(Socket, []);
shell(Host) ->
shell(Host, ?SSH_DEFAULT_PORT, []).
+
+shell(Socket, Options) when is_port(Socket) ->
+ start_shell( connect(Socket, Options) );
shell(Host, Options) ->
shell(Host, ?SSH_DEFAULT_PORT, Options).
+
shell(Host, Port, Options) ->
- case connect(Host, Port, Options) of
- {ok, ConnectionRef} ->
- case ssh_connection:session_channel(ConnectionRef, infinity) of
- {ok,ChannelId} ->
- success = ssh_connection:ptty_alloc(ConnectionRef, ChannelId, []),
- Args = [{channel_cb, ssh_shell},
- {init_args,[ConnectionRef, ChannelId]},
- {cm, ConnectionRef}, {channel_id, ChannelId}],
- {ok, State} = ssh_channel:init([Args]),
- ssh_channel:enter_loop(State);
- Error ->
- Error
- end;
+ start_shell( connect(Host, Port, Options) ).
+
+
+start_shell({ok, ConnectionRef}) ->
+ case ssh_connection:session_channel(ConnectionRef, infinity) of
+ {ok,ChannelId} ->
+ success = ssh_connection:ptty_alloc(ConnectionRef, ChannelId, []),
+ Args = [{channel_cb, ssh_shell},
+ {init_args,[ConnectionRef, ChannelId]},
+ {cm, ConnectionRef}, {channel_id, ChannelId}],
+ {ok, State} = ssh_channel:init([Args]),
+ ssh_channel:enter_loop(State);
Error ->
Error
- end.
+ end;
+start_shell(Error) ->
+ Error.
%%--------------------------------------------------------------------
%%--------------------------------------------------------------------
@@ -242,19 +262,128 @@ default_algorithms() ->
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+valid_socket_to_use(Socket, Options) ->
+ case proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}) of
+ {tcp,_,_} ->
+ %% Is this tcp-socket a valid socket?
+ case {is_tcp_socket(Socket),
+ {ok,[{active,false}]} == inet:getopts(Socket, [active])
+ }
+ of
+ {true, true} ->
+ ok;
+ {true, false} ->
+ {error, not_passive_mode};
+ _ ->
+ {error, not_tcp_socket}
+ end;
+ {L4,_,_} ->
+ {error, {unsupported,L4}}
+ end.
+
+is_tcp_socket(Socket) -> {ok,[]} =/= inet:getopts(Socket, [delay_send]).
+
+
+
+daemon_shell_opt(Options) ->
+ case proplists:get_value(shell, Options) of
+ undefined ->
+ [{shell, {shell, start, []}} | Options];
+ _ ->
+ Options
+ end.
+
+daemon_host_inet_opt(HostAddr, Options1) ->
+ case HostAddr of
+ any ->
+ {ok, Host0} = inet:gethostname(),
+ {Host0, proplists:get_value(inet, Options1, inet), Options1};
+ {_,_,_,_} ->
+ {HostAddr, inet,
+ [{ip, HostAddr} | Options1]};
+ {_,_,_,_,_,_,_,_} ->
+ {HostAddr, inet6,
+ [{ip, HostAddr} | Options1]}
+ end.
+
+
+start_daemon(Socket, Options) ->
+ case handle_options(Options) of
+ {error, Error} ->
+ {error, Error};
+ {SocketOptions, SshOptions} ->
+ case valid_socket_to_use(Socket, Options) of
+ ok ->
+ try
+ do_start_daemon(Socket, [{role,server}|SshOptions], SocketOptions)
+ catch
+ throw:bad_fd -> {error,bad_fd};
+ _C:_E -> {error,{cannot_start_daemon,_C,_E}}
+ end;
+ {error,SockError} ->
+ {error,SockError}
+ end
+ end.
+
start_daemon(Host, Port, Options, Inet) ->
case handle_options(Options) of
{error, _Reason} = Error ->
Error;
{SocketOptions, SshOptions}->
try
- do_start_daemon(Host, Port,[{role, server} |SshOptions] , [Inet | SocketOptions])
+ do_start_daemon(Host, Port, [{role,server}|SshOptions] , [Inet|SocketOptions])
catch
throw:bad_fd -> {error,bad_fd};
_C:_E -> {error,{cannot_start_daemon,_C,_E}}
end
end.
+do_start_daemon(Socket, SshOptions, SocketOptions) ->
+ {ok, {IP,Port}} =
+ try {ok,_} = inet:sockname(Socket)
+ catch
+ _:_ -> throw(bad_socket)
+ end,
+ Host = fmt_host(IP),
+ Profile = proplists:get_value(profile, SshOptions, ?DEFAULT_PROFILE),
+ Opts = [{asocket, Socket},
+ {asock_owner,self()},
+ {address, Host},
+ {port, Port},
+ {role, server},
+ {socket_opts, SocketOptions},
+ {ssh_opts, SshOptions}],
+ {_, Callback, _} = proplists:get_value(transport, SshOptions, {tcp, gen_tcp, tcp_closed}),
+ case ssh_system_sup:system_supervisor(Host, Port, Profile) of
+ undefined ->
+ %% It would proably make more sense to call the
+ %% address option host but that is a too big change at the
+ %% monent. The name is a legacy name!
+ try sshd_sup:start_child(Opts) of
+ {error, {already_started, _}} ->
+ {error, eaddrinuse};
+ Result = {ok,_} ->
+ ssh_acceptor:handle_connection(Callback, Host, Port, Opts, Socket),
+ Result;
+ Result = {error, _} ->
+ Result
+ catch
+ exit:{noproc, _} ->
+ {error, ssh_not_started}
+ end;
+ Sup ->
+ AccPid = ssh_system_sup:acceptor_supervisor(Sup),
+ case ssh_acceptor_sup:start_child(AccPid, Opts) of
+ {error, {already_started, _}} ->
+ {error, eaddrinuse};
+ {ok, _} ->
+ ssh_acceptor:handle_connection(Callback, Host, Port, Opts, Socket),
+ {ok, Sup};
+ Other ->
+ Other
+ end
+ end.
+
do_start_daemon(Host0, Port0, SshOptions, SocketOptions) ->
{Host,Port1} =
try
@@ -270,7 +399,7 @@ do_start_daemon(Host0, Port0, SshOptions, SocketOptions) ->
_:_ -> throw(bad_fd)
end,
Profile = proplists:get_value(profile, SshOptions, ?DEFAULT_PROFILE),
- {Port, WaitRequestControl, Opts} =
+ {Port, WaitRequestControl, Opts0} =
case Port1 of
0 -> %% Allocate the socket here to get the port number...
{_, Callback, _} =
@@ -284,17 +413,17 @@ do_start_daemon(Host0, Port0, SshOptions, SocketOptions) ->
_ ->
{Port1, false, []}
end,
+ Opts = [{address, Host},
+ {port, Port},
+ {role, server},
+ {socket_opts, SocketOptions},
+ {ssh_opts, SshOptions} | Opts0],
case ssh_system_sup:system_supervisor(Host, Port, Profile) of
undefined ->
%% It would proably make more sense to call the
%% address option host but that is a too big change at the
%% monent. The name is a legacy name!
- try sshd_sup:start_child([{address, Host},
- {port, Port},
- {role, server},
- {socket_opts, SocketOptions},
- {ssh_opts, SshOptions}
- | Opts]) of
+ try sshd_sup:start_child(Opts) of
{error, {already_started, _}} ->
{error, eaddrinuse};
Result = {ok,_} ->
@@ -308,12 +437,7 @@ do_start_daemon(Host0, Port0, SshOptions, SocketOptions) ->
end;
Sup ->
AccPid = ssh_system_sup:acceptor_supervisor(Sup),
- case ssh_acceptor_sup:start_child(AccPid, [{address, Host},
- {port, Port},
- {role, server},
- {socket_opts, SocketOptions},
- {ssh_opts, SshOptions}
- | Opts]) of
+ case ssh_acceptor_sup:start_child(AccPid, Opts) of
{error, {already_started, _}} ->
{error, eaddrinuse};
{ok, _} ->
@@ -835,3 +959,8 @@ handle_user_pref_pubkey_algs([H|T], Acc) ->
false ->
false
end.
+
+fmt_host({A,B,C,D}) ->
+ lists:concat([A,".",B,".",C,".",D]);
+fmt_host(T={_,_,_,_,_,_,_,_}) ->
+ lists:flatten(string:join([io_lib:format("~.16B",[A]) || A <- tuple_to_list(T)], ":")).
diff --git a/lib/ssh/src/ssh_acceptor.erl b/lib/ssh/src/ssh_acceptor.erl
index 90fd951dcd..9f3e60bd62 100644
--- a/lib/ssh/src/ssh_acceptor.erl
+++ b/lib/ssh/src/ssh_acceptor.erl
@@ -27,7 +27,8 @@
%% Internal application API
-export([start_link/5,
number_of_connections/1,
- callback_listen/3]).
+ callback_listen/3,
+ handle_connection/5]).
%% spawn export
-export([acceptor_init/6, acceptor_loop/6]).
diff --git a/lib/ssh/src/ssh_acceptor_sup.erl b/lib/ssh/src/ssh_acceptor_sup.erl
index 4f76dbe6f0..129f85a3e0 100644
--- a/lib/ssh/src/ssh_acceptor_sup.erl
+++ b/lib/ssh/src/ssh_acceptor_sup.erl
@@ -36,6 +36,8 @@
-define(DEFAULT_TIMEOUT, 50000).
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
%%%=========================================================================
%%% API
%%%=========================================================================
diff --git a/lib/ssh/src/ssh_channel_sup.erl b/lib/ssh/src/ssh_channel_sup.erl
index 8eaa85f795..6b01dc334d 100644
--- a/lib/ssh/src/ssh_channel_sup.erl
+++ b/lib/ssh/src/ssh_channel_sup.erl
@@ -43,6 +43,8 @@ start_child(Sup, ChildSpec) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init(_Args) ->
RestartStrategy = one_for_one,
MaxR = 10,
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl
index 2d60008de6..74cd2e081a 100644
--- a/lib/ssh/src/ssh_cli.erl
+++ b/lib/ssh/src/ssh_cli.erl
@@ -47,6 +47,21 @@
%%====================================================================
%% ssh_channel callbacks
%%====================================================================
+-spec init(Args :: term()) ->
+ {ok, State :: term()} | {ok, State :: term(), timeout() | hibernate} |
+ {stop, Reason :: term()} | ignore.
+
+-spec terminate(Reason :: (normal | shutdown | {shutdown, term()} |
+ term()),
+ State :: term()) ->
+ term().
+
+-spec handle_msg(Msg ::term(), State :: term()) ->
+ {ok, State::term()} | {stop, ChannelId::integer(), State::term()}.
+-spec handle_ssh_msg({ssh_cm, ConnectionRef::term(), SshMsg::term()},
+ State::term()) -> {ok, State::term()} |
+ {stop, ChannelId::integer(),
+ State::term()}.
%%--------------------------------------------------------------------
%% Function: init(Args) -> {ok, State}
diff --git a/lib/ssh/src/ssh_client_key_api.erl b/lib/ssh/src/ssh_client_key_api.erl
index 039a7dea9b..6e994ff292 100644
--- a/lib/ssh/src/ssh_client_key_api.erl
+++ b/lib/ssh/src/ssh_client_key_api.erl
@@ -23,14 +23,26 @@
-include_lib("public_key/include/public_key.hrl").
-include("ssh.hrl").
--callback is_host_key(PublicKey :: #'RSAPublicKey'{}| {integer(), #'Dss-Parms'{}}| term() , Host :: string(),
- Algorithm :: 'ssh-rsa'| 'ssh-dss'| atom(), ConnectOptions :: proplists:proplist()) ->
+-export_type([algorithm/0]).
+
+-type algorithm() :: 'ssh-rsa'
+ | 'ssh-dss'
+ | 'ecdsa-sha2-nistp256'
+ | 'ecdsa-sha2-nistp384'
+ | 'ecdsa-sha2-nistp521'
+ .
+
+-callback is_host_key(PublicKey :: public_key:public_key(),
+ Host :: string(),
+ Algorithm :: algorithm(),
+ ConnectOptions :: proplists:proplist()) ->
boolean().
--callback user_key(Algorithm :: 'ssh-rsa'| 'ssh-dss'| atom(), ConnectOptions :: proplists:proplist()) ->
- {ok, PrivateKey :: #'RSAPrivateKey'{}| #'DSAPrivateKey'{} | term()} | {error, string()}.
+-callback user_key(Algorithm :: algorithm(),
+ ConnectOptions :: proplists:proplist()) ->
+ {ok, PrivateKey::public_key:private_key()} | {error, term()}.
--callback add_host_key(Host :: string(), PublicKey :: #'RSAPublicKey'{}| {integer(), #'Dss-Parms'{}}| term(),
- Options :: list()) ->
+-callback add_host_key(Host :: string(), PublicKey :: public_key:public_key(),
+ Options :: proplists:proplist()) ->
ok | {error, Error::term()}.
diff --git a/lib/ssh/src/ssh_connection_sup.erl b/lib/ssh/src/ssh_connection_sup.erl
index 8c7628e909..0f54053f52 100644
--- a/lib/ssh/src/ssh_connection_sup.erl
+++ b/lib/ssh/src/ssh_connection_sup.erl
@@ -45,6 +45,8 @@ start_child(Sup, Args) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init(_) ->
RestartStrategy = simple_one_for_one,
MaxR = 0,
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl
index 4486d36fe4..216f65f33a 100644
--- a/lib/ssh/src/ssh_file.erl
+++ b/lib/ssh/src/ssh_file.erl
@@ -43,7 +43,28 @@
-define(PERM_644, 8#644).
-%% API
+%%% API
+
+%%% client
+-spec add_host_key(string(),
+ public_key:public_key(),
+ proplists:proplist()) -> ok | {error,term()}.
+
+-spec is_host_key(public_key:public_key(),
+ string(),
+ ssh_client_key_api:algorithm(),
+ proplists:proplist()) -> boolean().
+
+-spec user_key(ssh_client_key_api:algorithm(),
+ proplists:proplist()) -> {ok, public_key:private_key()} | {error,term()}.
+
+%%% server
+-spec host_key(ssh_server_key_api:algorithm(),
+ proplists:proplist()) -> {ok, public_key:private_key()} | {error,term()}.
+
+-spec is_auth_key(public_key:public_key(),
+ string(), proplists:proplist()) -> boolean().
+
%% Used by server
host_key(Algorithm, Opts) ->
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index db80d4c9e3..562f040477 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -50,7 +50,15 @@
-define(Empint(X), (ssh_bits:mpint(X))/binary ).
-define(Ebinary(X), ?STRING(X) ).
--define(unicode_list(B), unicode:characters_to_list(B)).
+ucl(B) ->
+ try unicode:characters_to_list(B) of
+ L when is_list(L) -> L;
+ {error,_Matched,Rest} -> throw({error,{bad_unicode,Rest}})
+ catch
+ _:_ -> throw({error,bad_unicode})
+ end.
+
+-define(unicode_list(B), ucl(B)).
encode(#ssh_msg_global_request{
name = Name,
diff --git a/lib/ssh/src/ssh_server_key_api.erl b/lib/ssh/src/ssh_server_key_api.erl
index c1d43a486c..3f1b886fa7 100644
--- a/lib/ssh/src/ssh_server_key_api.erl
+++ b/lib/ssh/src/ssh_server_key_api.erl
@@ -23,9 +23,16 @@
-include_lib("public_key/include/public_key.hrl").
-include("ssh.hrl").
--callback host_key(Algorithm :: 'ssh-rsa'| 'ssh-dss'| atom(), DaemonOptions :: proplists:proplist()) ->
- {ok, PrivateKey :: #'RSAPrivateKey'{}| #'DSAPrivateKey'{} | term()} | {error, string()}.
+-export_type([algorithm/0]).
--callback is_auth_key(PublicKey :: #'RSAPublicKey'{}| {integer(), #'Dss-Parms'{}}| term(),
- User :: string(), DaemonOptions :: proplists:proplist()) ->
+-type algorithm() :: ssh_client_key_api:algorithm().
+
+
+-callback host_key(Algorithm :: algorithm(),
+ DaemonOptions :: proplists:proplist()) ->
+ {ok, PrivateKey :: public_key:private_key()} | {error, term()}.
+
+-callback is_auth_key(PublicKey :: public_key:public_key(),
+ User :: string(),
+ DaemonOptions :: proplists:proplist()) ->
boolean().
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl
index b03652a136..afc2fb88ff 100644
--- a/lib/ssh/src/ssh_sftp.erl
+++ b/lib/ssh/src/ssh_sftp.erl
@@ -95,8 +95,31 @@
%%====================================================================
start_channel(Cm) when is_pid(Cm) ->
start_channel(Cm, []);
+start_channel(Socket) when is_port(Socket) ->
+ start_channel(Socket, []);
start_channel(Host) when is_list(Host) ->
start_channel(Host, []).
+
+start_channel(Socket, Options) when is_port(Socket) ->
+ Timeout =
+ %% A mixture of ssh:connect and ssh_sftp:start_channel:
+ case proplists:get_value(connect_timeout, Options, undefined) of
+ undefined ->
+ proplists:get_value(timeout, Options, infinity);
+ TO ->
+ TO
+ end,
+ case ssh:connect(Socket, Options, Timeout) of
+ {ok,Cm} ->
+ case start_channel(Cm, Options) of
+ {ok, Pid} ->
+ {ok, Pid, Cm};
+ Error ->
+ Error
+ end;
+ Error ->
+ Error
+ end;
start_channel(Cm, Opts) when is_pid(Cm) ->
Timeout = proplists:get_value(timeout, Opts, infinity),
{_, ChanOpts, SftpOpts} = handle_options(Opts, [], [], []),
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 819cba697e..dca018f20f 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -57,6 +57,22 @@
%%====================================================================
%% API
%%====================================================================
+-spec init(Args :: term()) ->
+ {ok, State :: term()} | {ok, State :: term(), timeout() | hibernate} |
+ {stop, Reason :: term()} | ignore.
+
+-spec terminate(Reason :: (normal | shutdown | {shutdown, term()} |
+ term()),
+ State :: term()) ->
+ term().
+
+-spec handle_msg(Msg ::term(), State :: term()) ->
+ {ok, State::term()} | {stop, ChannelId::integer(), State::term()}.
+-spec handle_ssh_msg({ssh_cm, ConnectionRef::term(), SshMsg::term()},
+ State::term()) -> {ok, State::term()} |
+ {stop, ChannelId::integer(),
+ State::term()}.
+
subsystem_spec(Options) ->
{"sftp", {?MODULE, Options}}.
diff --git a/lib/ssh/src/ssh_shell.erl b/lib/ssh/src/ssh_shell.erl
index d31d5a297d..17224b6ef4 100644
--- a/lib/ssh/src/ssh_shell.erl
+++ b/lib/ssh/src/ssh_shell.erl
@@ -45,6 +45,21 @@
%%====================================================================
%% ssh_channel callbacks
%%====================================================================
+-spec init(Args :: term()) ->
+ {ok, State :: term()} | {ok, State :: term(), timeout() | hibernate} |
+ {stop, Reason :: term()} | ignore.
+
+-spec terminate(Reason :: (normal | shutdown | {shutdown, term()} |
+ term()),
+ State :: term()) ->
+ term().
+
+-spec handle_msg(Msg ::term(), State :: term()) ->
+ {ok, State::term()} | {stop, ChannelId::integer(), State::term()}.
+-spec handle_ssh_msg({ssh_cm, ConnectionRef::term(), SshMsg::term()},
+ State::term()) -> {ok, State::term()} |
+ {stop, ChannelId::integer(),
+ State::term()}.
%%--------------------------------------------------------------------
%% Function: init(Args) -> {ok, State}
diff --git a/lib/ssh/src/ssh_subsystem_sup.erl b/lib/ssh/src/ssh_subsystem_sup.erl
index 11e02491c4..637f5f398f 100644
--- a/lib/ssh/src/ssh_subsystem_sup.erl
+++ b/lib/ssh/src/ssh_subsystem_sup.erl
@@ -51,6 +51,8 @@ channel_supervisor(SupPid) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init([Opts]) ->
RestartStrategy = one_for_all,
MaxR = 0,
diff --git a/lib/ssh/src/ssh_sup.erl b/lib/ssh/src/ssh_sup.erl
index f827594717..8b57387589 100644
--- a/lib/ssh/src/ssh_sup.erl
+++ b/lib/ssh/src/ssh_sup.erl
@@ -31,6 +31,8 @@
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init([]) ->
SupFlags = {one_for_one, 10, 3600},
Children = children(),
diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl
index 9a9786a914..e97ac7b01a 100644
--- a/lib/ssh/src/ssh_system_sup.erl
+++ b/lib/ssh/src/ssh_system_sup.erl
@@ -125,11 +125,16 @@ restart_acceptor(Address, Port, Profile) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init([ServerOpts]) ->
RestartStrategy = one_for_one,
MaxR = 0,
MaxT = 3600,
- Children = child_specs(ServerOpts),
+ Children = case proplists:get_value(asocket,ServerOpts) of
+ undefined -> child_specs(ServerOpts);
+ _ -> []
+ end,
{ok, {{RestartStrategy, MaxR, MaxT}, Children}}.
%%%=========================================================================
diff --git a/lib/ssh/src/sshc_sup.erl b/lib/ssh/src/sshc_sup.erl
index 71b5c2c46a..15858f36e1 100644
--- a/lib/ssh/src/sshc_sup.erl
+++ b/lib/ssh/src/sshc_sup.erl
@@ -51,6 +51,8 @@ stop_child(Client) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init(Args) ->
RestartStrategy = simple_one_for_one,
MaxR = 0,
diff --git a/lib/ssh/src/sshd_sup.erl b/lib/ssh/src/sshd_sup.erl
index ac9e232b3a..04d2df30f7 100644
--- a/lib/ssh/src/sshd_sup.erl
+++ b/lib/ssh/src/sshd_sup.erl
@@ -75,6 +75,8 @@ system_name(SysSup) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
+-spec init( [term()] ) -> {ok,{supervisor:sup_flags(),[supervisor:child_spec()]}} | ignore .
+
init([Servers]) ->
RestartStrategy = one_for_one,
MaxR = 10,
diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl
index 9910b8f1d7..0f68130a05 100644
--- a/lib/ssh/test/ssh_algorithms_SUITE.erl
+++ b/lib/ssh/test/ssh_algorithms_SUITE.erl
@@ -24,11 +24,12 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("ssh/src/ssh_transport.hrl").
+-include("ssh_test_lib.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
--define(TIMEOUT, 10000).
+-define(TIMEOUT, 35000).
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
@@ -70,30 +71,39 @@ two_way_tags() -> [cipher,mac,compression].
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- ct:log("os:getenv(\"HOME\") = ~p~n"
- "init:get_argument(home) = ~p",
- [os:getenv("HOME"), init:get_argument(home)]),
- ct:log("~n~n"
- "OS ssh:~n=======~n~p~n~n~n"
- "Erl ssh:~n========~n~p~n~n~n"
- "Installed ssh client:~n=====================~n~p~n~n~n"
- "Installed ssh server:~n=====================~n~p~n~n~n"
- "Misc values:~n============~n"
- " -- Default dh group exchange parameters ({min,def,max}): ~p~n"
- " -- dh_default_groups: ~p~n"
- " -- Max num algorithms: ~p~n"
- ,[os:cmd("ssh -V"),
- ssh:default_algorithms(),
- ssh_test_lib:default_algorithms(sshc),
- ssh_test_lib:default_algorithms(sshd),
- {?DEFAULT_DH_GROUP_MIN,?DEFAULT_DH_GROUP_NBITS,?DEFAULT_DH_GROUP_MAX},
- public_key:dh_gex_group_sizes(),
- ?MAX_NUM_ALGORITHMS
- ]),
- ct:log("all() ->~n ~p.~n~ngroups()->~n ~p.~n",[all(),groups()]),
- ssh:start(),
- [{std_simple_sftp_size,25000} % Sftp transferred data size
- | setup_pubkey(Config)].
+ ?CHECK_CRYPTO(
+ begin
+ ct:log("~n"
+ "Environment:~n============~n"
+ "os:getenv(\"HOME\") = ~p~n"
+ "init:get_argument(home) = ~p~n~n~n"
+ "OS ssh:~n=======~n~p~n~n~n"
+ "Erl ssh:~n========~n~p~n~n~n"
+ "crypto:info_lib():~n========~n~p~n~n~n"
+ "Installed ssh client:~n=====================~n~p~n~n~n"
+ "Installed ssh server:~n=====================~n~p~n~n~n"
+ "Misc values:~n============~n"
+ " -- Default dh group exchange parameters ({min,def,max}): ~p~n"
+ " -- dh_default_groups: ~p~n"
+ " -- Max num algorithms: ~p~n"
+ ,[os:getenv("HOME"),
+ init:get_argument(home),
+ os:cmd("ssh -V"),
+ ssh:default_algorithms(),
+ crypto:info_lib(),
+ ssh_test_lib:default_algorithms(sshc),
+ ssh_test_lib:default_algorithms(sshd),
+ {?DEFAULT_DH_GROUP_MIN,?DEFAULT_DH_GROUP_NBITS,?DEFAULT_DH_GROUP_MAX},
+ public_key:dh_gex_group_sizes(),
+ ?MAX_NUM_ALGORITHMS
+ ]),
+ ct:log("all() ->~n ~p.~n~ngroups()->~n ~p.~n",[all(),groups()]),
+ ssh:start(),
+ [{std_simple_sftp_size,25000} % Sftp transferred data size
+ | setup_pubkey(Config)]
+ end
+ ).
+
end_per_suite(_Config) ->
ssh:stop().
@@ -109,7 +119,7 @@ init_per_group(Group, Config) ->
false ->
%% An algorithm group
Tag = proplists:get_value(name,
- hd(?config(tc_group_path, Config))),
+ hd(proplists:get_value(tc_group_path, Config))),
Alg = Group,
PA =
case split(Alg) of
@@ -126,47 +136,45 @@ init_per_group(Group, Config) ->
end.
end_per_group(_Alg, Config) ->
- case ?config(srvr_pid,Config) of
+ case proplists:get_value(srvr_pid,Config) of
Pid when is_pid(Pid) ->
ssh:stop_daemon(Pid),
- ct:log("stopped ~p",[?config(srvr_addr,Config)]);
+ ct:log("stopped ~p",[proplists:get_value(srvr_addr,Config)]);
_ ->
ok
end.
-init_per_testcase(sshc_simple_exec, Config) ->
- start_pubkey_daemon([?config(pref_algs,Config)], Config);
-
+init_per_testcase(sshc_simple_exec_os_cmd, Config) ->
+ start_pubkey_daemon([proplists:get_value(pref_algs,Config)], Config);
init_per_testcase(_TC, Config) ->
Config.
-end_per_testcase(sshc_simple_exec, Config) ->
- case ?config(srvr_pid,Config) of
+end_per_testcase(sshc_simple_exec_os_cmd, Config) ->
+ case proplists:get_value(srvr_pid,Config) of
Pid when is_pid(Pid) ->
ssh:stop_daemon(Pid),
- ct:log("stopped ~p",[?config(srvr_addr,Config)]);
+ ct:log("stopped ~p",[proplists:get_value(srvr_addr,Config)]);
_ ->
ok
end;
end_per_testcase(_TC, Config) ->
Config.
-
%%--------------------------------------------------------------------
%% Test Cases --------------------------------------------------------
%%--------------------------------------------------------------------
%% A simple sftp transfer
simple_sftp(Config) ->
- {Host,Port} = ?config(srvr_addr, Config),
+ {Host,Port} = proplists:get_value(srvr_addr, Config),
ssh_test_lib:std_simple_sftp(Host, Port, Config).
%%--------------------------------------------------------------------
%% A simple exec call
simple_exec(Config) ->
- {Host,Port} = ?config(srvr_addr, Config),
+ {Host,Port} = proplists:get_value(srvr_addr, Config),
ssh_test_lib:std_simple_exec(Host, Port, Config).
%%--------------------------------------------------------------------
@@ -221,18 +229,36 @@ interpolate(Is) ->
%%--------------------------------------------------------------------
%% Use the ssh client of the OS to connect
-sshc_simple_exec(Config) ->
+sshc_simple_exec_os_cmd(Config) ->
PrivDir = ?config(priv_dir, Config),
KnownHosts = filename:join(PrivDir, "known_hosts"),
{Host,Port} = ?config(srvr_addr, Config),
- Cmd = lists:concat(["ssh -p ",Port,
- " -C",
- " -o UserKnownHostsFile=",KnownHosts,
- " -o StrictHostKeyChecking=no",
- " ",Host," 1+1."]),
- ct:log("~p",[Cmd]),
- OpenSsh = ssh_test_lib:open_port({spawn, Cmd}, [eof,exit_status]),
- ssh_test_lib:rcv_expected({data,<<"2\n">>}, OpenSsh, ?TIMEOUT).
+ Parent = self(),
+ Client = spawn(
+ fun() ->
+ Cmd = lists:concat(["ssh -p ",Port,
+ " -C"
+ " -o UserKnownHostsFile=",KnownHosts,
+ " -o StrictHostKeyChecking=no"
+ " ",Host," 1+1."]),
+ Result = os:cmd(Cmd),
+ ct:log("~p~n = ~p",[Cmd, Result]),
+ Parent ! {result, self(), Result, "2"}
+ end),
+ receive
+ {result, Client, RawResult, Expect} ->
+ Lines = string:tokens(RawResult, "\r\n"),
+ case lists:any(fun(Line) -> Line==Expect end,
+ Lines) of
+ true ->
+ ok;
+ false ->
+ ct:log("Bad result: ~p~nExpected: ~p~nMangled result: ~p", [RawResult,Expect,Lines]),
+ {fail, "Bad result"}
+ end
+ after ?TIMEOUT ->
+ ct:fail("Did not receive answer")
+ end.
%%--------------------------------------------------------------------
%% Connect to the ssh server of the OS
@@ -299,7 +325,7 @@ specific_test_cases(Tag, Alg, SshcAlgos, SshdAlgos) ->
true ->
case ssh_test_lib:ssh_type() of
openSSH ->
- [sshc_simple_exec];
+ [sshc_simple_exec_os_cmd];
_ ->
[]
end;
@@ -359,8 +385,8 @@ start_pubkey_daemon(Opts0, Config) ->
setup_pubkey(Config) ->
- DataDir = ?config(data_dir, Config),
- UserDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa(DataDir, UserDir),
ssh_test_lib:setup_rsa(DataDir, UserDir),
ssh_test_lib:setup_ecdsa("256", DataDir, UserDir),
@@ -370,7 +396,7 @@ setup_pubkey(Config) ->
simple_exec_group(I, Config) when is_integer(I) ->
simple_exec_group({I,I,I}, Config);
simple_exec_group({Min,I,Max}, Config) ->
- {Host,Port} = ?config(srvr_addr, Config),
+ {Host,Port} = proplists:get_value(srvr_addr, Config),
ssh_test_lib:std_simple_exec(Host, Port, Config,
[{dh_gex_limits,{Min,I,Max}}]).
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 0fa44ded4f..733414e23a 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -25,6 +25,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/inet.hrl").
-include_lib("kernel/include/file.hrl").
+-include("ssh_test_lib.hrl").
%% Note: This directive should only be used in test suites.
%%-compile(export_all).
@@ -130,28 +131,28 @@ basic_tests() ->
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- Config.
+ ?CHECK_CRYPTO(Config).
end_per_suite(_Config) ->
ssh:stop().
%%--------------------------------------------------------------------
init_per_group(dsa_key, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa(DataDir, PrivDir),
Config;
init_per_group(rsa_key, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_rsa(DataDir, PrivDir),
Config;
init_per_group(ecdsa_sha2_nistp256_key, Config) ->
case lists:member('ecdsa-sha2-nistp256',
ssh_transport:default_algorithms(public_key)) of
true ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_ecdsa("256", DataDir, PrivDir),
Config;
false ->
@@ -161,8 +162,8 @@ init_per_group(ecdsa_sha2_nistp384_key, Config) ->
case lists:member('ecdsa-sha2-nistp384',
ssh_transport:default_algorithms(public_key)) of
true ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_ecdsa("384", DataDir, PrivDir),
Config;
false ->
@@ -172,28 +173,28 @@ init_per_group(ecdsa_sha2_nistp521_key, Config) ->
case lists:member('ecdsa-sha2-nistp521',
ssh_transport:default_algorithms(public_key)) of
true ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_ecdsa("521", DataDir, PrivDir),
Config;
false ->
{skip, unsupported_pub_key}
end;
init_per_group(rsa_pass_key, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_rsa_pass_pharse(DataDir, PrivDir, "Password"),
[{pass_phrase, {rsa_pass_phrase, "Password"}}| Config];
init_per_group(dsa_pass_key, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa_pass_pharse(DataDir, PrivDir, "Password"),
[{pass_phrase, {dsa_pass_phrase, "Password"}}| Config];
init_per_group(host_user_key_differs, Config) ->
- Data = ?config(data_dir, Config),
- Sys = filename:join(?config(priv_dir, Config), system_rsa),
+ Data = proplists:get_value(data_dir, Config),
+ Sys = filename:join(proplists:get_value(priv_dir, Config), system_rsa),
SysUsr = filename:join(Sys, user),
- Usr = filename:join(?config(priv_dir, Config), user_ecdsa_256),
+ Usr = filename:join(proplists:get_value(priv_dir, Config), user_ecdsa_256),
file:make_dir(Sys),
file:make_dir(SysUsr),
file:make_dir(Usr),
@@ -205,18 +206,18 @@ init_per_group(host_user_key_differs, Config) ->
ssh_test_lib:setup_rsa_known_host(Sys, Usr),
Config;
init_per_group(key_cb, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa(DataDir, PrivDir),
Config;
init_per_group(internal_error, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa(DataDir, PrivDir),
file:delete(filename:join(PrivDir, "system/ssh_host_dsa_key")),
Config;
init_per_group(dir_options, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
%% Make unreadable dir:
Dir_unreadable = filename:join(PrivDir, "unread"),
ok = file:make_dir(Dir_unreadable),
@@ -261,27 +262,27 @@ init_per_group(_, Config) ->
Config.
end_per_group(dsa_key, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(PrivDir),
Config;
end_per_group(rsa_key, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_rsa(PrivDir),
Config;
end_per_group(dsa_pass_key, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(PrivDir),
Config;
end_per_group(rsa_pass_key, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_rsa(PrivDir),
Config;
end_per_group(key_cb, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(PrivDir),
Config;
end_per_group(internal_error, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(PrivDir),
Config;
@@ -290,9 +291,9 @@ end_per_group(_, Config) ->
%%--------------------------------------------------------------------
init_per_testcase(TC, Config) when TC==shell_no_unicode ;
TC==shell_unicode_string ->
- PrivDir = ?config(priv_dir, Config),
- UserDir = ?config(priv_dir, Config),
- SysDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
ssh:start(),
Sftpd = {_Pid, _Host, Port} =
ssh_test_lib:daemon([{system_dir, SysDir},
@@ -321,12 +322,12 @@ init_per_testcase(_TestCase, Config) ->
end_per_testcase(TestCase, Config) when TestCase == server_password_option;
TestCase == server_userpassword_option ->
- UserDir = filename:join(?config(priv_dir, Config), nopubkey),
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), nopubkey),
ssh_test_lib:del_dirs(UserDir),
end_per_testcase(Config);
end_per_testcase(TC, Config) when TC==shell_no_unicode ;
TC==shell_unicode_string ->
- case ?config(sftpd, Config) of
+ case proplists:get_value(sftpd, Config) of
{Pid, _, _} ->
ssh:stop_daemon(Pid),
ssh:stop();
@@ -355,8 +356,8 @@ appup_test(Config) when is_list(Config) ->
%%% some options not yet present are not decided if we should support or
%%% if they need thier own test case.
misc_ssh_options(Config) when is_list(Config) ->
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
CMiscOpt0 = [{connect_timeout, 1000}, {user_dir, UserDir}],
CMiscOpt1 = [{connect_timeout, infinity}, {user_dir, UserDir}],
@@ -369,8 +370,8 @@ misc_ssh_options(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%%% Test configuring IPv4
inet_option(Config) when is_list(Config) ->
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
ClientOpts = [{silently_accept_hosts, true},
{user_dir, UserDir},
@@ -385,8 +386,8 @@ inet_option(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%%% Test configuring IPv6
inet6_option(Config) when is_list(Config) ->
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
ClientOpts = [{silently_accept_hosts, true},
{user_dir, UserDir},
@@ -402,8 +403,8 @@ inet6_option(Config) when is_list(Config) ->
%%% Test api function ssh_connection:exec
exec(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -449,8 +450,8 @@ exec_compressed(Config) when is_list(Config) ->
true ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},{user_dir, UserDir},
{preferred_algorithms,[{compression, [zlib]}]},
@@ -478,8 +479,8 @@ exec_compressed(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%%% Idle timeout test
idle_time(Config) ->
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -501,8 +502,8 @@ idle_time(Config) ->
%%% Test that ssh:shell/2 works
shell(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{_Pid, _Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},{user_dir, UserDir},
{failfun, fun ssh_test_lib:failfun/2}]),
@@ -536,9 +537,9 @@ exec_key_differs(Config, UserPKAlgs) ->
of
[] ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system_rsa),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system_rsa),
SystemUserDir = filename:join(SystemDir, user),
- UserDir = filename:join(?config(priv_dir, Config), user_ecdsa_256),
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), user_ecdsa_256),
{_Pid, _Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, SystemUserDir},
@@ -570,9 +571,9 @@ exec_key_differs(Config, UserPKAlgs) ->
%%--------------------------------------------------------------------
exec_key_differs_fail(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system_rsa),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system_rsa),
SystemUserDir = filename:join(SystemDir, user),
- UserDir = filename:join(?config(priv_dir, Config), user_ecdsa_256),
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), user_ecdsa_256),
{_Pid, _Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, SystemUserDir},
@@ -597,10 +598,10 @@ exec_key_differs_fail(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
cli(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
- TmpDir = filename:join(?config(priv_dir,Config), "tmp"),
+ TmpDir = filename:join(proplists:get_value(priv_dir,Config), "tmp"),
ok = ssh_test_lib:del_dirs(TmpDir),
ok = file:make_dir(TmpDir),
@@ -639,8 +640,8 @@ cli(Config) when is_list(Config) ->
%%% Test that get correct error message if you try to start a daemon
%%% on an adress that already runs a daemon see also seq10667
daemon_already_started(Config) when is_list(Config) ->
- SystemDir = ?config(data_dir, Config),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, _Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -654,8 +655,8 @@ daemon_already_started(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%%% check that known_hosts is updated correctly
known_hosts(Config) when is_list(Config) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{user_dir, PrivDir},{system_dir, SystemDir},
{failfun, fun ssh_test_lib:failfun/2}]),
@@ -681,9 +682,9 @@ known_hosts(Config) when is_list(Config) ->
%%% Test that we can use keyes protected by pass phrases
pass_phrase(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
- PhraseArg = ?config(pass_phrase, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
+ PhraseArg = proplists:get_value(pass_phrase, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -700,8 +701,8 @@ pass_phrase(Config) when is_list(Config) ->
%%% Test that we can use key callback
key_callback(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
NoPubKeyDir = filename:join(UserDir, "nopubkey"),
file:make_dir(NoPubKeyDir),
@@ -724,8 +725,8 @@ key_callback(Config) when is_list(Config) ->
%%% Test that we can use key callback with callback options
key_callback_options(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
NoPubKeyDir = filename:join(UserDir, "nopubkey"),
file:make_dir(NoPubKeyDir),
@@ -751,8 +752,8 @@ key_callback_options(Config) when is_list(Config) ->
%%% Test that client does not hang if disconnects due to internal error
internal_error(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -768,8 +769,8 @@ internal_error(Config) when is_list(Config) ->
%%% Test ssh_connection:send/3
send(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -788,8 +789,8 @@ send(Config) when is_list(Config) ->
%%% Test ssh:connection_info([peername, sockname])
peername_sockname(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -838,8 +839,8 @@ ips(Name) when is_list(Name) ->
%%% Client receives close when server closes
close(Config) when is_list(Config) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Server, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -861,8 +862,8 @@ close(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%%% Simulate that we try to close an already closed connection
double_close(Config) when is_list(Config) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
@@ -881,8 +882,8 @@ double_close(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
daemon_opt_fd(Config) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
@@ -908,8 +909,8 @@ daemon_opt_fd(Config) ->
%%--------------------------------------------------------------------
multi_daemon_opt_fd(Config) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
@@ -943,8 +944,8 @@ multi_daemon_opt_fd(Config) ->
%%--------------------------------------------------------------------
packet_size_zero(Config) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
@@ -974,7 +975,7 @@ packet_size_zero(Config) ->
%%--------------------------------------------------------------------
shell_no_unicode(Config) ->
- new_do_shell(?config(io,Config),
+ new_do_shell(proplists:get_value(io,Config),
[new_prompt,
{type,"io:format(\"hej ~p~n\",[42])."},
{expect,"hej 42"},
@@ -985,7 +986,7 @@ shell_no_unicode(Config) ->
%%--------------------------------------------------------------------
shell_unicode_string(Config) ->
- new_do_shell(?config(io,Config),
+ new_do_shell(proplists:get_value(io,Config),
[new_prompt,
{type,"io:format(\"こにちわ~ts~n\",[\"四二\"])."},
{expect,"こにちわ四二"},
@@ -1002,8 +1003,8 @@ openssh_zlib_basic_test(Config) ->
{skip, io_lib:format("~p compression is not supported",[L])};
true ->
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{user_dir, UserDir},
@@ -1023,11 +1024,11 @@ openssh_zlib_basic_test(Config) ->
%%--------------------------------------------------------------------
ssh_info_print(Config) ->
%% Just check that ssh_print:info() crashes
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
PrintFile = filename:join(PrivDir,info),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
UnexpFun = fun(Msg,_Peer) ->
@@ -1103,8 +1104,8 @@ check_error(Error) ->
ct:fail(Error).
basic_test(Config) ->
- ClientOpts = ?config(client_opts, Config),
- ServerOpts = ?config(server_opts, Config),
+ ClientOpts = proplists:get_value(client_opts, Config),
+ ServerOpts = proplists:get_value(server_opts, Config),
{Pid, Host, Port} = ssh_test_lib:daemon(ServerOpts),
{ok, CM} = ssh:connect(Host, Port, ClientOpts),
diff --git a/lib/ssh/test/ssh_benchmark_SUITE.erl b/lib/ssh/test/ssh_benchmark_SUITE.erl
index d9be1a32b7..c2bfc48449 100644
--- a/lib/ssh/test/ssh_benchmark_SUITE.erl
+++ b/lib/ssh/test/ssh_benchmark_SUITE.erl
@@ -29,7 +29,9 @@
-include_lib("ssh/src/ssh_userauth.hrl").
-suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
+suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]},
+ {timetrap,{minutes,3}}
+ ].
%%suite() -> [{ct_hooks,[ts_install_cth]}].
all() -> [{group, opensshc_erld}
@@ -63,8 +65,8 @@ end_per_suite(_Config) ->
init_per_group(opensshc_erld, Config) ->
case ssh_test_lib:ssh_type() of
openSSH ->
- DataDir = ?config(data_dir, Config),
- UserDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa(DataDir, UserDir),
ssh_test_lib:setup_rsa(DataDir, UserDir),
ssh_test_lib:setup_ecdsa("256", DataDir, UserDir),
@@ -97,7 +99,7 @@ end_per_testcase(_Func, _Conf) ->
init_sftp_dirs(Config) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
SrcDir = filename:join(UserDir, "sftp_src"),
ok = file:make_dir(SrcDir),
SrcFile = "big_data",
@@ -127,8 +129,8 @@ openssh_client_shell(Config) ->
openssh_client_shell(Config, Options) ->
- SystemDir = ?config(data_dir, Config),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
KnownHosts = filename:join(UserDir, "known_hosts"),
{ok, TracerPid} = erlang_trace(),
@@ -184,7 +186,7 @@ openssh_client_shell(Config, Options) ->
end, Times),
ssh:stop_daemon(ServerPid),
ok
- after 10000 ->
+ after 60*1000 ->
ssh:stop_daemon(ServerPid),
exit(SlavePid, kill),
{fail, timeout}
@@ -200,11 +202,11 @@ openssh_client_sftp(Config) ->
openssh_client_sftp(Config, Options) ->
- SystemDir = ?config(data_dir, Config),
- UserDir = ?config(priv_dir, Config),
- SftpSrcDir = ?config(sftp_src_dir, Config),
- SrcFile = ?config(src_file, Config),
- SrcSize = ?config(sftp_size, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
+ SftpSrcDir = proplists:get_value(sftp_src_dir, Config),
+ SrcFile = proplists:get_value(src_file, Config),
+ SrcSize = proplists:get_value(sftp_size, Config),
KnownHosts = filename:join(UserDir, "known_hosts"),
{ok, TracerPid} = erlang_trace(),
@@ -215,6 +217,7 @@ openssh_client_sftp(Config, Options) ->
{root, SftpSrcDir}])]},
{failfun, fun ssh_test_lib:failfun/2}
| Options]),
+ ct:pal("ServerPid = ~p",[ServerPid]),
ct:sleep(500),
Cmd = lists:concat(["sftp",
" -b -",
@@ -231,7 +234,7 @@ openssh_client_sftp(Config, Options) ->
end),
receive
{SlavePid, _ClientResponse} ->
- ct:pal("ClientResponse = ~p",[_ClientResponse]),
+ ct:pal("ClientResponse = ~p~nServerPid = ~p",[_ClientResponse,ServerPid]),
{ok, List} = get_trace_list(TracerPid),
%%ct:pal("List=~p",[List]),
Times = find_times(List, [channel_open_close]),
@@ -260,7 +263,7 @@ openssh_client_sftp(Config, Options) ->
end, Times),
ssh:stop_daemon(ServerPid),
ok
- after 10000 ->
+ after 2*60*1000 ->
ssh:stop_daemon(ServerPid),
exit(SlavePid, kill),
{fail, timeout}
@@ -274,7 +277,7 @@ variants(Tag, Config) ->
[A|_] when is_atom(A) -> two_way
end,
[ [{Tag,tag_value(TagType,Alg)}]
- || Alg <- proplists:get_value(Tag, ?config(common_algs,Config))
+ || Alg <- proplists:get_value(Tag, proplists:get_value(common_algs,Config))
].
tag_value(two_way, Alg) -> [Alg];
@@ -445,10 +448,18 @@ increment({Alg,Sz,T},[]) ->
%%% API for the traceing
%%%
get_trace_list(TracerPid) ->
+ MonRef = monitor(process, TracerPid),
TracerPid ! {get_trace_list,self()},
receive
- {trace_list,L} -> {ok, pair_events(lists:reverse(L))}
- after 5000 -> {error,no_reply}
+ {trace_list,L} ->
+ demonitor(MonRef),
+ {ok, pair_events(lists:reverse(L))};
+ {'DOWN', MonRef, process, TracerPid, Info} ->
+ {error, {tracer_down,Info}}
+
+ after 3*60*1000 ->
+ demonitor(MonRef),
+ {error,no_reply}
end.
erlang_trace() ->
diff --git a/lib/ssh/test/ssh_connection_SUITE.erl b/lib/ssh/test/ssh_connection_SUITE.erl
index 0f757a0322..bcf3b01824 100644
--- a/lib/ssh/test/ssh_connection_SUITE.erl
+++ b/lib/ssh/test/ssh_connection_SUITE.erl
@@ -43,10 +43,15 @@ suite() ->
all() ->
[
{group, openssh},
+ small_interrupted_send,
interrupted_send,
start_shell,
start_shell_exec,
start_shell_exec_fun,
+ start_shell_sock_exec_fun,
+ start_shell_sock_daemon_exec,
+ connect_sock_not_tcp,
+ daemon_sock_not_tcp,
gracefull_invalid_version,
gracefull_invalid_start,
gracefull_invalid_long_start,
@@ -56,10 +61,11 @@ all() ->
max_channels_option
].
groups() ->
- [{openssh, [], payload() ++ ptty()}].
+ [{openssh, [], payload() ++ ptty() ++ sock()}].
payload() ->
[simple_exec,
+ simple_exec_sock,
small_cat,
big_cat,
send_after_exit].
@@ -69,9 +75,14 @@ ptty() ->
ptty_alloc,
ptty_alloc_pixel].
+sock() ->
+ [connect_sock_not_passive,
+ daemon_sock_not_passive
+ ].
+
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- Config.
+ ?CHECK_CRYPTO(Config).
end_per_suite(Config) ->
Config.
@@ -111,6 +122,18 @@ simple_exec() ->
simple_exec(Config) when is_list(Config) ->
ConnectionRef = ssh_test_lib:connect(?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
{user_interaction, false}]),
+ do_simple_exec(ConnectionRef).
+
+
+simple_exec_sock(_Config) ->
+ {ok, Sock} = gen_tcp:connect("localhost", ?SSH_DEFAULT_PORT, [{active,false}]),
+ {ok, ConnectionRef} = ssh:connect(Sock, [{silently_accept_hosts, true},
+ {user_interaction, false}]),
+ do_simple_exec(ConnectionRef).
+
+
+
+do_simple_exec(ConnectionRef) ->
{ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
success = ssh_connection:exec(ConnectionRef, ChannelId0,
"echo testing", infinity),
@@ -143,6 +166,30 @@ simple_exec(Config) when is_list(Config) ->
end.
%%--------------------------------------------------------------------
+connect_sock_not_tcp(_Config) ->
+ {ok,Sock} = gen_udp:open(0, []),
+ {error, not_tcp_socket} = ssh:connect(Sock, []),
+ gen_udp:close(Sock).
+
+%%--------------------------------------------------------------------
+daemon_sock_not_tcp(_Config) ->
+ {ok,Sock} = gen_udp:open(0, []),
+ {error, not_tcp_socket} = ssh:daemon(Sock),
+ gen_udp:close(Sock).
+
+%%--------------------------------------------------------------------
+connect_sock_not_passive(_Config) ->
+ {ok,Sock} = gen_tcp:connect("localhost", ?SSH_DEFAULT_PORT, []),
+ {error, not_passive_mode} = ssh:connect(Sock, []),
+ gen_tcp:close(Sock).
+
+%%--------------------------------------------------------------------
+daemon_sock_not_passive(_Config) ->
+ {ok,Sock} = gen_tcp:connect("localhost", ?SSH_DEFAULT_PORT, []),
+ {error, not_passive_mode} = ssh:daemon(Sock),
+ gen_tcp:close(Sock).
+
+%%--------------------------------------------------------------------
small_cat() ->
[{doc, "Use 'cat' to echo small data block back to us."}].
@@ -315,54 +362,106 @@ ptty_alloc_pixel(Config) when is_list(Config) ->
ssh:close(ConnectionRef).
%%--------------------------------------------------------------------
+small_interrupted_send(Config) ->
+ K = 1024,
+ M = K*K,
+ do_interrupted_send(Config, 10*M, 4*K).
interrupted_send(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ M = 1024*1024,
+ do_interrupted_send(Config, 10*M, 4*M).
+
+do_interrupted_send(Config, SendSize, EchoSize) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
+ EchoSS_spec = {ssh_echo_server, [EchoSize,[{dbg,true}]]},
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"},
- {subsystems, [{"echo_n", {ssh_echo_server, [4000000]}}]}]),
-
+ {subsystems, [{"echo_n",EchoSS_spec}]}]),
+
+ ct:log("connect", []),
ConnectionRef = ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
{user, "foo"},
{password, "morot"},
{user_interaction, false},
{user_dir, UserDir}]),
-
- {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
-
- success = ssh_connection:subsystem(ConnectionRef, ChannelId, "echo_n", infinity),
-
- %% build 10MB binary
- Data = << <<X:32>> || X <- lists:seq(1,2500000)>>,
-
- %% expect remote end to send us 4MB back
- <<ExpectedData:4000000/binary, _/binary>> = Data,
-
- %% pre-adjust receive window so the other end doesn't block
- ssh_connection:adjust_window(ConnectionRef, ChannelId, size(ExpectedData) + 1),
-
- case ssh_connection:send(ConnectionRef, ChannelId, Data, 10000) of
- {error, closed} ->
- ok;
- Msg ->
- ct:fail({expected,{error,closed}, got, Msg})
- end,
- receive_data(ExpectedData, ConnectionRef, ChannelId),
- ssh:close(ConnectionRef),
- ssh:stop_daemon(Pid).
+ ct:log("connected", []),
+
+ %% build big binary
+ Data = << <<X:32>> || X <- lists:seq(1,SendSize div 4)>>,
+
+ %% expect remote end to send us EchoSize back
+ <<ExpectedData:EchoSize/binary, _/binary>> = Data,
+
+ %% Spawn listener. Otherwise we could get a deadlock due to filled buffers
+ Parent = self(),
+ ResultPid = spawn(
+ fun() ->
+ ct:log("open channel",[]),
+ {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity),
+ ct:log("start subsystem", []),
+ case ssh_connection:subsystem(ConnectionRef, ChannelId, "echo_n", infinity) of
+ success ->
+ Parent ! {self(), channelId, ChannelId},
+
+ Result =
+ try collect_data(ConnectionRef, ChannelId)
+ of
+ ExpectedData ->
+ ok;
+ _ ->
+ {fail,"unexpected result"}
+ catch
+ Class:Exception ->
+ {fail, io_lib:format("Exception ~p:~p",[Class,Exception])}
+ end,
+ Parent ! {self(), Result};
+ Other ->
+ Parent ! {self(), channelId, error, Other}
+ end
+ end),
+
+ receive
+ {ResultPid, channelId, ChannelId} ->
+ %% pre-adjust receive window so the other end doesn't block
+ ct:log("adjust window", []),
+ ssh_connection:adjust_window(ConnectionRef, ChannelId, size(ExpectedData) + 1),
+
+ ct:log("going to send ~p bytes", [size(Data)]),
+ case ssh_connection:send(ConnectionRef, ChannelId, Data, 30000) of
+ {error, closed} ->
+ ct:log("{error,closed} - That's what we expect :)", []),
+ ok;
+ Msg ->
+ ct:log("Got ~p - that's bad, very bad indeed",[Msg]),
+ ct:fail({expected,{error,closed}, got, Msg})
+ end,
+ ct:log("going to check the result (if it is available)", []),
+ receive
+ {ResultPid, Result} ->
+ ct:log("Got result: ~p", [Result]),
+ ssh:close(ConnectionRef),
+ ssh:stop_daemon(Pid),
+ Result
+ end;
+
+ {ResultPid, channelId, error, Other} ->
+ ssh:close(ConnectionRef),
+ ssh:stop_daemon(Pid),
+ {fail, io_lib:format("ssh_connection:subsystem: ~p",[Other])}
+ end.
%%--------------------------------------------------------------------
start_shell() ->
[{doc, "Start a shell"}].
start_shell(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"},
@@ -391,10 +490,10 @@ start_shell_exec() ->
[{doc, "start shell to exec command"}].
start_shell_exec(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"},
@@ -425,10 +524,10 @@ start_shell_exec_fun() ->
[{doc, "start shell to exec command"}].
start_shell_exec_fun(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"},
@@ -456,12 +555,85 @@ start_shell_exec_fun(Config) when is_list(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+start_shell_sock_exec_fun() ->
+ [{doc, "start shell on tcp-socket to exec command"}].
+
+start_shell_sock_exec_fun(Config) when is_list(Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+ SysDir = proplists:get_value(data_dir, Config),
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {exec, fun ssh_exec/1}]),
+
+ {ok, Sock} = gen_tcp:connect(Host, Port, [{active,false}]),
+ {ok,ConnectionRef} = ssh:connect(Sock, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+
+ {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
+
+ success = ssh_connection:exec(ConnectionRef, ChannelId0,
+ "testing", infinity),
+
+ receive
+ {ssh_cm, ConnectionRef, {data, _ChannelId, 0, <<"testing\r\n">>}} ->
+ ok
+ after 5000 ->
+ ct:fail("Exec Timeout")
+ end,
+
+ ssh:close(ConnectionRef),
+ ssh:stop_daemon(Pid).
+
+%%--------------------------------------------------------------------
+start_shell_sock_daemon_exec(Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+ SysDir = proplists:get_value(data_dir, Config),
+ {ok,Sl} = gen_tcp:listen(0, [{active,false}]),
+ {ok,{_IP,Port}} = inet:sockname(Sl), % _IP is likely to be {0,0,0,0}. Win don't like...
+
+ spawn_link(fun() ->
+ {ok,Ss} = gen_tcp:connect("localhost", Port, [{active,false}]),
+ {ok, _Pid} = ssh:daemon(Ss, [{system_dir, SysDir},
+ {user_dir, UserDir},
+ {password, "morot"},
+ {exec, fun ssh_exec/1}])
+ end),
+ {ok,Sc} = gen_tcp:accept(Sl),
+ {ok,ConnectionRef} = ssh:connect(Sc, [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "morot"},
+ {user_interaction, true},
+ {user_dir, UserDir}]),
+
+ {ok, ChannelId0} = ssh_connection:session_channel(ConnectionRef, infinity),
+
+ success = ssh_connection:exec(ConnectionRef, ChannelId0,
+ "testing", infinity),
+
+ receive
+ {ssh_cm, ConnectionRef, {data, _ChannelId, 0, <<"testing\r\n">>}} ->
+ ok
+ after 5000 ->
+ ct:fail("Exec Timeout")
+ end,
+
+ ssh:close(ConnectionRef).
+
+%%--------------------------------------------------------------------
gracefull_invalid_version(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
@@ -481,10 +653,10 @@ gracefull_invalid_version(Config) when is_list(Config) ->
end.
gracefull_invalid_start(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"}]),
@@ -503,10 +675,10 @@ gracefull_invalid_start(Config) when is_list(Config) ->
end.
gracefull_invalid_long_start(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"}]),
@@ -526,10 +698,10 @@ gracefull_invalid_long_start(Config) when is_list(Config) ->
gracefull_invalid_long_start_no_nl(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{_Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"}]),
@@ -551,10 +723,10 @@ stop_listener() ->
[{doc, "start ssh daemon, setup connections, stop listener, restart listner"}].
stop_listener(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid0, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
@@ -610,10 +782,10 @@ stop_listener(Config) when is_list(Config) ->
end.
start_subsystem_on_closed_channel(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"},
@@ -639,10 +811,10 @@ max_channels_option() ->
[{doc, "Test max_channels option"}].
max_channels_option(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"},
@@ -737,20 +909,36 @@ big_cat_rx(ConnectionRef, ChannelId, Acc) ->
timeout
end.
-receive_data(ExpectedData, ConnectionRef, ChannelId) ->
- ExpectedData = collect_data(ConnectionRef, ChannelId).
-
collect_data(ConnectionRef, ChannelId) ->
- collect_data(ConnectionRef, ChannelId, []).
+ ct:log("Listener ~p running! ConnectionRef=~p, ChannelId=~p",[self(),ConnectionRef,ChannelId]),
+ collect_data(ConnectionRef, ChannelId, [], 0).
-collect_data(ConnectionRef, ChannelId, Acc) ->
+collect_data(ConnectionRef, ChannelId, Acc, Sum) ->
+ TO = 5000,
receive
- {ssh_cm, ConnectionRef, {data, ChannelId, 0, Data}} ->
- collect_data(ConnectionRef, ChannelId, [Data | Acc]);
+ {ssh_cm, ConnectionRef, {data, ChannelId, 0, Data}} when is_binary(Data) ->
+ ct:log("collect_data: received ~p bytes. total ~p bytes",[size(Data),Sum+size(Data)]),
+ collect_data(ConnectionRef, ChannelId, [Data | Acc], Sum+size(Data));
{ssh_cm, ConnectionRef, {eof, ChannelId}} ->
- iolist_to_binary(lists:reverse(Acc))
- after 5000 ->
- timeout
+ try
+ iolist_to_binary(lists:reverse(Acc))
+ of
+ Bin ->
+ ct:log("collect_data: received eof.~nGot in total ~p bytes",[size(Bin)]),
+ Bin
+ catch
+ C:E ->
+ ct:log("collect_data: received eof.~nAcc is strange...~nException=~p:~p~nAcc=~p",
+ [C,E,Acc]),
+ {error,{C,E}}
+ end;
+ Msg ->
+ ct:log("collect_data: ***** unexpected message *****~n~p",[Msg]),
+ collect_data(ConnectionRef, ChannelId, Acc, Sum)
+
+ after TO ->
+ ct:log("collect_data: ----- Nothing received for ~p seconds -----~n",[]),
+ collect_data(ConnectionRef, ChannelId, Acc, Sum)
end.
%%%-------------------------------------------------------------------
diff --git a/lib/ssh/test/ssh_echo_server.erl b/lib/ssh/test/ssh_echo_server.erl
index ed9bbe1b67..5387d21efd 100644
--- a/lib/ssh/test/ssh_echo_server.erl
+++ b/lib/ssh/test/ssh_echo_server.erl
@@ -26,15 +26,29 @@
-record(state, {
n,
id,
- cm
+ cm,
+ dbg = false
}).
-export([init/1, handle_msg/2, handle_ssh_msg/2, terminate/2]).
+-define(DBG(State,Fmt,Args),
+ case State#state.dbg of
+ true -> ct:log("~p:~p ~p "++Fmt, [?MODULE,?LINE,self()|Args]);
+ false -> ok
+ end).
+
+
init([N]) ->
- ct:pal("Echo server: ~p",[self()]),
- {ok, #state{n = N}}.
+ {ok, #state{n = N}};
+init([N,Opts]) ->
+ State = #state{n = N,
+ dbg = proplists:get_value(dbg,Opts,false)
+ },
+ ?DBG(State, "init([~p])",[N]),
+ {ok, State}.
handle_msg({ssh_channel_up, ChannelId, ConnectionManager}, State) ->
+ ?DBG(State, "ssh_channel_up Cid=~p ConnMngr=~p",[ChannelId,ConnectionManager]),
{ok, State#state{id = ChannelId,
cm = ConnectionManager}}.
@@ -42,32 +56,39 @@ handle_ssh_msg({ssh_cm, CM, {data, ChannelId, 0, Data}}, #state{n = N} = State)
M = N - size(Data),
case M > 0 of
true ->
+ ?DBG(State, "ssh_cm data Cid=~p size(Data)=~p M=~p",[ChannelId,size(Data),M]),
ssh_connection:send(CM, ChannelId, Data),
{ok, State#state{n = M}};
false ->
<<SendData:N/binary, _/binary>> = Data,
+ ?DBG(State, "ssh_cm data Cid=~p size(Data)=~p M=~p size(SendData)=~p~nSend eof",[ChannelId,size(Data),M,size(SendData)]),
ssh_connection:send(CM, ChannelId, SendData),
ssh_connection:send_eof(CM, ChannelId),
{stop, ChannelId, State}
end;
handle_ssh_msg({ssh_cm, _ConnectionManager,
{data, _ChannelId, 1, Data}}, State) ->
+ ?DBG(State, "stderr: ~p",[Data]),
error_logger:format(standard_error, " ~p~n", [binary_to_list(Data)]),
{ok, State};
handle_ssh_msg({ssh_cm, _ConnectionManager, {eof, _ChannelId}}, State) ->
+ ?DBG(State, "{eof ~p}",[_ChannelId]),
{ok, State};
-handle_ssh_msg({ssh_cm, _, {signal, _, _}}, State) ->
+handle_ssh_msg({ssh_cm, _, _Sig={signal, _, _}}, State) ->
%% Ignore signals according to RFC 4254 section 6.9.
+ ?DBG(State, "~p",[_Sig]),
{ok, State};
-handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, _, _Error, _}},
- State) ->
+handle_ssh_msg({ssh_cm, _, _Sig={exit_signal, ChannelId, _, _Error, _}}, State) ->
+ ?DBG(State, "~p",[_Sig]),
{stop, ChannelId, State};
-handle_ssh_msg({ssh_cm, _, {exit_status, ChannelId, _Status}}, State) ->
+handle_ssh_msg({ssh_cm, _, _Sig={exit_status, ChannelId, _Status}}, State) ->
+ ?DBG(State, "~p",[_Sig]),
{stop, ChannelId, State}.
terminate(_Reason, _State) ->
+ ?DBG(_State, "terminate ~p",[_Reason]),
ok.
diff --git a/lib/ssh/test/ssh_options_SUITE.erl b/lib/ssh/test/ssh_options_SUITE.erl
index 4ca6a473fa..61883c0647 100644
--- a/lib/ssh/test/ssh_options_SUITE.erl
+++ b/lib/ssh/test/ssh_options_SUITE.erl
@@ -27,7 +27,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/file.hrl").
-
+-include("ssh_test_lib.hrl").
%%% Test cases
-export([connectfun_disconnectfun_client/1,
@@ -126,19 +126,19 @@ groups() ->
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- Config.
+ ?CHECK_CRYPTO(Config).
end_per_suite(_Config) ->
ssh:stop().
%%--------------------------------------------------------------------
init_per_group(hardening_tests, Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa(DataDir, PrivDir),
Config;
init_per_group(dir_options, Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
%% Make unreadable dir:
Dir_unreadable = filename:join(PrivDir, "unread"),
ok = file:make_dir(Dir_unreadable),
@@ -193,7 +193,7 @@ end_per_testcase(TestCase, Config) when TestCase == server_password_option;
TestCase == server_userpassword_option;
TestCase == server_pwdfun_option;
TestCase == server_pwdfun_4_option ->
- UserDir = filename:join(?config(priv_dir, Config), nopubkey),
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), nopubkey),
ssh_test_lib:del_dirs(UserDir),
end_per_testcase(Config);
end_per_testcase(_TestCase, Config) ->
@@ -210,10 +210,10 @@ end_per_testcase(_Config) ->
%%% validate to server that uses the 'password' option
server_password_option(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
{password, "morot"}]),
@@ -243,10 +243,10 @@ server_password_option(Config) when is_list(Config) ->
%%% validate to server that uses the 'password' option
server_userpassword_option(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, PrivDir},
{user_passwords, [{"vego", "morot"}]}]),
@@ -278,10 +278,10 @@ server_userpassword_option(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%%% validate to server that uses the 'pwdfun' option
server_pwdfun_option(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
CHKPWD = fun("foo",Pwd) -> Pwd=="bar";
(_,_) -> false
end,
@@ -316,10 +316,10 @@ server_pwdfun_option(Config) ->
%%--------------------------------------------------------------------
%%% validate to server that uses the 'pwdfun/4' option
server_pwdfun_4_option(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
PWDFUN = fun("foo",Pwd,{_,_},undefined) -> Pwd=="bar";
("fie",Pwd,{_,_},undefined) -> {Pwd=="bar",new_state};
("bandit",_,_,_) -> disconnect;
@@ -376,10 +376,10 @@ server_pwdfun_4_option(Config) ->
%%--------------------------------------------------------------------
server_pwdfun_4_option_repeat(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
%% Test that the state works
Parent = self(),
PWDFUN = fun("foo",P="bar",_,S) -> Parent!{P,S},true;
@@ -471,10 +471,10 @@ user_dir_option(Config) ->
%%--------------------------------------------------------------------
%%% validate client that uses the 'ssh_msg_debug_fun' option
ssh_msg_debug_fun_option_client(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, UserDir},
@@ -511,10 +511,10 @@ ssh_msg_debug_fun_option_client(Config) ->
%%--------------------------------------------------------------------
connectfun_disconnectfun_server(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
Ref = make_ref(),
@@ -549,10 +549,10 @@ connectfun_disconnectfun_server(Config) ->
%%--------------------------------------------------------------------
connectfun_disconnectfun_client(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
Ref = make_ref(),
@@ -580,10 +580,10 @@ connectfun_disconnectfun_client(Config) ->
%%--------------------------------------------------------------------
%%% validate client that uses the 'ssh_msg_debug_fun' option
ssh_msg_debug_fun_option_server(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
DbgFun = fun(ConnRef,Displ,Msg,Lang) -> Parent ! {msg_dbg,{ConnRef,Displ,Msg,Lang}} end,
@@ -624,10 +624,10 @@ ssh_msg_debug_fun_option_server(Config) ->
%%--------------------------------------------------------------------
disconnectfun_option_server(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
DisConnFun = fun(Reason) -> Parent ! {disconnect,Reason} end,
@@ -659,10 +659,10 @@ disconnectfun_option_server(Config) ->
%%--------------------------------------------------------------------
disconnectfun_option_client(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
DisConnFun = fun(Reason) -> Parent ! {disconnect,Reason} end,
@@ -693,10 +693,10 @@ disconnectfun_option_client(Config) ->
%%--------------------------------------------------------------------
unexpectedfun_option_server(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
ConnFun = fun(_,_,_) -> Parent ! {connection_pid,self()} end,
@@ -736,10 +736,10 @@ unexpectedfun_option_server(Config) ->
%%--------------------------------------------------------------------
unexpectedfun_option_client(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
- SysDir = ?config(data_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
Parent = self(),
UnexpFun = fun(Msg,Peer) ->
@@ -859,8 +859,8 @@ ms_passed(T0) ->
%%--------------------------------------------------------------------
ssh_daemon_minimal_remote_max_packet_size_option(Config) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
@@ -957,8 +957,8 @@ ssh_connect_negtimeout_sequential(Config) -> ssh_connect_negtimeout(Config,false
ssh_connect_negtimeout(Config, Parallel) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
NegTimeOut = 2000, % ms
ct:log("Parallel: ~p",[Parallel]),
@@ -990,8 +990,8 @@ ssh_connect_nonegtimeout_connected_sequential(Config) ->
ssh_connect_nonegtimeout_connected(Config, Parallel) ->
process_flag(trap_exit, true),
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
NegTimeOut = 2000, % ms
ct:log("Parallel: ~p",[Parallel]),
@@ -1067,7 +1067,7 @@ connect_fun(ssh__connect, Config) ->
fun(Host,Port) ->
ssh_test_lib:connect(Host, Port,
[{silently_accept_hosts, true},
- {user_dir, ?config(priv_dir,Config)},
+ {user_dir, proplists:get_value(priv_dir,Config)},
{user_interaction, false},
{user, "carni"},
{password, "meat"}
@@ -1092,8 +1092,8 @@ max_sessions(Config, ParallelLogin, Connect0) when is_function(Connect0,2) ->
ct:log("Connect(~p,~p) -> ~p",[Host,Port,R]),
R
end,
- SystemDir = filename:join(?config(priv_dir, Config), system),
- UserDir = ?config(priv_dir, Config),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
+ UserDir = proplists:get_value(priv_dir, Config),
MaxSessions = 5,
{Pid, Host, Port} = ssh_test_lib:daemon([
{system_dir, SystemDir},
diff --git a/lib/ssh/test/ssh_property_test_SUITE.erl b/lib/ssh/test/ssh_property_test_SUITE.erl
index c5cc36c45e..c8aabcedb7 100644
--- a/lib/ssh/test/ssh_property_test_SUITE.erl
+++ b/lib/ssh/test/ssh_property_test_SUITE.erl
@@ -57,7 +57,7 @@ init_per_suite(Config) ->
%%% One group in this suite happens to support only QuickCheck, so skip it
%%% if we run proper.
init_per_group(client_server, Config) ->
- case ?config(property_test_tool,Config) of
+ case proplists:get_value(property_test_tool,Config) of
eqc -> Config;
X -> {skip, lists:concat([X," is not supported"])}
end;
diff --git a/lib/ssh/test/ssh_protocol_SUITE.erl b/lib/ssh/test/ssh_protocol_SUITE.erl
index 57404f40db..4fac1f718a 100644
--- a/lib/ssh/test/ssh_protocol_SUITE.erl
+++ b/lib/ssh/test/ssh_protocol_SUITE.erl
@@ -26,6 +26,7 @@
-include_lib("ssh/src/ssh.hrl"). % ?UINT32, ?BYTE, #ssh{} ...
-include_lib("ssh/src/ssh_transport.hrl").
-include_lib("ssh/src/ssh_auth.hrl").
+-include("ssh_test_lib.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
@@ -87,7 +88,7 @@ groups() ->
init_per_suite(Config) ->
- start_std_daemon( setup_dirs( start_apps(Config))).
+ ?CHECK_CRYPTO(start_std_daemon( setup_dirs( start_apps(Config)))).
end_per_suite(Config) ->
stop_apps(Config).
@@ -107,11 +108,11 @@ init_per_testcase(TC, Config) when TC == gex_client_init_option_groups ;
gex_client_init_option_groups ->
[{dh_gex_groups, [{2345, 3, 41}]}];
gex_client_init_option_groups_file ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
F = filename:join(DataDir, "dh_group_test"),
[{dh_gex_groups, {file,F}}];
gex_client_init_option_groups_moduli_file ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
F = filename:join(DataDir, "dh_group_test.moduli"),
[{dh_gex_groups, {ssh_moduli_file,F}}];
_ when TC == gex_server_gex_limit ;
@@ -589,21 +590,21 @@ stop_apps(_Config) ->
setup_dirs(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_rsa(DataDir, PrivDir),
Config.
-system_dir(Config) -> filename:join(?config(priv_dir, Config), system).
+system_dir(Config) -> filename:join(proplists:get_value(priv_dir, Config), system).
-user_dir(Config) -> ?config(priv_dir, Config).
+user_dir(Config) -> proplists:get_value(priv_dir, Config).
%%%----------------------------------------------------------------
start_std_daemon(Config) ->
start_std_daemon(Config, []).
start_std_daemon(Config, ExtraOpts) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
UserPasswords = [{"user1","pwd1"}],
diff --git a/lib/ssh/test/ssh_renegotiate_SUITE.erl b/lib/ssh/test/ssh_renegotiate_SUITE.erl
index f1a909cbd0..b10ec3707f 100644
--- a/lib/ssh/test/ssh_renegotiate_SUITE.erl
+++ b/lib/ssh/test/ssh_renegotiate_SUITE.erl
@@ -21,6 +21,7 @@
-module(ssh_renegotiate_SUITE).
-include_lib("common_test/include/ct.hrl").
+-include("ssh_test_lib.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
@@ -45,7 +46,7 @@ tests() -> [rekey, rekey_limit, renegotiate1, renegotiate2].
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- Config.
+ ?CHECK_CRYPTO(Config).
end_per_suite(_Config) ->
ssh:stop().
@@ -108,10 +109,10 @@ rekey(Config) ->
rekey_limit() -> [{timetrap,{seconds,400}}].
rekey_limit(Config) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
DataFile = filename:join(UserDir, "rekey.data"),
- Algs = ?config(preferred_algorithms, Config),
+ Algs = proplists:get_value(preferred_algorithms, Config),
{Pid, Host, Port} = ssh_test_lib:std_daemon(Config,[{max_random_length_padding,0},
{preferred_algorithms,Algs}]),
@@ -154,10 +155,10 @@ rekey_limit(Config) ->
%%% Test rekeying with simulataneous send request
renegotiate1(Config) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
DataFile = filename:join(UserDir, "renegotiate1.data"),
- Algs = ?config(preferred_algorithms, Config),
+ Algs = proplists:get_value(preferred_algorithms, Config),
{Pid, Host, DPort} = ssh_test_lib:std_daemon(Config,[{max_random_length_padding,0},
{preferred_algorithms,Algs}]),
@@ -194,10 +195,10 @@ renegotiate1(Config) ->
%%% Test rekeying with inflight messages from peer
renegotiate2(Config) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
DataFile = filename:join(UserDir, "renegotiate2.data"),
- Algs = ?config(preferred_algorithms, Config),
+ Algs = proplists:get_value(preferred_algorithms, Config),
{Pid, Host, DPort} = ssh_test_lib:std_daemon(Config,[{max_random_length_padding,0},
{preferred_algorithms,Algs}]),
diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl
index f6d7be41d6..19ad81e7da 100644
--- a/lib/ssh/test/ssh_sftp_SUITE.erl
+++ b/lib/ssh/test/ssh_sftp_SUITE.erl
@@ -1,4 +1,4 @@
-%%
+%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2005-2016. All Rights Reserved.
@@ -26,7 +26,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/file.hrl").
-
+-include("ssh_test_lib.hrl").
% Default timetrap timeout
-define(default_timeout, ?t:minutes(1)).
@@ -45,10 +45,13 @@ all() ->
init_per_suite(Config) ->
- ct:log("file:native_name_encoding() = ~p,~nio:getopts() = ~p",
- [file:native_name_encoding(),io:getopts()]),
- ssh:start(),
- Config.
+ ?CHECK_CRYPTO(
+ begin
+ ct:log("file:native_name_encoding() = ~p,~nio:getopts() = ~p",
+ [file:native_name_encoding(),io:getopts()]),
+ ssh:start(),
+ Config
+ end).
end_per_suite(_onfig) ->
ssh:stop().
@@ -86,42 +89,43 @@ groups() ->
write_file, write_file_iolist, write_big_file, sftp_read_big_file,
rename_file, mk_rm_dir, remove_file, links,
retrieve_attributes, set_attributes, async_read,
- async_write, position, pos_read, pos_write
+ async_write, position, pos_read, pos_write,
+ start_channel_sock
]}
].
init_per_group(not_unicode, Config) ->
ct:comment("Begin ~p",[grps(Config)]),
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
[{user, "Alladin"},
{passwd, "Sesame"},
{data, <<"Hello world!">>},
- {filename, filename:join(PrivDir, "sftp.txt")},
- {testfile, filename:join(PrivDir, "test.txt")},
- {linktest, filename:join(PrivDir, "link_test.txt")},
- {tar_filename, filename:join(PrivDir, "sftp_tar_test.tar")},
- {tar_F1_txt, "f1.txt"},
+ {filename, "sftp.txt"},
+ {testfile, "test.txt"},
+ {linktest, "link_test.txt"},
+ {tar_filename, "sftp_tar_test.tar"},
+ {tar_F1_txt, "f1.txt"},
{datadir_tar, filename:join(DataDir,"sftp_tar_test_data")}
| Config];
init_per_group(unicode, Config) ->
- case file:native_name_encoding() of
- utf8 ->
+ case (file:native_name_encoding() == utf8)
+ andalso ("四" == [22235])
+ of
+ true ->
ct:comment("Begin ~p",[grps(Config)]),
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
NewConfig =
[{user, "åke高兴"},
{passwd, "ärlig日本じん"},
{data, <<"foobar å 一二三四いちにさんち">>},
- {filename, filename:join(PrivDir, "sftp瑞点.txt")},
- {testfile, filename:join(PrivDir, "testハンス.txt")},
- {linktest, filename:join(PrivDir, "link_test語.txt")},
- {tar_filename, filename:join(PrivDir, "sftp_tar_test一二三.tar")},
- {tar_F1_txt, "F一.txt"},
- {tar_F3_txt, "f3.txt"},
- {tar_F4_txt, "g四.txt"},
+ {filename, "sftp瑞点.txt"},
+ {testfile, "testハンス.txt"},
+ {linktest, "link_test語.txt"},
+ {tar_filename, "sftp_tar_test一二三.tar"},
+ {tar_F1_txt, "F一.txt"},
+ {tar_F3_txt, "f3.txt"},
+ {tar_F4_txt, "g四.txt"},
{datadir_tar, filename:join(DataDir,"sftp_tar_test_data_高兴")}
| lists:foldl(fun(K,Cf) -> lists:keydelete(K,1,Cf) end,
Config,
@@ -131,7 +135,7 @@ init_per_group(unicode, Config) ->
]
)
],
- FN = fn(?config(tar_F1_txt,NewConfig), NewConfig),
+ FN = fn(proplists:get_value(tar_F1_txt,NewConfig), NewConfig),
case catch file:read_file(FN) of
{ok,FN_contents} ->
ct:log("Readable file:read_file(~tp) ->~n~tp",[FN,FN_contents]),
@@ -147,10 +151,10 @@ init_per_group(unicode, Config) ->
init_per_group(erlang_server, Config) ->
ct:comment("Begin ~p",[grps(Config)]),
- PrivDir = ?config(priv_dir, Config),
- SysDir = ?config(data_dir, Config),
- User = ?config(user, Config),
- Passwd = ?config(passwd, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
+ User = proplists:get_value(user, Config),
+ Passwd = proplists:get_value(passwd, Config),
Sftpd = {_, HostX, PortX} =
ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, PrivDir},
@@ -176,12 +180,12 @@ init_per_group(openssh_server, Config) ->
init_per_group(remote_tar, Config) ->
ct:comment("Begin ~p",[grps(Config)]),
- {Host,Port} = ?config(peer, Config),
- ct:log("Server (~p) at ~p:~p",[?config(group,Config),Host,Port]),
- User = ?config(user, Config),
- Passwd = ?config(passwd, Config),
+ {Host,Port} = proplists:get_value(peer, Config),
+ ct:log("Server (~p) at ~p:~p",[proplists:get_value(group,Config),Host,Port]),
+ User = proplists:get_value(user, Config),
+ Passwd = proplists:get_value(passwd, Config),
{ok, Connection} =
- case ?config(group, Config) of
+ case proplists:get_value(group, Config) of
erlang_server ->
ssh:connect(Host, Port,
[{user, User},
@@ -216,10 +220,10 @@ end_per_group(_, Config) ->
%%--------------------------------------------------------------------
init_per_testcase(sftp_nonexistent_subsystem, Config) ->
- PrivDir = ?config(priv_dir, Config),
- SysDir = ?config(data_dir, Config),
- User = ?config(user, Config),
- Passwd = ?config(passwd, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ SysDir = proplists:get_value(data_dir, Config),
+ User = proplists:get_value(user, Config),
+ Passwd = proplists:get_value(passwd, Config),
Sftpd = ssh_test_lib:daemon([{system_dir, SysDir},
{user_dir, PrivDir},
{subsystems, []},
@@ -228,14 +232,14 @@ init_per_testcase(sftp_nonexistent_subsystem, Config) ->
]),
[{sftpd, Sftpd} | Config];
-init_per_testcase(version_option, Config) ->
- prep(Config),
+init_per_testcase(version_option, Config0) ->
+ Config = prepare(Config0),
TmpConfig0 = lists:keydelete(watchdog, 1, Config),
TmpConfig = lists:keydelete(sftp, 1, TmpConfig0),
Dog = ct:timetrap(?default_timeout),
- {_,Host, Port} = ?config(sftpd, Config),
- User = ?config(user, Config),
- Passwd = ?config(passwd, Config),
+ {_,Host, Port} = proplists:get_value(sftpd, Config),
+ User = proplists:get_value(user, Config),
+ Passwd = proplists:get_value(passwd, Config),
{ok, ChannelPid, Connection} =
ssh_sftp:start_channel(Host, Port,
[{sftp_vsn, 3},
@@ -246,18 +250,18 @@ init_per_testcase(version_option, Config) ->
Sftp = {ChannelPid, Connection},
[{sftp,Sftp}, {watchdog, Dog} | TmpConfig];
-init_per_testcase(Case, Config0) ->
- prep(Config0),
+init_per_testcase(Case, Config00) ->
+ Config0 = prepare(Config00),
Config1 = lists:keydelete(watchdog, 1, Config0),
Config2 = lists:keydelete(sftp, 1, Config1),
Dog = ct:timetrap(2 * ?default_timeout),
- User = ?config(user, Config0),
- Passwd = ?config(passwd, Config0),
+ User = proplists:get_value(user, Config0),
+ Passwd = proplists:get_value(passwd, Config0),
Config =
- case ?config(group,Config2) of
+ case proplists:get_value(group,Config2) of
erlang_server ->
- {_,Host, Port} = ?config(sftpd, Config2),
+ {_,Host, Port} = proplists:get_value(sftpd, Config2),
{ok, ChannelPid, Connection} =
ssh_sftp:start_channel(Host, Port,
[{user, User},
@@ -279,11 +283,11 @@ init_per_testcase(Case, Config0) ->
[{sftp, Sftp}, {watchdog, Dog} | Config2]
end,
- case catch ?config(remote_tar,Config) of
+ case catch proplists:get_value(remote_tar,Config) of
%% The 'catch' is for the case of Config={skip,...}
true ->
%% Provide a ChannelPid independent of the sftp-channel already opened.
- {ok,ChPid2} = ssh_sftp:start_channel(?config(connection,Config)),
+ {ok,ChPid2} = ssh_sftp:start_channel(proplists:get_value(connection,Config)),
[{channel_pid2,ChPid2} | Config];
_ ->
Config
@@ -292,16 +296,16 @@ init_per_testcase(Case, Config0) ->
end_per_testcase(sftp_nonexistent_subsystem, Config) ->
Config;
end_per_testcase(rename_file, Config) ->
- NewFileName = ?config(testfile, Config),
+ NewFileName = proplists:get_value(testfile, Config),
file:delete(NewFileName),
end_per_testcase(Config);
end_per_testcase(_, Config) ->
end_per_testcase(Config).
end_per_testcase(Config) ->
- {Sftp, Connection} = ?config(sftp, Config),
+ {Sftp, Connection} = proplists:get_value(sftp, Config),
ok = ssh_sftp:stop_channel(Sftp),
- catch ssh_sftp:stop_channel(?config(channel_pid2, Config)),
+ catch ssh_sftp:stop_channel(proplists:get_value(channel_pid2, Config)),
ok = ssh:close(Connection).
%%--------------------------------------------------------------------
@@ -310,9 +314,9 @@ end_per_testcase(Config) ->
open_close_file() ->
[{doc, "Test API functions open/3 and close/2"}].
open_close_file(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
+ FileName = proplists:get_value(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
ok = open_close_file(Sftp, FileName, [read]),
ok = open_close_file(Sftp, FileName, [write]),
@@ -329,9 +333,9 @@ open_close_file(Server, File, Mode) ->
open_close_dir() ->
[{doc, "Test API functions opendir/2 and close/2"}].
open_close_dir(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- {Sftp, _} = ?config(sftp, Config),
- FileName = ?config(filename, Config),
+ PrivDir = proplists:get_value(sftp_priv_dir, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
{ok, Handle} = ssh_sftp:opendir(Sftp, PrivDir),
ok = ssh_sftp:close(Sftp, Handle),
@@ -341,8 +345,8 @@ open_close_dir(Config) when is_list(Config) ->
read_file() ->
[{doc, "Test API funtion read_file/2"}].
read_file(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Data} = ssh_sftp:read_file(Sftp, FileName),
{ok, Data} = ssh_sftp:read_file(Sftp, FileName),
{ok, Data} = file:read_file(FileName).
@@ -351,8 +355,8 @@ read_file(Config) when is_list(Config) ->
read_dir() ->
[{doc,"Test API function list_dir/2"}].
read_dir(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- {Sftp, _} = ?config(sftp, Config),
+ PrivDir = proplists:get_value(sftp_priv_dir, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
ct:log("sftp list dir: ~p~n", [Files]).
@@ -360,8 +364,8 @@ read_dir(Config) when is_list(Config) ->
write_file() ->
[{doc, "Test API function write_file/2"}].
write_file(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
Data = list_to_binary("Hej hopp!"),
ok = ssh_sftp:write_file(Sftp, FileName, [Data]),
@@ -371,8 +375,8 @@ write_file(Config) when is_list(Config) ->
write_file_iolist() ->
[{doc, "Test API function write_file/2 with iolists"}].
write_file_iolist(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
Data = list_to_binary("Hej hopp!"),
lists:foreach(
@@ -392,8 +396,8 @@ write_file_iolist(Config) when is_list(Config) ->
write_big_file() ->
[{doc, "Test API function write_file/2 with big data"}].
write_big_file(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
Data = list_to_binary(lists:duplicate(750000,"a")),
ok = ssh_sftp:write_file(Sftp, FileName, [Data]),
@@ -403,8 +407,8 @@ write_big_file(Config) when is_list(Config) ->
sftp_read_big_file() ->
[{doc, "Test API function read_file/2 with big data"}].
sftp_read_big_file(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
Data = list_to_binary(lists:duplicate(750000,"a")),
ct:log("Data size to write is ~p bytes",[size(Data)]),
@@ -415,9 +419,9 @@ sftp_read_big_file(Config) when is_list(Config) ->
remove_file() ->
[{doc,"Test API function delete/2"}].
remove_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- FileName = ?config(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ PrivDir = proplists:get_value(sftp_priv_dir, Config),
+ FileName = proplists:get_value(filename, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
true = lists:member(filename:basename(FileName), Files),
@@ -429,11 +433,11 @@ remove_file(Config) when is_list(Config) ->
rename_file() ->
[{doc, "Test API function rename_file/2"}].
rename_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- FileName = ?config(filename, Config),
- NewFileName = ?config(testfile, Config),
+ PrivDir = proplists:get_value(sftp_priv_dir, Config),
+ FileName = proplists:get_value(filename, Config),
+ NewFileName = proplists:get_value(testfile, Config),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
ct:log("FileName: ~p, Files: ~p~n", [FileName, Files]),
true = lists:member(filename:basename(FileName), Files),
@@ -449,8 +453,8 @@ rename_file(Config) when is_list(Config) ->
mk_rm_dir() ->
[{doc,"Test API functions make_dir/2, del_dir/2"}].
mk_rm_dir(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- {Sftp, _} = ?config(sftp, Config),
+ PrivDir = proplists:get_value(sftp_priv_dir, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
DirName = filename:join(PrivDir, "test"),
ok = ssh_sftp:make_dir(Sftp, DirName),
@@ -467,9 +471,9 @@ links(Config) when is_list(Config) ->
{win32, _} ->
{skip, "Links are not fully supported by windows"};
_ ->
- {Sftp, _} = ?config(sftp, Config),
- FileName = ?config(filename, Config),
- LinkFileName = ?config(linktest, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
+ FileName = proplists:get_value(filename, Config),
+ LinkFileName = proplists:get_value(linktest, Config),
ok = ssh_sftp:make_symlink(Sftp, LinkFileName, FileName),
{ok, FileName} = ssh_sftp:read_link(Sftp, LinkFileName)
@@ -479,9 +483,9 @@ links(Config) when is_list(Config) ->
retrieve_attributes() ->
[{doc, "Test API function read_file_info/3"}].
retrieve_attributes(Config) when is_list(Config) ->
- FileName = ?config(filename, Config),
+ FileName = proplists:get_value(filename, Config),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, FileInfo} = ssh_sftp:read_file_info(Sftp, FileName),
{ok, NewFileInfo} = file:read_file_info(FileName),
@@ -492,9 +496,9 @@ retrieve_attributes(Config) when is_list(Config) ->
set_attributes() ->
[{doc,"Test API function write_file_info/3"}].
set_attributes(Config) when is_list(Config) ->
- FileName = ?config(testfile, Config),
+ FileName = proplists:get_value(testfile, Config),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok,Fd} = file:open(FileName, write),
io:put_chars(Fd,"foo"),
ok = ssh_sftp:write_file_info(Sftp, FileName, #file_info{mode=8#400}),
@@ -507,9 +511,9 @@ set_attributes(Config) when is_list(Config) ->
async_read() ->
[{doc,"Test API aread/3"}].
async_read(Config) when is_list(Config) ->
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
- FileName = ?config(filename, Config),
+ FileName = proplists:get_value(filename, Config),
{ok, Handle} = ssh_sftp:open(Sftp, FileName, [read]),
{async, Ref} = ssh_sftp:aread(Sftp, Handle, 20),
@@ -526,8 +530,8 @@ async_read(Config) when is_list(Config) ->
async_write() ->
[{doc,"Test API awrite/3"}].
async_write(Config) when is_list(Config) ->
- {Sftp, _} = ?config(sftp, Config),
- FileName = ?config(testfile, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
+ FileName = proplists:get_value(testfile, Config),
{ok, Handle} = ssh_sftp:open(Sftp, FileName, [write]),
Data = list_to_binary("foobar"),
{async, Ref} = ssh_sftp:awrite(Sftp, Handle, Data),
@@ -544,8 +548,8 @@ async_write(Config) when is_list(Config) ->
position() ->
[{doc, "Test API functions position/3"}].
position(Config) when is_list(Config) ->
- FileName = ?config(testfile, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(testfile, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
Data = list_to_binary("1234567890"),
ok = ssh_sftp:write_file(Sftp, FileName, [Data]),
@@ -573,8 +577,8 @@ position(Config) when is_list(Config) ->
pos_read() ->
[{doc,"Test API functions pread/3 and apread/3"}].
pos_read(Config) when is_list(Config) ->
- FileName = ?config(testfile, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(testfile, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
Data = list_to_binary("Hej hopp!"),
ok = ssh_sftp:write_file(Sftp, FileName, [Data]),
@@ -600,8 +604,8 @@ pos_read(Config) when is_list(Config) ->
pos_write() ->
[{doc,"Test API functions pwrite/4 and apwrite/4"}].
pos_write(Config) when is_list(Config) ->
- FileName = ?config(testfile, Config),
- {Sftp, _} = ?config(sftp, Config),
+ FileName = proplists:get_value(testfile, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Handle} = ssh_sftp:open(Sftp, FileName, [write]),
@@ -625,12 +629,65 @@ pos_write(Config) when is_list(Config) ->
{ok, NewData1} = ssh_sftp:read_file(Sftp, FileName).
%%--------------------------------------------------------------------
+start_channel_sock(Config) ->
+ LoginOpts =
+ case proplists:get_value(group,Config) of
+ erlang_server ->
+ [{user, proplists:get_value(user, Config)},
+ {password, proplists:get_value(passwd, Config)}];
+ openssh_server ->
+ [] % Use public key
+ end,
+
+ Opts = [{user_interaction, false},
+ {silently_accept_hosts, true}
+ | LoginOpts],
+
+ {Host,Port} = proplists:get_value(peer, Config),
+
+ %% Get a tcp socket
+ {ok, Sock} = gen_tcp:connect(Host, Port, [{active,false}]),
+
+ %% and open one channel on one new Connection
+ {ok, ChPid1, Conn} = ssh_sftp:start_channel(Sock, Opts),
+
+ %% Test that the channel is usable
+ FileName = proplists:get_value(filename, Config),
+ ok = open_close_file(ChPid1, FileName, [read]),
+ ok = open_close_file(ChPid1, FileName, [write]),
+
+ %% Try to open a second channel on the Connection
+ {ok, ChPid2} = ssh_sftp:start_channel(Conn, Opts),
+ ok = open_close_file(ChPid1, FileName, [read]),
+ ok = open_close_file(ChPid2, FileName, [read]),
+
+ %% Test that the second channel still works after closing the first one
+ ok = ssh_sftp:stop_channel(ChPid1),
+ ok = open_close_file(ChPid2, FileName, [write]),
+
+ %% Test the Connection survives that all channels are closed
+ ok = ssh_sftp:stop_channel(ChPid2),
+ {ok, ChPid3} = ssh_sftp:start_channel(Conn, Opts),
+ ok = open_close_file(ChPid3, FileName, [write]),
+
+ %% Test that a closed channel really is closed
+ {error, closed} = ssh_sftp:open(ChPid2, FileName, [write]),
+ ok = ssh_sftp:stop_channel(ChPid3),
+
+ %% Test that the socket is closed when the Connection closes
+ ok = ssh:close(Conn),
+ timer:sleep(400), %% Until the stop sequence is fixed
+ {error,einval} = inet:getopts(Sock, [active]),
+
+ ok.
+
+%%--------------------------------------------------------------------
sftp_nonexistent_subsystem() ->
[{doc, "Try to execute sftp subsystem on a server that does not support it"}].
sftp_nonexistent_subsystem(Config) when is_list(Config) ->
- {_,Host, Port} = ?config(sftpd, Config),
- User = ?config(user, Config),
- Passwd = ?config(passwd, Config),
+ {_,Host, Port} = proplists:get_value(sftpd, Config),
+ User = proplists:get_value(user, Config),
+ Passwd = proplists:get_value(passwd, Config),
{error,"server failed to start sftp subsystem"} =
ssh_sftp:start_channel(Host, Port,
[{user_interaction, false},
@@ -646,20 +703,20 @@ version_option(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
create_empty_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
erl_tar:close(Handle),
- {ChPid,_} = ?config(sftp,Config),
+ {ChPid,_} = proplists:get_value(sftp,Config),
{ok, #file_info{type=regular}} =
ssh_sftp:read_file_info(ChPid, TarFileName).
%%--------------------------------------------------------------------
files_to_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
- F1 = ?config(tar_F1_txt, Config),
+ F1 = proplists:get_value(tar_F1_txt, Config),
ok = erl_tar:add(Handle, fn(F1,Config), F1, [verbose]),
ok = erl_tar:add(Handle, fn("f2.txt",Config), "f2.txt", [verbose]),
ok = erl_tar:close(Handle),
@@ -667,8 +724,8 @@ files_to_tar(Config) ->
%%--------------------------------------------------------------------
ascii_filename_ascii_contents_to_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
ok = erl_tar:add(Handle, fn("f2.txt",Config), "f2.txt", [verbose]),
ok = erl_tar:close(Handle),
@@ -676,12 +733,12 @@ ascii_filename_ascii_contents_to_tar(Config) ->
%%--------------------------------------------------------------------
ascii_filename_unicode_contents_to_tar(Config) ->
- case ?config(tar_F3_txt, Config) of
+ case proplists:get_value(tar_F3_txt, Config) of
undefined ->
{skip, "Unicode test"};
Fn ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
ok = erl_tar:add(Handle, fn(Fn,Config), Fn, [verbose]),
ok = erl_tar:close(Handle),
@@ -690,12 +747,12 @@ ascii_filename_unicode_contents_to_tar(Config) ->
%%--------------------------------------------------------------------
unicode_filename_ascii_contents_to_tar(Config) ->
- case ?config(tar_F4_txt, Config) of
+ case proplists:get_value(tar_F4_txt, Config) of
undefined ->
{skip, "Unicode test"};
Fn ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
ok = erl_tar:add(Handle, fn(Fn,Config), Fn, [verbose]),
ok = erl_tar:close(Handle),
@@ -704,8 +761,8 @@ unicode_filename_ascii_contents_to_tar(Config) ->
%%--------------------------------------------------------------------
big_file_to_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
ok = erl_tar:add(Handle, fn("big.txt",Config), "big.txt", [verbose]),
ok = erl_tar:close(Handle),
@@ -714,18 +771,18 @@ big_file_to_tar(Config) ->
%%--------------------------------------------------------------------
files_chunked_to_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
- F1 = ?config(tar_F1_txt, Config),
+ F1 = proplists:get_value(tar_F1_txt, Config),
ok = erl_tar:add(Handle, fn(F1,Config), F1, [verbose,{chunks,2}]),
ok = erl_tar:close(Handle),
chk_tar([F1], Config).
%%--------------------------------------------------------------------
directory_to_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
ok = erl_tar:add(Handle, fn("d1",Config), "d1", [verbose]),
ok = erl_tar:close(Handle),
@@ -733,8 +790,8 @@ directory_to_tar(Config) ->
%%--------------------------------------------------------------------
binaries_to_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
- TarFileName = ?config(tar_filename, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
Bin = <<"A binary">>,
ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
@@ -743,15 +800,15 @@ binaries_to_tar(Config) ->
%%--------------------------------------------------------------------
null_crypto_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
Cinit = fun() -> {ok, no_state, _SendSize=5} end,
Cenc = fun(Bin,CState) -> {ok,Bin,CState,_SendSize=5} end,
Cend = fun(Bin,_CState) -> {ok,Bin} end,
C = {Cinit,Cenc,Cend},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,C}]),
Bin = <<"A binary">>,
- F1 = ?config(tar_F1_txt, Config),
+ F1 = proplists:get_value(tar_F1_txt, Config),
ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
ok = erl_tar:add(Handle, fn(F1,Config), F1, [verbose,{chunks,2}]),
ok = erl_tar:add(Handle, fn("big.txt",Config), "big.txt", [verbose,{chunks,15000}]),
@@ -760,16 +817,16 @@ null_crypto_tar(Config) ->
%%--------------------------------------------------------------------
simple_crypto_tar_small(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
Cinit = fun() -> {ok, no_state, _Size=6} end,
Cenc = fun(Bin,CState) -> {ok,stuff(Bin),CState,_SendSize=5} end,
Cdec = fun(Bin,CState) -> {ok,unstuff(Bin),CState,_Size=4} end,
Cend = fun(Bin,_CState) -> {ok,stuff(Bin)} end,
C = {Cinit,Cenc,Cend},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,C}]),
Bin = <<"A binary">>,
- F1 = ?config(tar_F1_txt, Config),
+ F1 = proplists:get_value(tar_F1_txt, Config),
ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
ok = erl_tar:add(Handle, fn(F1,Config), F1, [verbose,{chunks,2}]),
ok = erl_tar:close(Handle),
@@ -777,16 +834,16 @@ simple_crypto_tar_small(Config) ->
%%--------------------------------------------------------------------
simple_crypto_tar_big(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
Cinit = fun() -> {ok, no_state, _SendSize=6} end,
Cenc = fun(Bin,CState) -> {ok,stuff(Bin),CState,_SendSize=5} end,
Cdec = fun(Bin,CState) -> {ok,unstuff(Bin),CState,_SendSize=4} end,
Cend = fun(Bin,_CState) -> {ok,stuff(Bin)} end,
C = {Cinit,Cenc,Cend},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,Handle} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,C}]),
Bin = <<"A binary">>,
- F1 = ?config(tar_F1_txt, Config),
+ F1 = proplists:get_value(tar_F1_txt, Config),
ok = erl_tar:add(Handle, Bin, "b1", [verbose]),
ok = erl_tar:add(Handle, fn(F1,Config), F1, [verbose,{chunks,2}]),
ok = erl_tar:add(Handle, fn("big.txt",Config), "big.txt", [verbose,{chunks,15000}]),
@@ -799,12 +856,12 @@ unstuff(Bin) -> << <<C>> || <<C,C>> <= Bin >>.
%%--------------------------------------------------------------------
read_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
NameBins = lists:sort(
[{"b1",<<"A binary">>},
{"b2",list_to_binary(lists:duplicate(750000,"a"))}
]),
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, TarFileName, [write]),
[ok = erl_tar:add(HandleWrite, Bin, Name, [verbose])
|| {Name,Bin} <- NameBins],
@@ -814,7 +871,7 @@ read_tar(Config) ->
%%--------------------------------------------------------------------
read_null_crypto_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
NameBins = lists:sort(
[{"b1",<<"A binary">>},
{"b2",list_to_binary(lists:duplicate(750000,"a"))}
@@ -827,7 +884,7 @@ read_null_crypto_tar(Config) ->
Cw = {Cinitw,Cenc,Cendw},
Cr = {Cinitr,Cdec},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,Cw}]),
[ok = erl_tar:add(HandleWrite, Bin, Name, [verbose])
|| {Name,Bin} <- NameBins],
@@ -837,7 +894,7 @@ read_null_crypto_tar(Config) ->
%%--------------------------------------------------------------------
read_crypto_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
NameBins = lists:sort(
[{"b1",<<"A binary">>},
{"b2",list_to_binary(lists:duplicate(750000,"a"))}
@@ -851,7 +908,7 @@ read_crypto_tar(Config) ->
Cw = {Cinitw,Cenc,Cendw},
Cr = {Cinitr,Cdec},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,Cw}]),
[ok = erl_tar:add(HandleWrite, Bin, Name, [verbose])
|| {Name,Bin} <- NameBins],
@@ -861,7 +918,7 @@ read_crypto_tar(Config) ->
%%--------------------------------------------------------------------
aes_cbc256_crypto_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
NameBins = lists:sort(
[{"b1",<<"A binary">>},
{"b2",list_to_binary(lists:duplicate(750000,"a"))},
@@ -891,7 +948,7 @@ aes_cbc256_crypto_tar(Config) ->
end,
Cw = {Cinitw,Cenc,Cendw},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,Cw}]),
[ok = erl_tar:add(HandleWrite, Bin, Name, [verbose]) || {Name,Bin} <- NameBins],
ok = erl_tar:close(HandleWrite),
@@ -906,7 +963,7 @@ pad(BlockSize, Bin) ->
%%--------------------------------------------------------------------
aes_ctr_stream_crypto_tar(Config) ->
- ChPid2 = ?config(channel_pid2, Config),
+ ChPid2 = proplists:get_value(channel_pid2, Config),
NameBins = lists:sort(
[{"b1",<<"A binary">>},
{"b2",list_to_binary(lists:duplicate(750000,"a"))},
@@ -934,7 +991,7 @@ aes_ctr_stream_crypto_tar(Config) ->
end,
Cw = {Cinitw,Cenc,Cendw},
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
{ok,HandleWrite} = ssh_sftp:open_tar(ChPid2, TarFileName, [write,{crypto,Cw}]),
[ok = erl_tar:add(HandleWrite, Bin, Name, [verbose]) || {Name,Bin} <- NameBins],
ok = erl_tar:close(HandleWrite),
@@ -945,12 +1002,12 @@ aes_ctr_stream_crypto_tar(Config) ->
%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
-prep(Config) ->
- DataDir = ?config(data_dir, Config),
- TestFile = ?config(filename, Config),
- TestFile1 = ?config(testfile, Config),
- TestLink = ?config(linktest, Config),
- TarFileName = ?config(tar_filename, Config),
+oldprep(Config) ->
+ DataDir = proplists:get_value(data_dir, Config),
+ TestFile = proplists:get_value(filename, Config),
+ TestFile1 = proplists:get_value(testfile, Config),
+ TestLink = proplists:get_value(linktest, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
file:delete(TestFile),
file:delete(TestFile1),
@@ -965,16 +1022,46 @@ prep(Config) ->
ok = file:write_file_info(TestFile,
FileInfo#file_info{mode = Mode}).
+prepare(Config0) ->
+ PrivDir = proplists:get_value(priv_dir, Config0),
+ Dir = filename:join(PrivDir, random_chars(10)),
+ file:make_dir(Dir),
+ Keys = [filename,
+ testfile,
+ linktest,
+ tar_filename],
+ Config1 = foldl_keydelete(Keys, Config0),
+ Config2 = lists:foldl(fun({Key,Name}, ConfAcc) ->
+ [{Key, filename:join(Dir,Name)} | ConfAcc]
+ end,
+ Config1,
+ lists:zip(Keys, [proplists:get_value(K,Config0) || K<-Keys])),
+
+ DataDir = proplists:get_value(data_dir, Config2),
+ FilenameSrc = filename:join(DataDir, "sftp.txt"),
+ FilenameDst = proplists:get_value(filename, Config2),
+ {ok,_} = file:copy(FilenameSrc, FilenameDst),
+ [{sftp_priv_dir,Dir} | Config2].
+
+
+random_chars(N) -> [crypto:rand_uniform($a,$z) || _<-lists:duplicate(N,x)].
+
+foldl_keydelete(Keys, L) ->
+ lists:foldl(fun(K,E) -> lists:keydelete(K,1,E) end,
+ L,
+ Keys).
+
+
chk_tar(Items, Config) ->
chk_tar(Items, Config, []).
chk_tar(Items, Config, Opts) ->
- TarFileName = ?config(tar_filename, Config),
+ TarFileName = proplists:get_value(tar_filename, Config),
chk_tar(Items, TarFileName, Config, Opts).
chk_tar(Items, TarFileName, Config, Opts) when is_list(Opts) ->
tar_size(TarFileName, Config),
- {ChPid,_} = ?config(sftp,Config),
+ {ChPid,_} = proplists:get_value(sftp,Config),
{ok,HandleRead} = ssh_sftp:open_tar(ChPid, TarFileName, [read|Opts]),
{ok,NameValueList} = erl_tar:extract(HandleRead,[memory,verbose]),
ok = erl_tar:close(HandleRead),
@@ -1016,7 +1103,7 @@ analyze_report([], []) ->
"".
tar_size(TarFileName, Config) ->
- {ChPid,_} = ?config(sftp,Config),
+ {ChPid,_} = proplists:get_value(sftp,Config),
{ok,Data} = ssh_sftp:read_file(ChPid, TarFileName),
io:format('Tar file ~p is~n ~p bytes.~n',[TarFileName, size(Data)]).
@@ -1043,7 +1130,7 @@ read_item_contents(ItemName, FileName) ->
end.
fn(Name, Config) ->
- Dir = ?config(datadir_tar, Config),
+ Dir = proplists:get_value(datadir_tar, Config),
filename:join(Dir,Name).
fmt_host({A,B,C,D}) -> lists:concat([A,".",B,".",C,".",D]);
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl
index 9385bd127d..52a26110c4 100644
--- a/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -28,6 +28,7 @@
-include_lib("kernel/include/file.hrl").
-include("ssh_xfer.hrl").
-include("ssh.hrl").
+-include("ssh_test_lib.hrl").
-define(USER, "Alladin").
-define(PASSWD, "Sesame").
@@ -72,19 +73,22 @@ groups() ->
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
- ssh_test_lib:setup_dsa(DataDir, PrivDir),
- %% to make sure we don't use public-key-auth
- %% this should be tested by other test suites
- UserDir = filename:join(?config(priv_dir, Config), nopubkey),
- file:make_dir(UserDir),
- Config.
+ ?CHECK_CRYPTO(
+ begin
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ ssh_test_lib:setup_dsa(DataDir, PrivDir),
+ %% to make sure we don't use public-key-auth
+ %% this should be tested by other test suites
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), nopubkey),
+ file:make_dir(UserDir),
+ Config
+ end).
end_per_suite(Config) ->
- SysDir = ?config(priv_dir, Config),
+ SysDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(SysDir),
- UserDir = filename:join(?config(priv_dir, Config), nopubkey),
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), nopubkey),
file:del_dir(UserDir),
ssh:stop().
@@ -101,9 +105,9 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(TestCase, Config) ->
ssh:start(),
prep(Config),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ClientUserDir = filename:join(PrivDir, nopubkey),
- SystemDir = filename:join(?config(priv_dir, Config), system),
+ SystemDir = filename:join(proplists:get_value(priv_dir, Config), system),
Options = [{system_dir, SystemDir},
{user_dir, PrivDir},
@@ -154,8 +158,8 @@ init_per_testcase(TestCase, Config) ->
[{sftp, {Cm, Channel}}, {sftpd, Sftpd }| Config].
end_per_testcase(_TestCase, Config) ->
- ssh_sftpd:stop(?config(sftpd, Config)),
- {Cm, Channel} = ?config(sftp, Config),
+ ssh_sftpd:stop(proplists:get_value(sftpd, Config)),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
ssh_connection:close(Cm, Channel),
ssh:close(Cm),
ssh:stop().
@@ -166,9 +170,9 @@ end_per_testcase(_TestCase, Config) ->
open_close_file() ->
[{doc, "Test SSH_FXP_OPEN and SSH_FXP_CLOSE commands"}].
open_close_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
ReqId = 0,
{ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
@@ -196,9 +200,9 @@ open_close_file(Config) when is_list(Config) ->
ver3_open_flags() ->
[{doc, "Test open flags"}].
ver3_open_flags(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "not_exist.txt"),
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
ReqId = 0,
{ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
@@ -230,8 +234,8 @@ ver3_open_flags(Config) when is_list(Config) ->
open_close_dir() ->
[{doc,"Test SSH_FXP_OPENDIR and SSH_FXP_CLOSE commands"}].
open_close_dir(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- {Cm, Channel} = ?config(sftp, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
@@ -257,11 +261,11 @@ open_close_dir(Config) when is_list(Config) ->
read_file() ->
[{doc, "Test SSH_FXP_READ command"}].
read_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
open_file(FileName, Cm, Channel, ReqId,
@@ -280,8 +284,8 @@ read_file(Config) when is_list(Config) ->
read_dir() ->
[{doc,"Test SSH_FXP_READDIR command"}].
read_dir(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- {Cm, Channel} = ?config(sftp, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
ReqId = 0,
{ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
open_dir(PrivDir, Cm, Channel, ReqId),
@@ -291,11 +295,11 @@ read_dir(Config) when is_list(Config) ->
write_file() ->
[{doc, "Test SSH_FXP_WRITE command"}].
write_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
open_file(FileName, Cm, Channel, ReqId,
@@ -315,10 +319,10 @@ write_file(Config) when is_list(Config) ->
remove_file() ->
[{doc, "Test SSH_FXP_REMOVE command"}].
remove_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId),
?UINT32(?SSH_FX_OK), _/binary>>, _} =
@@ -336,11 +340,11 @@ remove_file(Config) when is_list(Config) ->
rename_file() ->
[{doc, "Test SSH_FXP_RENAME command"}].
rename_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
NewFileName = filename:join(PrivDir, "test1.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId),
?UINT32(?SSH_FX_OK), _/binary>>, _} =
@@ -373,8 +377,8 @@ rename_file(Config) when is_list(Config) ->
mk_rm_dir() ->
[{doc, "Test SSH_FXP_MKDIR and SSH_FXP_RMDIR command"}].
mk_rm_dir(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- {Cm, Channel} = ?config(sftp, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
DirName = filename:join(PrivDir, "test"),
ReqId = 0,
{ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId), ?UINT32(?SSH_FX_OK),
@@ -401,8 +405,8 @@ real_path(Config) when is_list(Config) ->
{skip, "Not a relevant test on windows"};
_ ->
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
- PrivDir = ?config(priv_dir, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
TestDir = filename:join(PrivDir, "ssh_test"),
ok = file:make_dir(TestDir),
@@ -427,8 +431,8 @@ links(Config) when is_list(Config) ->
{skip, "Links are not fully supported by windows"};
_ ->
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
- PrivDir = ?config(priv_dir, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
LinkFileName = filename:join(PrivDir, "link_test.txt"),
@@ -451,10 +455,10 @@ links(Config) when is_list(Config) ->
retrieve_attributes() ->
[{"Test SSH_FXP_STAT, SSH_FXP_LSTAT AND SSH_FXP_FSTAT commands"}].
retrieve_attributes(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, FileInfo} = file:read_file_info(FileName),
@@ -520,10 +524,10 @@ set_attributes(Config) when is_list(Config) ->
{win32, _} ->
{skip, "Known error bug in erts file:read_file_info"};
_ ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, FileInfo} = file:read_file_info(FileName),
@@ -574,11 +578,11 @@ set_attributes(Config) when is_list(Config) ->
ver3_rename() ->
[{doc, "Test that ver3 rename message is handled OTP 6352"}].
ver3_rename(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
NewFileName = filename:join(PrivDir, "test1.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId),
?UINT32(?SSH_FX_OK), _/binary>>, _} =
@@ -589,7 +593,7 @@ relpath() ->
[{doc, "Check that realpath works ok seq10670"}].
relpath(Config) when is_list(Config) ->
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
case os:type() of
{win32, _} ->
@@ -611,11 +615,11 @@ relpath(Config) when is_list(Config) ->
sshd_read_file() ->
[{doc,"Test SSH_FXP_READ command, using sshd-server"}].
sshd_read_file(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(PrivDir, "test.txt"),
ReqId = 0,
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
{ok, <<?SSH_FXP_HANDLE, ?UINT32(ReqId), Handle/binary>>, _} =
open_file(FileName, Cm, Channel, ReqId,
@@ -633,9 +637,9 @@ sshd_read_file(Config) when is_list(Config) ->
ver6_basic() ->
[{doc, "Test SFTP Version 6"}].
ver6_basic(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
%FileName = filename:join(PrivDir, "test.txt"),
- {Cm, Channel} = ?config(sftp, Config),
+ {Cm, Channel} = proplists:get_value(sftp, Config),
ReqId = 0,
{ok, <<?SSH_FXP_STATUS, ?UINT32(ReqId), % Ver 6 we have 5
?UINT32(?SSH_FX_FILE_IS_A_DIRECTORY), _/binary>>, _} =
@@ -646,7 +650,7 @@ ver6_basic(Config) when is_list(Config) ->
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
prep(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
TestFile = filename:join(PrivDir, "test.txt"),
TestFile1 = filename:join(PrivDir, "test1.txt"),
@@ -654,7 +658,7 @@ prep(Config) ->
file:delete(TestFile1),
%% Initial config
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
FileName = filename:join(DataDir, "test.txt"),
file:copy(FileName, TestFile),
Mode = 8#00400 bor 8#00200 bor 8#00040, % read & write owner, read group
diff --git a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
index 355ce6a8f5..56a33d6349 100644
--- a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
@@ -26,6 +26,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/file.hrl").
+-include("ssh_test_lib.hrl").
-define(USER, "Alladin").
-define(PASSWD, "Sesame").
@@ -53,22 +54,25 @@ groups() ->
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- catch ssh:stop(),
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
- FileAlt = filename:join(DataDir, "ssh_sftpd_file_alt.erl"),
- c:c(FileAlt),
- FileName = filename:join(DataDir, "test.txt"),
- {ok, FileInfo} = file:read_file_info(FileName),
- ok = file:write_file_info(FileName,
- FileInfo#file_info{mode = 8#400}),
- ssh_test_lib:setup_dsa(DataDir, PrivDir),
- Config.
+ ?CHECK_CRYPTO(
+ begin
+ catch ssh:stop(),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ FileAlt = filename:join(DataDir, "ssh_sftpd_file_alt.erl"),
+ c:c(FileAlt),
+ FileName = filename:join(DataDir, "test.txt"),
+ {ok, FileInfo} = file:read_file_info(FileName),
+ ok = file:write_file_info(FileName,
+ FileInfo#file_info{mode = 8#400}),
+ ssh_test_lib:setup_dsa(DataDir, PrivDir),
+ Config
+ end).
end_per_suite(Config) ->
- UserDir = filename:join(?config(priv_dir, Config), nopubkey),
+ UserDir = filename:join(proplists:get_value(priv_dir, Config), nopubkey),
file:del_dir(UserDir),
- SysDir = ?config(priv_dir, Config),
+ SysDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(SysDir),
ok.
@@ -83,7 +87,7 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(TestCase, Config) ->
ssh:start(),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
SystemDir = filename:join(PrivDir, system),
Options =
@@ -96,7 +100,7 @@ init_per_testcase(TestCase, Config) ->
{user_dir, PrivDir},
{subsystems, [Spec]}];
"root_dir" ->
- Privdir = ?config(priv_dir, Config),
+ Privdir = proplists:get_value(priv_dir, Config),
Root = filename:join(Privdir, root),
file:make_dir(Root),
Spec = ssh_sftpd:subsystem_spec([{root,Root}]),
@@ -132,8 +136,8 @@ init_per_testcase(TestCase, Config) ->
[{port, Port}, {sftp, {ChannelPid, Connection}}, {sftpd, Sftpd} | NewConfig].
end_per_testcase(_TestCase, Config) ->
- catch ssh_sftpd:stop(?config(sftpd, Config)),
- {Sftp, Connection} = ?config(sftp, Config),
+ catch ssh_sftpd:stop(proplists:get_value(sftpd, Config)),
+ {Sftp, Connection} = proplists:get_value(sftp, Config),
catch ssh_sftp:stop_channel(Sftp),
catch ssh:close(Connection),
ssh:stop().
@@ -146,10 +150,10 @@ close_file() ->
"transfer OTP-6350"}].
close_file(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
FileName = filename:join(DataDir, "test.txt"),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
NumOfPorts = length(erlang:ports()),
@@ -167,12 +171,12 @@ quit() ->
"client hanging. OTP-6349"}].
quit(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
FileName = filename:join(DataDir, "test.txt"),
- UserDir = ?config(priv_dir, Config),
- Port = ?config(port, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
+ Port = proplists:get_value(port, Config),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, <<_/binary>>} = ssh_sftp:read_file(Sftp, FileName),
@@ -198,13 +202,13 @@ file_cb() ->
" the sftpds filehandling. OTP-6356"}].
file_cb(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FileName = filename:join(DataDir, "test.txt"),
register(sftpd_file_alt_tester, self()),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Bin} = ssh_sftp:read_file(Sftp, FileName),
alt_file_handler_check(alt_open),
@@ -242,7 +246,7 @@ file_cb(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
root_dir(Config) when is_list(Config) ->
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
FileName = "test.txt",
Bin = <<"Test file for root dir option">>,
ok = ssh_sftp:write_file(Sftp, FileName, Bin),
@@ -253,7 +257,7 @@ root_dir(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
list_dir_limited(Config) when is_list(Config) ->
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
{ok, Listing} =
ssh_sftp:list_dir(Sftp, "."),
ct:log("Listing: ~p~n", [Listing]).
@@ -262,9 +266,9 @@ list_dir_limited(Config) when is_list(Config) ->
ver6_basic() ->
[{doc, "Test some version 6 features"}].
ver6_basic(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
NewDir = filename:join(PrivDir, "testdir2"),
- {Sftp, _} = ?config(sftp, Config),
+ {Sftp, _} = proplists:get_value(sftp, Config),
ok = ssh_sftp:make_dir(Sftp, NewDir),
%%Test file_is_a_directory
{error, file_is_a_directory} = ssh_sftp:delete(Sftp, NewDir).
diff --git a/lib/ssh/test/ssh_sup_SUITE.erl b/lib/ssh/test/ssh_sup_SUITE.erl
index f8929b30ff..ff53e1c4c6 100644
--- a/lib/ssh/test/ssh_sup_SUITE.erl
+++ b/lib/ssh/test/ssh_sup_SUITE.erl
@@ -53,18 +53,21 @@ end_per_group(_GroupName, Config) ->
Config.
init_per_suite(Config) ->
- Port = ssh_test_lib:inet_port(node()),
- PrivDir = ?config(priv_dir, Config),
- UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
- file:make_dir(UserDir),
- [{userdir, UserDir},{port, Port}, {host, "localhost"}, {host_ip, any} | Config].
+ ?CHECK_CRYPTO(
+ begin
+ Port = ssh_test_lib:inet_port(node()),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+ [{userdir, UserDir},{port, Port}, {host, "localhost"}, {host_ip, any} | Config]
+ end).
end_per_suite(_) ->
ok.
init_per_testcase(sshc_subtree, Config) ->
ssh:start(),
- SystemDir = ?config(data_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{failfun, fun ssh_test_lib:failfun/2},
{user_passwords,
@@ -75,7 +78,7 @@ init_per_testcase(Case, Config) ->
ssh:start(),
Config.
end_per_testcase(sshc_subtree, Config) ->
- {Pid,_,_} = ?config(server, Config),
+ {Pid,_,_} = proplists:get_value(server, Config),
ssh:stop_daemon(Pid),
ssh:stop();
end_per_testcase(_, _Config) ->
@@ -100,8 +103,8 @@ default_tree(Config) when is_list(Config) ->
sshc_subtree() ->
[{doc, "Make sure the sshc subtree is correct"}].
sshc_subtree(Config) when is_list(Config) ->
- {_Pid, Host, Port} = ?config(server, Config),
- UserDir = ?config(userdir, Config),
+ {_Pid, Host, Port} = proplists:get_value(server, Config),
+ UserDir = proplists:get_value(userdir, Config),
?wait_match([], supervisor:which_children(sshc_sup)),
@@ -128,9 +131,9 @@ sshc_subtree(Config) when is_list(Config) ->
sshd_subtree() ->
[{doc, "Make sure the sshd subtree is correct"}].
sshd_subtree(Config) when is_list(Config) ->
- HostIP = ?config(host_ip, Config),
- Port = ?config(port, Config),
- SystemDir = ?config(data_dir, Config),
+ HostIP = proplists:get_value(host_ip, Config),
+ Port = proplists:get_value(port, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
ssh:daemon(HostIP, Port, [{system_dir, SystemDir},
{failfun, fun ssh_test_lib:failfun/2},
{user_passwords,
@@ -149,10 +152,10 @@ sshd_subtree(Config) when is_list(Config) ->
sshd_subtree_profile() ->
[{doc, "Make sure the sshd subtree using profile option is correct"}].
sshd_subtree_profile(Config) when is_list(Config) ->
- HostIP = ?config(host_ip, Config),
- Port = ?config(port, Config),
- Profile = ?config(profile, Config),
- SystemDir = ?config(data_dir, Config),
+ HostIP = proplists:get_value(host_ip, Config),
+ Port = proplists:get_value(port, Config),
+ Profile = proplists:get_value(profile, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
{ok, _} = ssh:daemon(HostIP, Port, [{system_dir, SystemDir},
{failfun, fun ssh_test_lib:failfun/2},
@@ -171,9 +174,9 @@ sshd_subtree_profile(Config) when is_list(Config) ->
check_sshd_system_tree(Daemon, Config) ->
- Host = ?config(host, Config),
- Port = ?config(port, Config),
- UserDir = ?config(userdir, Config),
+ Host = proplists:get_value(host, Config),
+ Port = proplists:get_value(port, Config),
+ UserDir = proplists:get_value(userdir, Config),
{ok, Client} = ssh:connect(Host, Port, [{silently_accept_hosts, true},
{user_interaction, false},
{user, ?USER}, {password, ?PASSWD},{user_dir, UserDir}]),
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index c6541461a1..6233680dce 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -71,7 +71,7 @@ daemon_port(Port, _) -> Port.
std_daemon(Config, ExtraOpts) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
file:make_dir(UserDir),
std_daemon1(Config,
@@ -80,13 +80,13 @@ std_daemon(Config, ExtraOpts) ->
{user_passwords, [{"usr1","pwd1"}]}]).
std_daemon1(Config, ExtraOpts) ->
- SystemDir = ?config(data_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
{_Server, _Host, _Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{failfun, fun ssh_test_lib:failfun/2}
| ExtraOpts]).
std_connect(Config, Host, Port, ExtraOpts) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
_ConnectionRef =
ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
{user_dir, UserDir},
@@ -99,7 +99,7 @@ std_simple_sftp(Host, Port, Config) ->
std_simple_sftp(Host, Port, Config, []).
std_simple_sftp(Host, Port, Config, Opts) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
DataFile = filename:join(UserDir, "test.data"),
ConnectionRef = ssh_test_lib:std_connect(Config, Host, Port, Opts),
{ok, ChannelRef} = ssh_sftp:start_channel(ConnectionRef),
@@ -655,17 +655,48 @@ sshc(Tag) ->
).
ssh_type() ->
- case os:find_executable("ssh") of
- false -> not_found;
- _ ->
- case os:cmd("ssh -V") of
- "OpenSSH" ++ _ ->
- openSSH;
- Str ->
- ct:log("ssh client ~p is unknown",[Str]),
- unknown
- end
- end.
+ Parent = self(),
+ Pid = spawn(fun() ->
+ Parent ! {ssh_type,self(),ssh_type1()}
+ end),
+ MonitorRef = monitor(process, Pid),
+ receive
+ {ssh_type, Pid, Result} ->
+ demonitor(MonitorRef),
+ Result;
+ {'DOWN', MonitorRef, process, Pid, _Info} ->
+ ct:log("~p:~p Process DOWN",[?MODULE,?LINE]),
+ not_found
+ after
+ 10000 ->
+ ct:log("~p:~p Timeout",[?MODULE,?LINE]),
+ demonitor(MonitorRef),
+ not_found
+ end.
+
+
+ssh_type1() ->
+ try
+ case os:find_executable("ssh") of
+ false ->
+ ct:log("~p:~p Executable \"ssh\" not found",[?MODULE,?LINE]),
+ not_found;
+ _ ->
+ case os:cmd("ssh -V") of
+ "OpenSSH" ++ _ ->
+ openSSH;
+ Str ->
+ ct:log("ssh client ~p is unknown",[Str]),
+ unknown
+ end
+ end
+ catch
+ Class:Exception ->
+ ct:log("~p:~p Exception ~p:~p",[?MODULE,?LINE,Class,Exception]),
+ not_found
+ end.
+
+
algo_intersection([], _) -> [];
algo_intersection(_, []) -> [];
diff --git a/lib/ssh/test/ssh_test_lib.hrl b/lib/ssh/test/ssh_test_lib.hrl
index 7cb7edeaa8..54c93b7e87 100644
--- a/lib/ssh/test/ssh_test_lib.hrl
+++ b/lib/ssh/test/ssh_test_lib.hrl
@@ -1,4 +1,14 @@
%%-------------------------------------------------------------------------
+%% Check for usable crypt
+%%-------------------------------------------------------------------------
+-define(CHECK_CRYPTO(Available),
+ try crypto:start()
+ of _ -> Available
+ catch _:_ -> {skip, "Can't start crypto"}
+ end
+ ).
+
+%%-------------------------------------------------------------------------
%% Help macro
%%-------------------------------------------------------------------------
-define(wait_match(Pattern, FunctionCall, Bind, Timeout, Ntries),
diff --git a/lib/ssh/test/ssh_to_openssh_SUITE.erl b/lib/ssh/test/ssh_to_openssh_SUITE.erl
index 2be75fd7f3..a914938c41 100644
--- a/lib/ssh/test/ssh_to_openssh_SUITE.erl
+++ b/lib/ssh/test/ssh_to_openssh_SUITE.erl
@@ -22,6 +22,7 @@
-module(ssh_to_openssh_SUITE).
-include_lib("common_test/include/ct.hrl").
+-include("ssh_test_lib.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
@@ -62,19 +63,21 @@ groups() ->
].
init_per_suite(Config) ->
- case gen_tcp:connect("localhost", 22, []) of
- {error,econnrefused} ->
- {skip,"No openssh deamon"};
- _ ->
- ssh_test_lib:openssh_sanity_check(Config)
- end.
+ ?CHECK_CRYPTO(
+ case gen_tcp:connect("localhost", 22, []) of
+ {error,econnrefused} ->
+ {skip,"No openssh deamon"};
+ _ ->
+ ssh_test_lib:openssh_sanity_check(Config)
+ end
+ ).
end_per_suite(_Config) ->
ok.
init_per_group(erlang_server, Config) ->
- DataDir = ?config(data_dir, Config),
- UserDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:setup_dsa_known_host(DataDir, UserDir),
ssh_test_lib:setup_rsa_known_host(DataDir, UserDir),
Config;
@@ -87,7 +90,7 @@ init_per_group(_, Config) ->
Config.
end_per_group(erlang_server, Config) ->
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_dsa(UserDir),
ssh_test_lib:clean_rsa(UserDir),
Config;
@@ -222,7 +225,7 @@ erlang_client_openssh_server_kexs() ->
[{doc, "Test that we can connect with different KEXs."}].
erlang_client_openssh_server_kexs(Config) when is_list(Config) ->
- KexAlgos = try proplists:get_value(kex, ?config(common_algs,Config))
+ KexAlgos = try proplists:get_value(kex, proplists:get_value(common_algs,Config))
catch _:_ -> []
end,
comment(KexAlgos),
@@ -366,8 +369,8 @@ erlang_server_openssh_client_public_key_rsa(Config) when is_list(Config) ->
erlang_server_openssh_client_public_key_X(Config, PubKeyAlg) ->
- SystemDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ SystemDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
KnownHosts = filename:join(PrivDir, "known_hosts"),
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
{public_key_alg, PubKeyAlg},
@@ -387,7 +390,7 @@ erlang_client_openssh_server_password() ->
[{doc, "Test client password option"}].
erlang_client_openssh_server_password(Config) when is_list(Config) ->
%% to make sure we don't public-key-auth
- UserDir = ?config(data_dir, Config),
+ UserDir = proplists:get_value(data_dir, Config),
{error, Reason0} =
ssh:connect(any, ?SSH_DEFAULT_PORT, [{silently_accept_hosts, true},
{user, "foo"},
diff --git a/lib/ssh/test/ssh_upgrade_SUITE.erl b/lib/ssh/test/ssh_upgrade_SUITE.erl
index 06bef2455e..b5b27c369a 100644
--- a/lib/ssh/test/ssh_upgrade_SUITE.erl
+++ b/lib/ssh/test/ssh_upgrade_SUITE.erl
@@ -23,6 +23,7 @@
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
+-include("ssh_test_lib.hrl").
-record(state, {
config,
@@ -48,18 +49,20 @@ all() ->
].
init_per_suite(Config0) ->
- case ct_release_test:init(Config0) of
- {skip, Reason} ->
- {skip, Reason};
- Config ->
- ssh:start(),
- Config
- end.
+ ?CHECK_CRYPTO(
+ case ct_release_test:init(Config0) of
+ {skip, Reason} ->
+ {skip, Reason};
+ Config ->
+ ssh:start(),
+ Config
+ end
+ ).
end_per_suite(Config) ->
ct_release_test:cleanup(Config),
ssh:stop(),
- UserDir = ?config(priv_dir, Config),
+ UserDir = proplists:get_value(priv_dir, Config),
ssh_test_lib:clean_rsa(UserDir).
init_per_testcase(_TestCase, Config) ->
@@ -138,8 +141,8 @@ test_soft(State0, FileName) ->
setup_server_client(#state{config=Config} = State) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
FtpRootDir = filename:join(PrivDir, "ftp_root"),
catch file:make_dir(FtpRootDir),
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index 154664d855..bed82cdb91 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -417,10 +417,24 @@ fun(srp, Username :: string(), UserState :: term()) ->
If set to <c>false</c>, it disables the block cipher padding check
to be able to interoperate with legacy software.</p></item>
- </taglist>
-
<warning><p>Using <c>{padding_check, boolean()}</c> makes TLS
vulnerable to the Poodle attack.</p></warning>
+
+ <tag><c>{beast_mitigation, one_n_minus_one | zero_n | disabled}</c></tag>
+ <item><p>Affects SSL-3.0 and TLS-1.0 connections only. Used to change the BEAST
+ mitigation strategy to interoperate with legacy software.
+ Defaults to <c>one_n_minus_one</c>.</p>
+
+ <p><c>one_n_minus_one</c> - Perform 1/n-1 BEAST mitigation.</p>
+
+ <p><c>zero_n</c> - Perform 0/n BEAST mitigation.</p>
+
+ <p><c>disabled</c> - Disable BEAST mitigation.</p></item>
+
+ <warning><p>Using <c>{beast_mitigation, disabled}</c> makes SSL or TLS
+ vulnerable to the BEAST attack.</p></warning>
+ </taglist>
+
</section>
<section>
@@ -692,6 +706,12 @@ fun(srp, Username :: string(), UserState :: term()) ->
client certificate is requested. For more details see the <seealso marker="#client_signature_algs">corresponding client option</seealso>.
</p> </item>
+ <tag><c>{v2_hello_compatible, boolean()}</c></tag>
+ <item>If true, the server accepts clients that send hello messages on SSL-2.0 format but offers
+ supported SSL/TLS versions. Defaults to false, that is the server will not interoperate with clients that
+ offers SSL-2.0.
+ </item>
+
</taglist>
</section>
@@ -881,6 +901,23 @@ fun(srp, Username :: string(), UserState :: term()) ->
</func>
<func>
+ <name>getstat(Socket) ->
+ {ok, OptionValues} | {error, inet:posix()}</name>
+ <name>getstat(Socket, OptionNames) ->
+ {ok, OptionValues} | {error, inet:posix()}</name>
+ <fsummary>Get one or more statistic options for a socket</fsummary>
+ <type>
+ <v>Socket = sslsocket()</v>
+ <v>OptionNames = [atom()]</v>
+ <v>OptionValues = [{inet:stat_option(), integer()}]</v>
+ </type>
+ <desc>
+ <p>Gets one or more statistic options for the underlying TCP socket.</p>
+ <p>See inet:getstat/2 for statistic options description.</p>
+ </desc>
+ </func>
+
+ <func>
<name>listen(Port, Options) ->
{ok, ListenSocket} | {error, Reason}</name>
<fsummary>Creates an SSL listen socket.</fsummary>
diff --git a/lib/ssl/doc/src/ssl_app.xml b/lib/ssl/doc/src/ssl_app.xml
index daa06a40fc..e50ffdbfe6 100644
--- a/lib/ssl/doc/src/ssl_app.xml
+++ b/lib/ssl/doc/src/ssl_app.xml
@@ -94,7 +94,10 @@
to <c>ssl:connect/[2,3]</c> and <c>ssl:listen/2</c>.</p></item>
<tag><c><![CDATA[session_lifetime = integer() <optional>]]></c></tag>
- <item><p>Maximum lifetime of the session data in seconds.</p></item>
+ <item><p>Maximum lifetime of the session data in seconds. Defaults to 24 hours which is the maximum
+ recommended lifetime by <url href="http://www.ietf.org/rfc/5246rfc.txt">RFC 5246</url>. However
+ sessions may be invalidated earlier due to the maximum limitation of the session cache table.
+ </p></item>
<tag><c><![CDATA[session_cb = atom() <optional>]]></c></tag>
<item><p>Name of the session cache callback module that implements
@@ -107,16 +110,24 @@
in the session cache callback module. Defaults to <c>[]</c>.</p></item>
<tag><c><![CDATA[session_cache_client_max = integer() <optional>]]></c><br/>
- <c><![CDATA[session_cache_server_max = integer() <optional>]]></c></tag>
- <item><p>Limits the growth of the clients/servers session cache,
- if the maximum number of sessions is reached, the current cache entries will
- be invalidated regardless of their remaining lifetime. Defaults to 1000.
- </p></item>
+ <item><p>Limits the growth of the clients session cache, that is
+ how many sessions towards servers that are cached to be used by
+ new client connections. If the maximum number of sessions is
+ reached, the current cache entries will be invalidated
+ regardless of their remaining lifetime. Defaults to
+ 1000.</p></item>
+
+ <tag> <c><![CDATA[session_cache_server_max = integer() <optional>]]></c></tag>
+ <item><p>Limits the growth of the servers session cache, that is
+ how many client sessions are cached by the server. If the
+ maximum number of sessions is reached, the current cache entries
+ will be invalidated regardless of their remaining
+ lifetime. Defaults to 1000.</p></item>
<tag><c><![CDATA[ssl_pem_cache_clean = integer() <optional>]]></c></tag>
<item>
<p>
- Number of milliseconds between PEM cache validations.
+ Number of milliseconds between PEM cache validations. Defaults to 2 minutes.
</p>
<seealso
marker="ssl#clear_pem_cache-0">ssl:clear_pem_cache/0</seealso>
@@ -131,7 +142,7 @@
shutdown gracefully. Defaults to 5000 milliseconds.
</p>
</item>
-
+ </tag>
</taglist>
</section>
diff --git a/lib/ssl/doc/src/ssl_distribution.xml b/lib/ssl/doc/src/ssl_distribution.xml
index 7c00b4eae2..495e02d271 100644
--- a/lib/ssl/doc/src/ssl_distribution.xml
+++ b/lib/ssl/doc/src/ssl_distribution.xml
@@ -196,6 +196,9 @@ Eshell V5.0 (abort with ^G)
<item><c>password</c></item>
<item><c>cacertfile</c></item>
<item><c>verify</c></item>
+ <item><c>verify_fun</c> (write as <c>{Module, Function, InitialUserState}</c>)</item>
+ <item><c>crl_check</c></item>
+ <item><c>crl_cache</c> (write as Erlang term)</item>
<item><c>reuse_sessions</c></item>
<item><c>secure_renegotiate</c></item>
<item><c>depth</c></item>
@@ -203,6 +206,10 @@ Eshell V5.0 (abort with ^G)
<item><c>ciphers</c> (use old string format)</item>
</list>
+ <p>Note that <c>verify_fun</c> needs to be written in a different
+ form than the corresponding SSL option, since funs are not
+ accepted on the command line.</p>
+
<p>The server can also take the options <c>dhfile</c> and
<c>fail_if_no_peer_cert</c> (also prefixed).</p>
@@ -210,10 +217,6 @@ Eshell V5.0 (abort with ^G)
initiates a connection to another node. <c>server_</c>-prefixed
options are used when accepting a connection from a remote node.</p>
- <p>More complex options, such as <c>verify_fun</c>, are currently not
- available, but a mechanism to handle such options may be added in
- a future release.</p>
-
<p>Raw socket options, such as <c>packet</c> and <c>size</c> must not
be specified on the command line.</p>
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 82d6faee42..60a61bc901 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -416,7 +416,8 @@ encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
{CbModule, DataTag, CloseTag, ErrorTag}) ->
- ConnectionStates = ssl_record:init_connection_states(Role),
+ #ssl_options{beast_mitigation = BeastMitigation} = SSLOptions,
+ ConnectionStates = ssl_record:init_connection_states(Role, BeastMitigation),
SessionCacheCb = case application:get_env(ssl, session_cb) of
{ok, Cb} when is_atom(Cb) ->
diff --git a/lib/ssl/src/inet_tls_dist.erl b/lib/ssl/src/inet_tls_dist.erl
index 3481e89af0..0da4b3587f 100644
--- a/lib/ssl/src/inet_tls_dist.erl
+++ b/lib/ssl/src/inet_tls_dist.erl
@@ -87,7 +87,8 @@ do_setup(Driver, Kernel, Node, Type, MyNode, LongOrShortNames, SetupTime) ->
case inet:getaddr(Address, Driver:family()) of
{ok, Ip} ->
Timer = dist_util:start_timer(SetupTime),
- case erl_epmd:port_please(Name, Ip) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:port_please(Name, Ip) of
{port, TcpPort, Version} ->
?trace("port_please(~p) -> version ~p~n",
[Node,Version]),
diff --git a/lib/ssl/src/ssl.app.src b/lib/ssl/src/ssl.app.src
index 1a2bf90ccf..937a3b1bd1 100644
--- a/lib/ssl/src/ssl.app.src
+++ b/lib/ssl/src/ssl.app.src
@@ -54,7 +54,7 @@
{applications, [crypto, public_key, kernel, stdlib]},
{env, []},
{mod, {ssl_app, []}},
- {runtime_dependencies, ["stdlib-2.0","public_key-1.0","kernel-3.0",
+ {runtime_dependencies, ["stdlib-3.0","public_key-1.0","kernel-3.0",
"erts-7.0","crypto-3.3", "inets-5.10.7"]}]}.
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index 51732b4a59..d2aeb3258f 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -34,7 +34,8 @@
listen/2, transport_accept/1, transport_accept/2,
ssl_accept/1, ssl_accept/2, ssl_accept/3,
controlling_process/2, peername/1, peercert/1, sockname/1,
- close/1, close/2, shutdown/2, recv/2, recv/3, send/2, getopts/2, setopts/2
+ close/1, close/2, shutdown/2, recv/2, recv/3, send/2,
+ getopts/2, setopts/2, getstat/1, getstat/2
]).
%% SSL/TLS protocol handling
-export([cipher_suites/0, cipher_suites/1,
@@ -97,7 +98,7 @@ connect(Socket, SslOptions) when is_port(Socket) ->
connect(Socket, SslOptions, infinity).
connect(Socket, SslOptions0, Timeout) when is_port(Socket),
- (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+ (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
{Transport,_,_,_} = proplists:get_value(cb_info, SslOptions0,
{gen_tcp, tcp, tcp_closed, tcp_error}),
EmulatedOptions = ssl_socket:emulated_options(),
@@ -123,7 +124,7 @@ connect(Socket, SslOptions0, Timeout) when is_port(Socket),
connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
-connect(Host, Port, Options, Timeout) when (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+connect(Host, Port, Options, Timeout) when (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
try handle_options(Options, client) of
{ok, Config} ->
do_connect(Host,Port,Config,Timeout)
@@ -173,7 +174,7 @@ transport_accept(#sslsocket{pid = {ListenSocket,
#config{transport_info = {Transport,_,_, _} =CbInfo,
connection_cb = ConnectionCb,
ssl = SslOpts,
- emulated = Tracker}}}, Timeout) when (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+ emulated = Tracker}}}, Timeout) when (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
case Transport:accept(ListenSocket, Timeout) of
{ok, Socket} ->
{ok, EmOpts} = ssl_socket:get_emulated_opts(Tracker),
@@ -206,25 +207,25 @@ transport_accept(#sslsocket{pid = {ListenSocket,
ssl_accept(ListenSocket) ->
ssl_accept(ListenSocket, infinity).
-ssl_accept(#sslsocket{} = Socket, Timeout) when (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+ssl_accept(#sslsocket{} = Socket, Timeout) when (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
ssl_connection:handshake(Socket, Timeout);
-
-ssl_accept(ListenSocket, SslOptions) when is_port(ListenSocket) ->
+
+ssl_accept(ListenSocket, SslOptions) when is_port(ListenSocket) ->
ssl_accept(ListenSocket, SslOptions, infinity).
-ssl_accept(#sslsocket{} = Socket, [], Timeout) when (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity)->
+ssl_accept(#sslsocket{} = Socket, [], Timeout) when (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity)->
ssl_accept(#sslsocket{} = Socket, Timeout);
-ssl_accept(#sslsocket{fd = {_, _, _, Tracker}} = Socket, SslOpts0, Timeout) when
- (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity)->
- try
- {ok, EmOpts, InheritedSslOpts} = ssl_socket:get_all_opts(Tracker),
+ssl_accept(#sslsocket{fd = {_, _, _, Tracker}} = Socket, SslOpts0, Timeout) when
+ (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity)->
+ try
+ {ok, EmOpts, InheritedSslOpts} = ssl_socket:get_all_opts(Tracker),
SslOpts = handle_options(SslOpts0, InheritedSslOpts),
ssl_connection:handshake(Socket, {SslOpts, emulated_socket_options(EmOpts, #socket_options{})}, Timeout)
catch
Error = {error, _Reason} -> Error
end;
ssl_accept(Socket, SslOptions, Timeout) when is_port(Socket),
- (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+ (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
{Transport,_,_,_} =
proplists:get_value(cb_info, SslOptions, {gen_tcp, tcp, tcp_closed, tcp_error}),
EmulatedOptions = ssl_socket:emulated_options(),
@@ -252,17 +253,17 @@ close(#sslsocket{pid = {ListenSocket, #config{transport_info={Transport,_, _, _}
Transport:close(ListenSocket).
%%--------------------------------------------------------------------
--spec close(#sslsocket{}, integer() | {pid(), integer()}) -> term().
+-spec close(#sslsocket{}, timeout() | {pid(), integer()}) -> term().
%%
%% Description: Close an ssl connection
%%--------------------------------------------------------------------
-close(#sslsocket{pid = TLSPid},
- {Pid, Timeout} = DownGrade) when is_pid(TLSPid),
- is_pid(Pid),
- (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+close(#sslsocket{pid = TLSPid},
+ {Pid, Timeout} = DownGrade) when is_pid(TLSPid),
+ is_pid(Pid),
+ (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
ssl_connection:close(TLSPid, {close, DownGrade});
-close(#sslsocket{pid = TLSPid}, Timeout) when is_pid(TLSPid),
- (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity) ->
+close(#sslsocket{pid = TLSPid}, Timeout) when is_pid(TLSPid),
+ (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity) ->
ssl_connection:close(TLSPid, {close, Timeout});
close(#sslsocket{pid = {ListenSocket, #config{transport_info={Transport,_, _, _}}}}, _) ->
Transport:close(ListenSocket).
@@ -286,7 +287,7 @@ send(#sslsocket{pid = {ListenSocket, #config{transport_info={Transport, _, _, _}
recv(Socket, Length) ->
recv(Socket, Length, infinity).
recv(#sslsocket{pid = Pid}, Length, Timeout) when is_pid(Pid),
- (is_integer(Timeout) andalso Timeout > 0) or (Timeout == infinity)->
+ (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity)->
ssl_connection:recv(Pid, Length, Timeout);
recv(#sslsocket{pid = {Listen,
#config{transport_info = {Transport, _, _, _}}}}, _,_) when is_port(Listen)->
@@ -469,6 +470,32 @@ setopts(#sslsocket{}, Options) ->
{error, {options,{not_a_proplist, Options}}}.
%%---------------------------------------------------------------
+-spec getstat(Socket) ->
+ {ok, OptionValues} | {error, inet:posix()} when
+ Socket :: #sslsocket{},
+ OptionValues :: [{inet:stat_option(), integer()}].
+%%
+%% Description: Get all statistic options for a socket.
+%%--------------------------------------------------------------------
+getstat(Socket) ->
+ getstat(Socket, inet:stats()).
+
+%%---------------------------------------------------------------
+-spec getstat(Socket, Options) ->
+ {ok, OptionValues} | {error, inet:posix()} when
+ Socket :: #sslsocket{},
+ Options :: [inet:stat_option()],
+ OptionValues :: [{inet:stat_option(), integer()}].
+%%
+%% Description: Get one or more statistic options for a socket.
+%%--------------------------------------------------------------------
+getstat(#sslsocket{pid = {Listen, #config{transport_info = {Transport, _, _, _}}}}, Options) when is_port(Listen), is_list(Options) ->
+ ssl_socket:getstat(Transport, Listen, Options);
+
+getstat(#sslsocket{pid = Pid, fd = {Transport, Socket, _, _}}, Options) when is_pid(Pid), is_list(Options) ->
+ ssl_socket:getstat(Transport, Socket, Options).
+
+%%---------------------------------------------------------------
-spec shutdown(#sslsocket{}, read | write | read_write) -> ok | {error, reason()}.
%%
%% Description: Same as gen_tcp:shutdown/2
@@ -725,13 +752,15 @@ handle_options(Opts0, Role) ->
server, Role),
protocol = proplists:get_value(protocol, Opts, tls),
padding_check = proplists:get_value(padding_check, Opts, true),
+ beast_mitigation = handle_option(beast_mitigation, Opts, one_n_minus_one),
fallback = handle_option(fallback, Opts,
proplists:get_value(fallback, Opts,
default_option_role(client,
false, Role)),
client, Role),
crl_check = handle_option(crl_check, Opts, false),
- crl_cache = handle_option(crl_cache, Opts, {ssl_crl_cache, {internal, []}})
+ crl_cache = handle_option(crl_cache, Opts, {ssl_crl_cache, {internal, []}}),
+ v2_hello_compatible = handle_option(v2_hello_compatible, Opts, false)
},
CbInfo = proplists:get_value(cb_info, Opts, {gen_tcp, tcp, tcp_closed, tcp_error}),
@@ -746,7 +775,7 @@ handle_options(Opts0, Role) ->
alpn_preferred_protocols, next_protocols_advertised,
client_preferred_next_protocols, log_alert,
server_name_indication, honor_cipher_order, padding_check, crl_check, crl_cache,
- fallback, signature_algs],
+ fallback, signature_algs, beast_mitigation, v2_hello_compatible],
SockOpts = lists:foldl(fun(Key, PropList) ->
proplists:delete(Key, PropList)
@@ -986,6 +1015,12 @@ validate_option(crl_check, Value) when (Value == best_effort) or (Value == peer)
Value;
validate_option(crl_cache, {Cb, {_Handle, Options}} = Value) when is_atom(Cb) and is_list(Options) ->
Value;
+validate_option(beast_mitigation, Value) when Value == one_n_minus_one orelse
+ Value == zero_n orelse
+ Value == disabled ->
+ Value;
+validate_option(v2_hello_compatible, Value) when is_boolean(Value) ->
+ Value;
validate_option(Opt, Value) ->
throw({error, {options, {Opt, Value}}}).
diff --git a/lib/ssl/src/ssl_alert.erl b/lib/ssl/src/ssl_alert.erl
index 3e35e24527..db71b16d80 100644
--- a/lib/ssl/src/ssl_alert.erl
+++ b/lib/ssl/src/ssl_alert.erl
@@ -73,10 +73,14 @@ reason_code(#alert{description = Description}, _) ->
%%
%% Description: Returns the error string for given alert.
%%--------------------------------------------------------------------
-
-alert_txt(#alert{level = Level, description = Description, where = {Mod,Line}}) ->
+alert_txt(#alert{level = Level, description = Description, where = {Mod,Line}, reason = undefined}) ->
Mod ++ ":" ++ integer_to_list(Line) ++ ":" ++
- level_txt(Level) ++" "++ description_txt(Description).
+ level_txt(Level) ++" "++ description_txt(Description);
+alert_txt(#alert{reason = Reason} = Alert) ->
+ BaseTxt = alert_txt(Alert#alert{reason = undefined}),
+ FormatDepth = 9, % Some limit on printed representation of an error
+ ReasonTxt = lists:flatten(io_lib:format("~P", [Reason, FormatDepth])),
+ BaseTxt ++ " - " ++ ReasonTxt.
%%--------------------------------------------------------------------
%%% Internal functions
@@ -85,7 +89,7 @@ alert_txt(#alert{level = Level, description = Description, where = {Mod,Line}})
%% It is very unlikely that an correct implementation will send more than one alert at the time
%% So it there is more than 10 warning alerts we consider it an error
decode(<<?BYTE(Level), ?BYTE(_), _/binary>>, _, N) when Level == ?WARNING, N > ?MAX_ALERTS ->
- ?ALERT_REC(?FATAL, ?DECODE_ERROR);
+ ?ALERT_REC(?FATAL, ?DECODE_ERROR, too_many_remote_alerts);
decode(<<?BYTE(Level), ?BYTE(Description), Rest/binary>>, Acc, N) when Level == ?WARNING ->
Alert = ?ALERT_REC(Level, Description),
decode(Rest, [Alert | Acc], N + 1);
@@ -93,7 +97,7 @@ decode(<<?BYTE(Level), ?BYTE(Description), _Rest/binary>>, Acc, _) when Level ==
Alert = ?ALERT_REC(Level, Description),
lists:reverse([Alert | Acc]); %% No need to decode rest fatal alert will end the connection
decode(<<?BYTE(_Level), _/binary>>, _, _) ->
- ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER);
+ ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER, failed_to_decode_remote_alert);
decode(<<>>, Acc, _) ->
lists:reverse(Acc, []).
diff --git a/lib/ssl/src/ssl_alert.hrl b/lib/ssl/src/ssl_alert.hrl
index 8c4bd08d31..38facb964f 100644
--- a/lib/ssl/src/ssl_alert.hrl
+++ b/lib/ssl/src/ssl_alert.hrl
@@ -109,6 +109,7 @@
-define(NO_APPLICATION_PROTOCOL, 120).
-define(ALERT_REC(Level,Desc), #alert{level=Level,description=Desc,where={?FILE, ?LINE}}).
+-define(ALERT_REC(Level,Desc,Reason), #alert{level=Level,description=Desc,where={?FILE, ?LINE},reason=Reason}).
-define(MAX_ALERTS, 10).
@@ -116,6 +117,7 @@
-record(alert, {
level,
description,
- where = {?FILE, ?LINE}
+ where = {?FILE, ?LINE},
+ reason
}).
-endif. % -ifdef(ssl_alert).
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index dc0a0c2cc4..e935c033c7 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -214,7 +214,7 @@ decipher(?RC4, HashSz, CipherState = #cipher_state{state = State0}, Fragment, _,
%% alerts may permit certain attacks against CBC mode as used in
%% TLS [CBCATT]. It is preferable to uniformly use the
%% bad_record_mac alert to hide the specific type of the error."
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC, decryption_failed)
end;
decipher(?DES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
@@ -272,7 +272,7 @@ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
%% alerts may permit certain attacks against CBC mode as used in
%% TLS [CBCATT]. It is preferable to uniformly use the
%% bad_record_mac alert to hide the specific type of the error."
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC, decryption_failed)
end.
aead_ciphertext_to_state(chacha20_poly1305, SeqNo, _IV, AAD0, Fragment, _Version) ->
@@ -296,11 +296,11 @@ aead_decipher(Type, #cipher_state{key = Key, iv = IV} = CipherState,
Content when is_binary(Content) ->
{Content, CipherState};
_ ->
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC, decryption_failed)
end
catch
_:_ ->
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC, decryption_failed)
end.
%%--------------------------------------------------------------------
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 089b3615c6..90e0810241 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -465,6 +465,14 @@ certify(internal, #certificate{asn1_certificates = []},
Connection:next_record(State0#state{client_certificate_requested = false}),
Connection:next_event(certify, Record, State);
+certify(internal, #certificate{},
+ #state{role = server,
+ negotiated_version = Version,
+ ssl_options = #ssl_options{verify = verify_none}} =
+ State, Connection) ->
+ Alert = ?ALERT_REC(?FATAL,?UNEXPECTED_MESSAGE, unrequested_certificate),
+ Connection:handle_own_alert(Alert, Version, certify, State);
+
certify(internal, #certificate{} = Cert,
#state{negotiated_version = Version,
role = Role,
@@ -786,12 +794,24 @@ downgrade(Type, Event, State, Connection) ->
%% Event handling functions called by state functions to handle
%% common or unexpected events for the state.
%%--------------------------------------------------------------------
+handle_common_event(internal, {handshake, {#hello_request{} = Handshake, _}}, connection = StateName,
+ #state{role = client} = State, _) ->
+ %% Should not be included in handshake history
+ {next_state, StateName, State#state{renegotiation = {true, peer}}, [{next_event, internal, Handshake}]};
+handle_common_event(internal, {handshake, {#hello_request{}, _}}, StateName, #state{role = client}, _)
+ when StateName =/= connection ->
+ {keep_state_and_data};
+handle_common_event(internal, {handshake, {Handshake, Raw}}, StateName,
+ #state{tls_handshake_history = Hs0} = State0, Connection) ->
+ %% This function handles client SNI hello extension when Handshake is
+ %% a client_hello, which needs to be determined by the connection callback.
+ %% In other cases this is a noop
+ State = Connection:handle_sni_extension(Handshake, State0),
+ HsHist = ssl_handshake:update_handshake_history(Hs0, Raw),
+ {next_state, StateName, State#state{tls_handshake_history = HsHist},
+ [{next_event, internal, Handshake}]};
handle_common_event(internal, {tls_record, TLSRecord}, StateName, State, Connection) ->
Connection:handle_common_event(internal, TLSRecord, StateName, State);
-handle_common_event(internal, #hello_request{}, StateName, #state{role = client} = State0, Connection)
- when StateName =:= connection ->
- {Record, State} = Connection:next_record(State0),
- Connection:next_event(StateName, Record, State);
handle_common_event(timeout, hibernate, _, _, _) ->
{keep_state_and_data, [hibernate]};
handle_common_event(internal, {application_data, Data}, StateName, State0, Connection) ->
@@ -1488,7 +1508,7 @@ rsa_key_exchange(Version, PremasterSecret, PublicKeyInfo = {Algorithm, _, _})
{premaster_secret, PremasterSecret,
PublicKeyInfo});
rsa_key_exchange(_, _, _) ->
- throw (?ALERT_REC(?FATAL,?HANDSHAKE_FAILURE)).
+ throw (?ALERT_REC(?FATAL,?HANDSHAKE_FAILURE, pub_key_is_not_rsa)).
rsa_psk_key_exchange(Version, PskIdentity, PremasterSecret,
PublicKeyInfo = {Algorithm, _, _})
@@ -1505,7 +1525,7 @@ rsa_psk_key_exchange(Version, PskIdentity, PremasterSecret,
{psk_premaster_secret, PskIdentity, PremasterSecret,
PublicKeyInfo});
rsa_psk_key_exchange(_, _, _, _) ->
- throw (?ALERT_REC(?FATAL,?HANDSHAKE_FAILURE)).
+ throw (?ALERT_REC(?FATAL,?HANDSHAKE_FAILURE, pub_key_is_not_rsa)).
request_client_cert(#state{ssl_options = #ssl_options{verify = verify_peer,
signature_algs = SupportedHashSigns},
diff --git a/lib/ssl/src/ssl_crl.erl b/lib/ssl/src/ssl_crl.erl
index faf5007b16..d9f21e04ac 100644
--- a/lib/ssl/src/ssl_crl.erl
+++ b/lib/ssl/src/ssl_crl.erl
@@ -39,13 +39,12 @@ trusted_cert_and_path(CRL, {SerialNumber, Issuer},{Db, DbRef} = DbHandle) ->
end;
trusted_cert_and_path(CRL, issuer_not_found, {Db, DbRef} = DbHandle) ->
- try find_issuer(CRL, DbHandle) of
- OtpCert ->
+ case find_issuer(CRL, DbHandle) of
+ {ok, OtpCert} ->
{ok, Root, Chain} = ssl_certificate:certificate_chain(OtpCert, Db, DbRef),
- {ok, Root, lists:reverse(Chain)}
- catch
- throw:_ ->
- {error, issuer_not_found}
+ {ok, Root, lists:reverse(Chain)};
+ {error, issuer_not_found} ->
+ {ok, unknown_crl_ca, []}
end.
find_issuer(CRL, {Db,_}) ->
@@ -61,11 +60,10 @@ find_issuer(CRL, {Db,_}) ->
issuer_not_found ->
{error, issuer_not_found}
catch
- {ok, IssuerCert} ->
- IssuerCert
+ {ok, _} = Result ->
+ Result
end.
-
verify_crl_issuer(CRL, ErlCertCandidate, Issuer, NotIssuer) ->
TBSCert = ErlCertCandidate#'OTPCertificate'.tbsCertificate,
case public_key:pkix_normalize_name(TBSCert#'OTPTBSCertificate'.subject) of
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index 598d4e4112..0787e151c0 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -167,7 +167,7 @@ certificate(OwnCert, CertDbHandle, CertDbRef, server) ->
{ok, _, Chain} ->
#certificate{asn1_certificates = Chain};
{error, _} ->
- ?ALERT_REC(?FATAL, ?INTERNAL_ERROR)
+ ?ALERT_REC(?FATAL, ?INTERNAL_ERROR, server_has_no_suitable_certificates)
end.
%%--------------------------------------------------------------------
@@ -195,7 +195,7 @@ client_certificate_verify(OwnCert, MasterSecret, Version,
PrivateKey, {Handshake, _}) ->
case public_key:pkix_is_fixed_dh_cert(OwnCert) of
true ->
- ?ALERT_REC(?FATAL, ?UNSUPPORTED_CERTIFICATE);
+ ?ALERT_REC(?FATAL, ?UNSUPPORTED_CERTIFICATE, fixed_diffie_hellman_prohibited);
false ->
Hashes =
calc_certificate_verify(Version, HashAlgo, MasterSecret, Handshake),
@@ -353,7 +353,7 @@ verify_server_key(#server_key_params{params_bin = EncParams,
%% Description: Checks that the certificate_verify message is valid.
%%--------------------------------------------------------------------
certificate_verify(_, _, _, undefined, _, _) ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, invalid_certificate_verify_message);
certificate_verify(Signature, PublicKeyInfo, Version,
HashSign = {HashAlgo, _}, MasterSecret, {_, Handshake}) ->
@@ -417,7 +417,7 @@ certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef,
catch
error:_ ->
%% ASN-1 decode of certificate somehow failed
- ?ALERT_REC(?FATAL, ?CERTIFICATE_UNKNOWN)
+ ?ALERT_REC(?FATAL, ?CERTIFICATE_UNKNOWN, failed_to_decode_certificate)
end.
%%--------------------------------------------------------------------
@@ -605,7 +605,7 @@ select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert, KeyExAlgo,
false
end, HashSigns) of
[] ->
- ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY);
+ ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY, no_suitable_signature_algorithm);
[HashSign | _] ->
HashSign
end;
@@ -664,11 +664,8 @@ master_secret(RecordCB, Version, #session{master_secret = Mastersecret},
try master_secret(RecordCB, Version, Mastersecret, SecParams,
ConnectionStates, Role)
catch
- exit:Reason ->
- Report = io_lib:format("Key calculation failed due to ~p",
- [Reason]),
- error_logger:error_report(Report),
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)
+ exit:_ ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, key_calculation_failure)
end;
master_secret(RecordCB, Version, PremasterSecret, ConnectionStates, Role) ->
@@ -683,11 +680,8 @@ master_secret(RecordCB, Version, PremasterSecret, ConnectionStates, Role) ->
ClientRandom, ServerRandom),
SecParams, ConnectionStates, Role)
catch
- exit:Reason ->
- Report = io_lib:format("Master secret calculation failed"
- " due to ~p", [Reason]),
- error_logger:error_report(Report),
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)
+ exit:_ ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, master_secret_calculation_failure)
end.
%%-------------Encode/Decode --------------------------------
@@ -958,8 +952,8 @@ decode_handshake(_Version, ?CLIENT_KEY_EXCHANGE, PKEPMS) ->
#client_key_exchange{exchange_keys = PKEPMS};
decode_handshake(_Version, ?FINISHED, VerifyData) ->
#finished{verify_data = VerifyData};
-decode_handshake(_, _, _) ->
- throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+decode_handshake(_, Message, _) ->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, {unknown_or_malformed_handshake, Message})).
%%--------------------------------------------------------------------
-spec decode_hello_extensions({client, binary()} | binary()) -> #hello_extensions{}.
@@ -1031,8 +1025,8 @@ dec_server_key(<<?UINT16(NLen), N:NLen/binary,
params_bin = BinMsg,
hashsign = HashSign,
signature = Signature};
-dec_server_key(_, _, _) ->
- throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+dec_server_key(_, KeyExchange, _) ->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, {unknown_or_malformed_key_exchange, KeyExchange})).
%%--------------------------------------------------------------------
-spec decode_suites('2_bytes'|'3_bytes', binary()) -> list().
@@ -1253,8 +1247,12 @@ handle_server_hello_extensions(RecordCB, Random, CipherSuite, Compression,
Protocol ->
{ConnectionStates, npn, Protocol}
end;
- _ -> %% {error, _Reason} or a list of 0/2+ protocols.
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)
+ {error, Reason} ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, Reason);
+ [] ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, no_protocols_in_server_hello);
+ [_|_] ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, too_many_protocols_in_server_hello)
end.
select_version(RecordCB, ClientVersion, Versions) ->
@@ -1316,14 +1314,14 @@ handle_renegotiation_info(_RecordCB, client, #renegotiation_info{renegotiated_co
true ->
{ok, ConnectionStates};
false ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, client_renegotiation)
end;
handle_renegotiation_info(_RecordCB, server, #renegotiation_info{renegotiated_connection = ClientVerify},
ConnectionStates, true, _, CipherSuites) ->
case is_member(?TLS_EMPTY_RENEGOTIATION_INFO_SCSV, CipherSuites) of
true ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, {server_renegotiation, empty_renegotiation_info_scsv});
false ->
CS = ssl_record:current_connection_state(ConnectionStates, read),
Data = CS#connection_state.client_verify_data,
@@ -1331,7 +1329,7 @@ handle_renegotiation_info(_RecordCB, server, #renegotiation_info{renegotiated_co
true ->
{ok, ConnectionStates};
false ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, server_renegotiation)
end
end;
@@ -1341,7 +1339,7 @@ handle_renegotiation_info(RecordCB, client, undefined, ConnectionStates, true, S
handle_renegotiation_info(RecordCB, server, undefined, ConnectionStates, true, SecureRenegotation, CipherSuites) ->
case is_member(?TLS_EMPTY_RENEGOTIATION_INFO_SCSV, CipherSuites) of
true ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, {server_renegotiation, empty_renegotiation_info_scsv});
false ->
handle_renegotiation_info(RecordCB, ConnectionStates, SecureRenegotation)
end.
@@ -1350,7 +1348,7 @@ handle_renegotiation_info(_RecordCB, ConnectionStates, SecureRenegotation) ->
CS = ssl_record:current_connection_state(ConnectionStates, read),
case {SecureRenegotation, CS#connection_state.secure_renegotiation} of
{_, true} ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, already_secure);
{true, false} ->
?ALERT_REC(?FATAL, ?NO_RENEGOTIATION);
{false, false} ->
@@ -1523,8 +1521,8 @@ path_validation_alert({bad_cert, selfsigned_peer}) ->
?ALERT_REC(?FATAL, ?BAD_CERTIFICATE);
path_validation_alert({bad_cert, unknown_ca}) ->
?ALERT_REC(?FATAL, ?UNKNOWN_CA);
-path_validation_alert(_) ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE).
+path_validation_alert(Reason) ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, Reason).
encrypted_premaster_secret(Secret, RSAPublicKey) ->
try
@@ -1533,18 +1531,27 @@ encrypted_premaster_secret(Secret, RSAPublicKey) ->
rsa_pkcs1_padding}]),
#encrypted_premaster_secret{premaster_secret = PreMasterSecret}
catch
- _:_->
- throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE))
+ _:_->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, premaster_encryption_failed))
end.
-digitally_signed({3, Minor}, Hash, HashAlgo, Key) when Minor >= 3 ->
+digitally_signed(Version, Hashes, HashAlgo, PrivateKey) ->
+ try do_digitally_signed(Version, Hashes, HashAlgo, PrivateKey) of
+ Signature ->
+ Signature
+ catch
+ error:badkey->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, bad_key(PrivateKey)))
+ end.
+
+do_digitally_signed({3, Minor}, Hash, HashAlgo, Key) when Minor >= 3 ->
public_key:sign({digest, Hash}, HashAlgo, Key);
-digitally_signed(_Version, Hash, HashAlgo, #'DSAPrivateKey'{} = Key) ->
+do_digitally_signed(_Version, Hash, HashAlgo, #'DSAPrivateKey'{} = Key) ->
public_key:sign({digest, Hash}, HashAlgo, Key);
-digitally_signed(_Version, Hash, _HashAlgo, #'RSAPrivateKey'{} = Key) ->
+do_digitally_signed(_Version, Hash, _HashAlgo, #'RSAPrivateKey'{} = Key) ->
public_key:encrypt_private(Hash, Key,
[{rsa_pad, rsa_pkcs1_padding}]);
-digitally_signed(_Version, Hash, HashAlgo, Key) ->
+do_digitally_signed(_Version, Hash, HashAlgo, Key) ->
public_key:sign({digest, Hash}, HashAlgo, Key).
calc_certificate_verify({3, 0}, HashAlgo, MasterSecret, Handshake) ->
@@ -1751,12 +1758,12 @@ dec_client_key(PKEPMS, ?KEY_EXCHANGE_RSA, {3, 0}) ->
dec_client_key(<<?UINT16(_), PKEPMS/binary>>, ?KEY_EXCHANGE_RSA, _) ->
#encrypted_premaster_secret{premaster_secret = PKEPMS};
dec_client_key(<<>>, ?KEY_EXCHANGE_DIFFIE_HELLMAN, _) ->
- throw(?ALERT_REC(?FATAL, ?UNSUPPORTED_CERTIFICATE));
+ throw(?ALERT_REC(?FATAL, ?UNSUPPORTED_CERTIFICATE, empty_dh_public));
dec_client_key(<<?UINT16(DH_YLen), DH_Y:DH_YLen/binary>>,
?KEY_EXCHANGE_DIFFIE_HELLMAN, _) ->
#client_diffie_hellman_public{dh_public = DH_Y};
dec_client_key(<<>>, ?KEY_EXCHANGE_EC_DIFFIE_HELLMAN, _) ->
- throw(?ALERT_REC(?FATAL, ?UNSUPPORTED_CERTIFICATE));
+ throw(?ALERT_REC(?FATAL, ?UNSUPPORTED_CERTIFICATE, empty_dh_public));
dec_client_key(<<?BYTE(DH_YLen), DH_Y:DH_YLen/binary>>,
?KEY_EXCHANGE_EC_DIFFIE_HELLMAN, _) ->
#client_ec_diffie_hellman_public{dh_public = DH_Y};
@@ -1800,7 +1807,7 @@ dec_server_key_signature(Params, <<?UINT16(0)>>, _) ->
dec_server_key_signature(Params, <<?UINT16(Len), Signature:Len/binary>>, _) ->
{Params, undefined, Signature};
dec_server_key_signature(_, _, _) ->
- throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, failed_to_decrypt_server_key_sign)).
dec_hello_extensions(<<>>, Acc) ->
Acc;
@@ -1955,8 +1962,8 @@ key_exchange_alg(_) ->
%%-------------Extension handling --------------------------------
%% Receive protocols, choose one from the list, return it.
-handle_alpn_extension(_, {error, _Reason}) ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+handle_alpn_extension(_, {error, Reason}) ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, Reason);
handle_alpn_extension([], _) ->
?ALERT_REC(?FATAL, ?NO_APPLICATION_PROTOCOL);
handle_alpn_extension([ServerProtocol|Tail], ClientProtocols) ->
@@ -1976,7 +1983,7 @@ handle_next_protocol(#next_protocol_negotiation{} = NextProtocols,
true ->
select_next_protocol(decode_next_protocols(NextProtocols), NextProtocolSelector);
false ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE) % unexpected next protocol extension
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, unexpected_next_protocol_extension)
end.
@@ -1996,17 +2003,17 @@ handle_next_protocol_on_server(#next_protocol_negotiation{extension_data = <<>>}
Protocols;
handle_next_protocol_on_server(_Hello, _Renegotiation, _SSLOpts) ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE). % unexpected next protocol extension
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, unexpected_next_protocol_extension).
next_protocol_extension_allowed(NextProtocolSelector, Renegotiating) ->
NextProtocolSelector =/= undefined andalso not Renegotiating.
-select_next_protocol({error, _Reason}, _NextProtocolSelector) ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+select_next_protocol({error, Reason}, _NextProtocolSelector) ->
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, Reason);
select_next_protocol(Protocols, NextProtocolSelector) ->
case NextProtocolSelector(Protocols) of
?NO_PROTOCOL ->
- ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE);
+ ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, no_next_protocol);
Protocol when is_binary(Protocol) ->
Protocol
end.
@@ -2169,3 +2176,9 @@ is_acceptable_hash_sign(_,_,_,_) ->
is_acceptable_hash_sign(Algos, SupportedHashSigns) ->
lists:member(Algos, SupportedHashSigns).
+bad_key(#'DSAPrivateKey'{}) ->
+ unacceptable_dsa_key;
+bad_key(#'RSAPrivateKey'{}) ->
+ unacceptable_rsa_key;
+bad_key(#'ECPrivateKey'{}) ->
+ unacceptable_ecdsa_key.
diff --git a/lib/ssl/src/ssl_handshake.hrl b/lib/ssl/src/ssl_handshake.hrl
index e7b118de10..fde92035a2 100644
--- a/lib/ssl/src/ssl_handshake.hrl
+++ b/lib/ssl/src/ssl_handshake.hrl
@@ -53,7 +53,8 @@
-define(NUM_OF_SESSION_ID_BYTES, 32). % TSL 1.1 & SSL 3
-define(NUM_OF_PREMASTERSECRET_BYTES, 48).
-define(DEFAULT_DIFFIE_HELLMAN_GENERATOR, 2).
--define(DEFAULT_DIFFIE_HELLMAN_PRIME, 16#FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF).
+-define(DEFAULT_DIFFIE_HELLMAN_PRIME,
+ 16#FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Handsake protocol - RFC 4346 section 7.4
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
index 076e663cd4..c19c1787ff 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
@@ -133,10 +133,14 @@
%% the client?
honor_cipher_order = false :: boolean(),
padding_check = true :: boolean(),
+ %%Should we use 1/n-1 or 0/n splitting to mitigate BEAST, or disable
+ %%mitigation entirely?
+ beast_mitigation = one_n_minus_one :: one_n_minus_one | zero_n | disabled,
fallback = false :: boolean(),
crl_check :: boolean() | peer | best_effort,
crl_cache,
- signature_algs
+ signature_algs,
+ v2_hello_compatible :: boolean()
}).
-record(socket_options,
diff --git a/lib/ssl/src/ssl_manager.erl b/lib/ssl/src/ssl_manager.erl
index 60b4fbe995..c7dcbaabe9 100644
--- a/lib/ssl/src/ssl_manager.erl
+++ b/lib/ssl/src/ssl_manager.erl
@@ -67,6 +67,7 @@
-define(CLEAN_SESSION_DB, 60000).
-define(CLEAN_CERT_DB, 500).
-define(DEFAULT_MAX_SESSION_CACHE, 1000).
+-define(LOAD_MITIGATION, 10).
%%====================================================================
%% API
@@ -196,10 +197,12 @@ register_session(Port, Session) ->
%%--------------------------------------------------------------------
-spec invalidate_session(host(), inet:port_number(), #session{}) -> ok.
invalidate_session(Host, Port, Session) ->
+ load_mitigation(),
cast({invalidate_session, Host, Port, Session}).
-spec invalidate_session(inet:port_number(), #session{}) -> ok.
invalidate_session(Port, Session) ->
+ load_mitigation(),
cast({invalidate_session, Port, Session}).
-spec invalidate_pem(File::binary()) -> ok.
@@ -719,3 +722,11 @@ invalidate_session_cache(undefined, CacheCb, Cache) ->
start_session_validator(Cache, CacheCb, {invalidate_before, erlang:monotonic_time()}, undefined);
invalidate_session_cache(Pid, _CacheCb, _Cache) ->
Pid.
+
+load_mitigation() ->
+ MSec = rand:uniform(?LOAD_MITIGATION),
+ receive
+ after
+ MSec ->
+ continue
+ end.
diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
index 866bfcef7e..0a086f5eeb 100644
--- a/lib/ssl/src/ssl_record.erl
+++ b/lib/ssl/src/ssl_record.erl
@@ -30,7 +30,7 @@
-include("ssl_alert.hrl").
%% Connection state handling
--export([init_connection_states/1,
+-export([init_connection_states/2,
current_connection_state/2, pending_connection_state/2,
activate_pending_connection_state/2,
set_security_params/3,
@@ -62,15 +62,16 @@
%%====================================================================
%%--------------------------------------------------------------------
--spec init_connection_states(client | server) -> #connection_states{}.
+-spec init_connection_states(client | server, one_n_minus_one | zero_n | disabled ) ->
+ #connection_states{}.
%%
%% Description: Creates a connection_states record with appropriate
%% values for the initial SSL connection setup.
%%--------------------------------------------------------------------
-init_connection_states(Role) ->
+init_connection_states(Role, BeastMitigation) ->
ConnectionEnd = record_protocol_role(Role),
- Current = initial_connection_state(ConnectionEnd),
- Pending = empty_connection_state(ConnectionEnd),
+ Current = initial_connection_state(ConnectionEnd, BeastMitigation),
+ Pending = empty_connection_state(ConnectionEnd, BeastMitigation),
#connection_states{current_read = Current,
pending_read = Pending,
current_write = Current,
@@ -119,9 +120,10 @@ activate_pending_connection_state(States =
read) ->
NewCurrent = Pending#connection_state{epoch = dtls_next_epoch(Current),
sequence_number = 0},
+ BeastMitigation = Pending#connection_state.beast_mitigation,
SecParams = Pending#connection_state.security_parameters,
ConnectionEnd = SecParams#security_parameters.connection_end,
- EmptyPending = empty_connection_state(ConnectionEnd),
+ EmptyPending = empty_connection_state(ConnectionEnd, BeastMitigation),
SecureRenegotation = NewCurrent#connection_state.secure_renegotiation,
NewPending = EmptyPending#connection_state{secure_renegotiation = SecureRenegotation},
States#connection_states{current_read = NewCurrent,
@@ -134,9 +136,10 @@ activate_pending_connection_state(States =
write) ->
NewCurrent = Pending#connection_state{epoch = dtls_next_epoch(Current),
sequence_number = 0},
+ BeastMitigation = Pending#connection_state.beast_mitigation,
SecParams = Pending#connection_state.security_parameters,
ConnectionEnd = SecParams#security_parameters.connection_end,
- EmptyPending = empty_connection_state(ConnectionEnd),
+ EmptyPending = empty_connection_state(ConnectionEnd, BeastMitigation),
SecureRenegotation = NewCurrent#connection_state.secure_renegotiation,
NewPending = EmptyPending#connection_state{secure_renegotiation = SecureRenegotation},
States#connection_states{current_write = NewCurrent,
@@ -314,12 +317,13 @@ set_pending_cipher_state(#connection_states{pending_read = Read,
encode_handshake(Frag, Version,
#connection_states{current_write =
#connection_state{
+ beast_mitigation = BeastMitigation,
security_parameters =
#security_parameters{bulk_cipher_algorithm = BCA}}} =
ConnectionStates) ->
case iolist_size(Frag) of
N when N > ?MAX_PLAIN_TEXT_LENGTH ->
- Data = split_bin(iolist_to_binary(Frag), ?MAX_PLAIN_TEXT_LENGTH, Version, BCA),
+ Data = split_bin(iolist_to_binary(Frag), ?MAX_PLAIN_TEXT_LENGTH, Version, BCA, BeastMitigation),
encode_iolist(?HANDSHAKE, Data, Version, ConnectionStates);
_ ->
encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates)
@@ -352,10 +356,11 @@ encode_change_cipher_spec(Version, ConnectionStates) ->
%%--------------------------------------------------------------------
encode_data(Frag, Version,
#connection_states{current_write = #connection_state{
+ beast_mitigation = BeastMitigation,
security_parameters =
#security_parameters{bulk_cipher_algorithm = BCA}}} =
ConnectionStates) ->
- Data = split_bin(Frag, ?MAX_PLAIN_TEXT_LENGTH, Version, BCA),
+ Data = split_bin(Frag, ?MAX_PLAIN_TEXT_LENGTH, Version, BCA, BeastMitigation),
encode_iolist(?APPLICATION_DATA, Data, Version, ConnectionStates).
uncompress(?NULL, Data, CS) ->
@@ -447,9 +452,10 @@ decipher_aead(Version, CipherFragment,
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
-empty_connection_state(ConnectionEnd) ->
+empty_connection_state(ConnectionEnd, BeastMitigation) ->
SecParams = empty_security_params(ConnectionEnd),
- #connection_state{security_parameters = SecParams}.
+ #connection_state{security_parameters = SecParams,
+ beast_mitigation = BeastMitigation}.
empty_security_params(ConnectionEnd = ?CLIENT) ->
#security_parameters{connection_end = ConnectionEnd,
@@ -478,10 +484,11 @@ record_protocol_role(client) ->
record_protocol_role(server) ->
?SERVER.
-initial_connection_state(ConnectionEnd) ->
+initial_connection_state(ConnectionEnd, BeastMitigation) ->
#connection_state{security_parameters =
initial_security_params(ConnectionEnd),
- sequence_number = 0
+ sequence_number = 0,
+ beast_mitigation = BeastMitigation
}.
initial_security_params(ConnectionEnd) ->
@@ -506,11 +513,17 @@ encode_iolist(Type, Data, Version, ConnectionStates0) ->
%% 1/n-1 splitting countermeasure Rizzo/Duong-Beast, RC4 chiphers are
%% not vulnerable to this attack.
-split_bin(<<FirstByte:8, Rest/binary>>, ChunkSize, Version, BCA) when
+split_bin(<<FirstByte:8, Rest/binary>>, ChunkSize, Version, BCA, one_n_minus_one) when
BCA =/= ?RC4 andalso ({3, 1} == Version orelse
{3, 0} == Version) ->
do_split_bin(Rest, ChunkSize, [[FirstByte]]);
-split_bin(Bin, ChunkSize, _, _) ->
+%% 0/n splitting countermeasure for clients that are incompatible with 1/n-1
+%% splitting.
+split_bin(Bin, ChunkSize, Version, BCA, zero_n) when
+ BCA =/= ?RC4 andalso ({3, 1} == Version orelse
+ {3, 0} == Version) ->
+ do_split_bin(Bin, ChunkSize, [[<<>>]]);
+split_bin(Bin, ChunkSize, _, _, _) ->
do_split_bin(Bin, ChunkSize, []).
do_split_bin(<<>>, _, Acc) ->
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl
index d34d144343..87fde35258 100644
--- a/lib/ssl/src/ssl_record.hrl
+++ b/lib/ssl/src/ssl_record.hrl
@@ -40,7 +40,9 @@
%% RFC 5746
secure_renegotiation,
client_verify_data,
- server_verify_data
+ server_verify_data,
+ %% How to do BEAST mitigation?
+ beast_mitigation
}).
-record(connection_states, {
diff --git a/lib/ssl/src/ssl_socket.erl b/lib/ssl/src/ssl_socket.erl
index 95a70a4602..b2aea2ba9c 100644
--- a/lib/ssl/src/ssl_socket.erl
+++ b/lib/ssl/src/ssl_socket.erl
@@ -24,7 +24,7 @@
-include("ssl_internal.hrl").
-include("ssl_api.hrl").
--export([socket/5, setopts/3, getopts/3, peername/2, sockname/2, port/2]).
+-export([socket/5, setopts/3, getopts/3, getstat/3, peername/2, sockname/2, port/2]).
-export([emulated_options/0, internal_inet_values/0, default_inet_values/0,
init/1, start_link/3, terminate/2, inherit_tracker/3, get_emulated_opts/1,
set_emulated_opts/2, get_all_opts/1, handle_call/3, handle_cast/2,
@@ -74,6 +74,11 @@ getopts(gen_tcp, Socket, Options) ->
getopts(Transport, Socket, Options) ->
Transport:getopts(Socket, Options).
+getstat(gen_tcp, Socket, Options) ->
+ inet:getstat(Socket, Options);
+getstat(Transport, Socket, Options) ->
+ Transport:getstat(Socket, Options).
+
peername(gen_tcp, Socket) ->
inet:peername(Socket);
peername(Transport, Socket) ->
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
index 4651687fe6..a920f54ed2 100644
--- a/lib/ssl/src/ssl_tls_dist_proxy.erl
+++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
@@ -116,7 +116,8 @@ handle_call({listen, Driver, Name}, _From, State) ->
{ok, TcpAddress} = get_tcp_address(Socket),
{ok, WorldTcpAddress} = get_tcp_address(World),
{_,Port} = WorldTcpAddress#net_address.address,
- case erl_epmd:register_node(Name, Port) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:register_node(Name, Port) of
{ok, Creation} ->
{reply, {ok, {Socket, TcpAddress, Creation}},
State#state{listen={Socket, World}}};
@@ -401,6 +402,18 @@ ssl_options(server, ["server_verify", Value|T]) ->
[{verify, atomize(Value)} | ssl_options(server,T)];
ssl_options(client, ["client_verify", Value|T]) ->
[{verify, atomize(Value)} | ssl_options(client,T)];
+ssl_options(server, ["server_verify_fun", Value|T]) ->
+ [{verify_fun, verify_fun(Value)} | ssl_options(server,T)];
+ssl_options(client, ["client_verify_fun", Value|T]) ->
+ [{verify_fun, verify_fun(Value)} | ssl_options(client,T)];
+ssl_options(server, ["server_crl_check", Value|T]) ->
+ [{crl_check, atomize(Value)} | ssl_options(server,T)];
+ssl_options(client, ["client_crl_check", Value|T]) ->
+ [{crl_check, atomize(Value)} | ssl_options(client,T)];
+ssl_options(server, ["server_crl_cache", Value|T]) ->
+ [{crl_cache, termify(Value)} | ssl_options(server,T)];
+ssl_options(client, ["client_crl_cache", Value|T]) ->
+ [{crl_cache, termify(Value)} | ssl_options(client,T)];
ssl_options(server, ["server_reuse_sessions", Value|T]) ->
[{reuse_sessions, atomize(Value)} | ssl_options(server,T)];
ssl_options(client, ["client_reuse_sessions", Value|T]) ->
@@ -425,14 +438,28 @@ ssl_options(server, ["server_dhfile", Value|T]) ->
[{dhfile, Value} | ssl_options(server,T)];
ssl_options(server, ["server_fail_if_no_peer_cert", Value|T]) ->
[{fail_if_no_peer_cert, atomize(Value)} | ssl_options(server,T)];
-ssl_options(_,_) ->
- exit(malformed_ssl_dist_opt).
+ssl_options(Type, Opts) ->
+ error(malformed_ssl_dist_opt, [Type, Opts]).
atomize(List) when is_list(List) ->
list_to_atom(List);
atomize(Atom) when is_atom(Atom) ->
Atom.
+termify(String) when is_list(String) ->
+ {ok, Tokens, _} = erl_scan:string(String ++ "."),
+ {ok, Term} = erl_parse:parse_term(Tokens),
+ Term.
+
+verify_fun(Value) ->
+ case termify(Value) of
+ {Mod, Func, State} when is_atom(Mod), is_atom(Func) ->
+ Fun = fun Mod:Func/3,
+ {Fun, State};
+ _ ->
+ error(malformed_ssl_dist_opt, [Value])
+ end.
+
flush_old_controller(Pid, Socket) ->
receive
{tcp, Socket, Data} ->
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 40f3eea527..eaf2dd002d 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -50,7 +50,7 @@
%% Handshake handling
-export([renegotiate/2, send_handshake/2, send_change_cipher/2,
- reinit_handshake_data/1]).
+ reinit_handshake_data/1, handle_sni_extension/2]).
%% Alert and close handling
-export([send_alert/2, handle_own_alert/4, handle_close_alert/3,
@@ -228,16 +228,16 @@ error(_, _, _) ->
gen_statem:state_function_result().
%%--------------------------------------------------------------------
hello(internal, #client_hello{client_version = ClientVersion,
- extensions = #hello_extensions{ec_point_formats = EcPointFormats,
- elliptic_curves = EllipticCurves}} = Hello,
- State = #state{connection_states = ConnectionStates0,
- port = Port, session = #session{own_certificate = Cert} = Session0,
- renegotiation = {Renegotiation, _},
- session_cache = Cache,
- session_cache_cb = CacheCb,
- negotiated_protocol = CurrentProtocol,
- key_algorithm = KeyExAlg,
- ssl_options = SslOpts}) ->
+ extensions = #hello_extensions{ec_point_formats = EcPointFormats,
+ elliptic_curves = EllipticCurves}} = Hello,
+ #state{connection_states = ConnectionStates0,
+ port = Port, session = #session{own_certificate = Cert} = Session0,
+ renegotiation = {Renegotiation, _},
+ session_cache = Cache,
+ session_cache_cb = CacheCb,
+ negotiated_protocol = CurrentProtocol,
+ key_algorithm = KeyExAlg,
+ ssl_options = SslOpts} = State) ->
case tls_handshake:hello(Hello, SslOpts, {Port, Session0, Cache, CacheCb,
ConnectionStates0, Cert, KeyExAlg}, Renegotiation) of
@@ -311,7 +311,7 @@ cipher(Type, Event, State) ->
connection(info, Event, State) ->
handle_info(Event, connection, State);
connection(internal, #hello_request{},
- #state{host = Host, port = Port,
+ #state{role = client, host = Host, port = Port,
session = #session{own_certificate = Cert} = Session0,
session_cache = Cache, session_cache_cb = CacheCb,
ssl_options = SslOpts,
@@ -326,14 +326,16 @@ connection(internal, #hello_request{},
= Hello#client_hello.session_id}}),
next_event(hello, Record, State);
connection(internal, #client_hello{} = Hello,
- #state{role = server, allow_renegotiate = true} = State) ->
+ #state{role = server, allow_renegotiate = true} = State0) ->
%% Mitigate Computational DoS attack
%% http://www.educatedguesswork.org/2011/10/ssltls_and_computational_dos.html
%% http://www.thc.org/thc-ssl-dos/ Rather than disabling client
%% initiated renegotiation we will disallow many client initiated
%% renegotiations immediately after each other.
erlang:send_after(?WAIT_TO_ALLOW_RENEGOTIATION, self(), allow_renegotiate),
- {next_state, hello, State#state{allow_renegotiate = false}, [{next_event, internal, Hello}]};
+ {Record, State} = next_record(State0#state{allow_renegotiate = false,
+ renegotiation = {true, peer}}),
+ next_event(hello, Record, State, [{next_event, internal, Hello}]);
connection(internal, #client_hello{},
#state{role = server, allow_renegotiate = false} = State0) ->
Alert = ?ALERT_REC(?WARNING, ?NO_RENEGOTIATION),
@@ -397,40 +399,14 @@ handle_common_event(internal, #alert{} = Alert, StateName,
handle_common_event(internal, #ssl_tls{type = ?HANDSHAKE, fragment = Data},
StateName, #state{protocol_buffers =
#protocol_buffers{tls_handshake_buffer = Buf0} = Buffers,
- negotiated_version = Version} = State0) ->
-
- Handle =
- fun({#hello_request{} = Packet, _}, {connection, HState}) ->
- %% This message should not be included in handshake
- %% message hashes. Starts new handshake (renegotiation)
- Hs0 = ssl_handshake:init_handshake_history(),
- {HState#state{tls_handshake_history = Hs0,
- renegotiation = {true, peer}},
- {next_event, internal, Packet}};
- ({#hello_request{}, _}, {next_state, _SName, HState}) ->
- %% This message should not be included in handshake
- %% message hashes. Already in negotiation so it will be ignored!
- {HState, []};
- ({#client_hello{} = Packet, Raw}, {connection, HState0}) ->
- HState = handle_sni_extension(Packet, HState0),
- Version = Packet#client_hello.client_version,
- Hs0 = ssl_handshake:init_handshake_history(),
- Hs1 = ssl_handshake:update_handshake_history(Hs0, Raw),
- {HState#state{tls_handshake_history = Hs1,
- renegotiation = {true, peer}},
- {next_event, internal, Packet}};
-
- ({Packet, Raw}, {_SName, HState0 = #state{tls_handshake_history=Hs0}}) ->
- HState = handle_sni_extension(Packet, HState0),
- Hs1 = ssl_handshake:update_handshake_history(Hs0, Raw),
- {HState#state{tls_handshake_history=Hs1}, {next_event, internal, Packet}}
- end,
+ negotiated_version = Version,
+ ssl_options = Options} = State0) ->
try
- {Packets, Buf} = tls_handshake:get_tls_handshake(Version,Data,Buf0),
- State1 = State0#state{protocol_buffers =
- Buffers#protocol_buffers{tls_packets = Packets,
- tls_handshake_buffer = Buf}},
- {State, Events} = tls_handshake_events(Handle, StateName, State1, []),
+ {Packets, Buf} = tls_handshake:get_tls_handshake(Version,Data,Buf0, Options),
+ State =
+ State0#state{protocol_buffers =
+ Buffers#protocol_buffers{tls_handshake_buffer = Buf}},
+ Events = tls_handshake_events(Packets),
case StateName of
connection ->
ssl_connection:hibernate_after(StateName, State, Events);
@@ -496,7 +472,8 @@ decode_alerts(Bin) ->
initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions, Tracker}, User,
{CbModule, DataTag, CloseTag, ErrorTag}) ->
- ConnectionStates = ssl_record:init_connection_states(Role),
+ #ssl_options{beast_mitigation = BeastMitigation} = SSLOptions,
+ ConnectionStates = ssl_record:init_connection_states(Role, BeastMitigation),
SessionCacheCb = case application:get_env(ssl, session_cb) of
{ok, Cb} when is_atom(Cb) ->
@@ -778,24 +755,12 @@ send_or_reply(_, Pid, _From, Data) ->
send_user(Pid, Msg) ->
Pid ! Msg.
-tls_handshake_events(Handle, StateName,
- #state{protocol_buffers =
- #protocol_buffers{tls_packets = [Packet]} = Buffers} = State0, Acc) ->
- {State, Event} = Handle(Packet, {StateName,
- State0#state{protocol_buffers =
- Buffers#protocol_buffers{tls_packets = []}}}),
- {State, lists:reverse([Event |Acc])};
-tls_handshake_events(Handle, StateName,
- #state{protocol_buffers =
- #protocol_buffers{tls_packets =
- [Packet | Packets]} = Buffers} = State0, Acc) ->
- {State, Event} = Handle(Packet, {StateName, State0#state{protocol_buffers =
- Buffers#protocol_buffers{tls_packets =
- Packets}}}),
- tls_handshake_events(Handle, StateName, State, [Event | Acc]);
-
-tls_handshake_events(_Handle, _, #state{}, _) ->
- throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+tls_handshake_events([]) ->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, malformed_handshake));
+tls_handshake_events(Packets) ->
+ lists:map(fun(Packet) ->
+ {next_event, internal, {handshake, Packet}}
+ end, Packets).
write_application_data(Data0, From,
#state{socket = Socket,
@@ -1064,5 +1029,5 @@ handle_sni_extension(#client_hello{extensions = HelloExtensions}, State0) ->
}
end
end;
-handle_sni_extension(_, State0) ->
- State0.
+handle_sni_extension(_, State) ->
+ State.
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index f34eebb0e4..397f963ad5 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -33,7 +33,7 @@
-include_lib("public_key/include/public_key.hrl").
-export([client_hello/8, hello/4,
- get_tls_handshake/3, encode_handshake/2, decode_handshake/3]).
+ get_tls_handshake/4, encode_handshake/2, decode_handshake/4]).
-type tls_handshake() :: #client_hello{} | ssl_handshake:ssl_handshake().
@@ -133,17 +133,17 @@ encode_handshake(Package, Version) ->
[MsgType, ?uint24(Len), Bin].
%%--------------------------------------------------------------------
--spec get_tls_handshake(tls_record:tls_version(), binary(), binary() | iolist()) ->
+-spec get_tls_handshake(tls_record:tls_version(), binary(), binary() | iolist(), #ssl_options{}) ->
{[tls_handshake()], binary()}.
%%
%% Description: Given buffered and new data from ssl_record, collects
%% and returns it as a list of handshake messages, also returns leftover
%% data.
%%--------------------------------------------------------------------
-get_tls_handshake(Version, Data, <<>>) ->
- get_tls_handshake_aux(Version, Data, []);
-get_tls_handshake(Version, Data, Buffer) ->
- get_tls_handshake_aux(Version, list_to_binary([Buffer, Data]), []).
+get_tls_handshake(Version, Data, <<>>, Options) ->
+ get_tls_handshake_aux(Version, Data, Options, []);
+get_tls_handshake(Version, Data, Buffer, Options) ->
+ get_tls_handshake_aux(Version, list_to_binary([Buffer, Data]), Options, []).
%%--------------------------------------------------------------------
%%% Internal functions
@@ -167,7 +167,7 @@ handle_client_hello(Version, #client_hello{session_id = SugesstedId,
SslOpts, Cache, CacheCb, Cert),
case CipherSuite of
no_suite ->
- ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY);
+ ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY, no_suitable_ciphers);
_ ->
{KeyExAlg,_,_,_} = ssl_cipher:suite_definition(CipherSuite),
case ssl_handshake:select_hashsign(ClientHashSigns, Cert, KeyExAlg, SupportedHashSigns, Version) of
@@ -184,24 +184,24 @@ handle_client_hello(Version, #client_hello{session_id = SugesstedId,
end.
get_tls_handshake_aux(Version, <<?BYTE(Type), ?UINT24(Length),
- Body:Length/binary,Rest/binary>>, Acc) ->
+ Body:Length/binary,Rest/binary>>, #ssl_options{v2_hello_compatible = V2Hello} = Opts, Acc) ->
Raw = <<?BYTE(Type), ?UINT24(Length), Body/binary>>,
- Handshake = decode_handshake(Version, Type, Body),
- get_tls_handshake_aux(Version, Rest, [{Handshake,Raw} | Acc]);
-get_tls_handshake_aux(_Version, Data, Acc) ->
+ Handshake = decode_handshake(Version, Type, Body, V2Hello),
+ get_tls_handshake_aux(Version, Rest, Opts, [{Handshake,Raw} | Acc]);
+get_tls_handshake_aux(_Version, Data, _, Acc) ->
{lists:reverse(Acc), Data}.
-decode_handshake(_, ?HELLO_REQUEST, <<>>) ->
+decode_handshake(_, ?HELLO_REQUEST, <<>>, _) ->
#hello_request{};
%% Client hello v2.
%% The server must be able to receive such messages, from clients that
%% are willing to use ssl v3 or higher, but have ssl v2 compatibility.
decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor),
- ?UINT16(CSLength), ?UINT16(0),
- ?UINT16(CDLength),
- CipherSuites:CSLength/binary,
- ChallengeData:CDLength/binary>>) ->
+ ?UINT16(CSLength), ?UINT16(0),
+ ?UINT16(CDLength),
+ CipherSuites:CSLength/binary,
+ ChallengeData:CDLength/binary>>, true) ->
#client_hello{client_version = {Major, Minor},
random = ssl_v2:client_random(ChallengeData, CDLength),
session_id = 0,
@@ -209,12 +209,18 @@ decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor),
compression_methods = [?NULL],
extensions = #hello_extensions{}
};
+decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(_), ?BYTE(_),
+ ?UINT16(CSLength), ?UINT16(0),
+ ?UINT16(CDLength),
+ _CipherSuites:CSLength/binary,
+ _ChallengeData:CDLength/binary>>, false) ->
+ throw(?ALERT_REC(?FATAL, ?PROTOCOL_VERSION, ssl_v2_client_hello_no_supported));
decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor), Random:32/binary,
- ?BYTE(SID_length), Session_ID:SID_length/binary,
- ?UINT16(Cs_length), CipherSuites:Cs_length/binary,
- ?BYTE(Cm_length), Comp_methods:Cm_length/binary,
- Extensions/binary>>) ->
-
+ ?BYTE(SID_length), Session_ID:SID_length/binary,
+ ?UINT16(Cs_length), CipherSuites:Cs_length/binary,
+ ?BYTE(Cm_length), Comp_methods:Cm_length/binary,
+ Extensions/binary>>, _) ->
+
DecodedExtensions = ssl_handshake:decode_hello_extensions({client, Extensions}),
#client_hello{
@@ -226,7 +232,7 @@ decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor), Random:3
extensions = DecodedExtensions
};
-decode_handshake(Version, Tag, Msg) ->
+decode_handshake(Version, Tag, Msg, _) ->
ssl_handshake:decode_handshake(Version, Tag, Msg).
enc_handshake(#hello_request{}, _Version) ->
diff --git a/lib/ssl/test/ssl_ECC_SUITE.erl b/lib/ssl/test/ssl_ECC_SUITE.erl
index 3a1fd00c06..b8a03f578d 100644
--- a/lib/ssl/test/ssl_ECC_SUITE.erl
+++ b/lib/ssl/test/ssl_ECC_SUITE.erl
@@ -343,6 +343,12 @@ new_ca(FileName, CA, OwnCa) ->
E1 = public_key:pem_decode(P1),
{ok, P2} = file:read_file(OwnCa),
E2 = public_key:pem_decode(P2),
- Pem = public_key:pem_encode(E2 ++E1),
- file:write_file(FileName, Pem),
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1p-freebsd" ++ _ ->
+ Pem = public_key:pem_encode(E1 ++E2),
+ file:write_file(FileName, Pem);
+ _ ->
+ Pem = public_key:pem_encode(E2 ++E1),
+ file:write_file(FileName, Pem)
+ end,
FileName.
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index d1162ab4a5..93b6ae66dc 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -96,6 +96,8 @@ basic_tests() ->
[app,
appup,
alerts,
+ alert_details,
+ alert_details_not_too_big,
version_option,
connect_twice,
connect_dist,
@@ -148,6 +150,7 @@ api_tests() ->
sockname,
versions,
controlling_process,
+ getstat,
close_with_timeout,
hibernate,
hibernate_right_away,
@@ -236,7 +239,10 @@ error_handling_tests_tls()->
rizzo_tests() ->
[rizzo,
- no_rizzo_rc4].
+ no_rizzo_rc4,
+ rizzo_one_n_minus_one,
+ rizzo_zero_n,
+ rizzo_disabled].
%%--------------------------------------------------------------------
init_per_suite(Config0) ->
@@ -346,10 +352,27 @@ init_per_testcase(TestCase, Config) when TestCase == psk_cipher_suites;
ssl_test_lib:ct_log_supported_protocol_versions(Config),
ct:timetrap({seconds, 30}),
Config;
+
init_per_testcase(rizzo, Config) ->
ssl_test_lib:ct_log_supported_protocol_versions(Config),
ct:timetrap({seconds, 40}),
Config;
+
+init_per_testcase(rizzo_one_n_minus_one, Config) ->
+ ct:log("TLS/SSL version ~p~n ", [tls_record:supported_protocol_versions()]),
+ ct:timetrap({seconds, 40}),
+ rizzo_add_mitigation_option(one_n_minus_one, Config);
+
+init_per_testcase(rizzo_zero_n, Config) ->
+ ct:log("TLS/SSL version ~p~n ", [tls_record:supported_protocol_versions()]),
+ ct:timetrap({seconds, 40}),
+ rizzo_add_mitigation_option(zero_n, Config);
+
+init_per_testcase(rizzo_disabled, Config) ->
+ ct:log("TLS/SSL version ~p~n ", [tls_record:supported_protocol_versions()]),
+ ct:timetrap({seconds, 40}),
+ rizzo_add_mitigation_option(disabled, Config);
+
init_per_testcase(prf, Config) ->
ct:log("TLS/SSL version ~p~n ", [tls_record:supported_protocol_versions()]),
ct:timetrap({seconds, 40}),
@@ -457,6 +480,33 @@ alerts(Config) when is_list(Config) ->
end
end, Alerts).
%%--------------------------------------------------------------------
+alert_details() ->
+ [{doc, "Test that ssl_alert:alert_txt/1 result contains extendend error description"}].
+alert_details(Config) when is_list(Config) ->
+ Unique = make_ref(),
+ UniqueStr = lists:flatten(io_lib:format("~w", [Unique])),
+ Alert = ?ALERT_REC(?WARNING, ?CLOSE_NOTIFY, Unique),
+ case string:str(ssl_alert:alert_txt(Alert), UniqueStr) of
+ 0 ->
+ ct:fail(error_details_missing);
+ _ ->
+ ok
+ end.
+
+%%--------------------------------------------------------------------
+alert_details_not_too_big() ->
+ [{doc, "Test that ssl_alert:alert_txt/1 limits printed depth of extended error description"}].
+alert_details_not_too_big(Config) when is_list(Config) ->
+ Reason = lists:duplicate(10, lists:duplicate(10, lists:duplicate(10, {some, data}))),
+ Alert = ?ALERT_REC(?WARNING, ?CLOSE_NOTIFY, Reason),
+ case length(ssl_alert:alert_txt(Alert)) < 1000 of
+ true ->
+ ok;
+ false ->
+ ct:fail(ssl_alert_text_too_big)
+ end.
+
+%%--------------------------------------------------------------------
new_options_in_accept() ->
[{doc,"Test that you can set ssl options in ssl_accept/3 and not only in tcp upgrade"}].
new_options_in_accept(Config) when is_list(Config) ->
@@ -642,6 +692,75 @@ controlling_process(Config) when is_list(Config) ->
ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
+getstat() ->
+ [{doc,"Test API function getstat/2"}].
+
+getstat(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server1 =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result, []}},
+ {options, [{active, false} | ServerOpts]}]),
+ Port1 = ssl_test_lib:inet_port(Server1),
+ Server2 =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result, []}},
+ {options, [{active, false} | ServerOpts]}]),
+ Port2 = ssl_test_lib:inet_port(Server2),
+ {ok, ActiveC} = rpc:call(ClientNode, ssl, connect,
+ [Hostname,Port1,[{active, once}|ClientOpts]]),
+ {ok, PassiveC} = rpc:call(ClientNode, ssl, connect,
+ [Hostname,Port2,[{active, false}|ClientOpts]]),
+
+ ct:log("Testcase ~p, Client ~p Servers ~p, ~p ~n",
+ [self(), self(), Server1, Server2]),
+
+ %% We only check that the values are non-zero initially
+ %% (due to the handshake), and that sending more changes the values.
+
+ %% Passive socket.
+
+ {ok, InitialStats} = ssl:getstat(PassiveC),
+ ct:pal("InitialStats ~p~n", [InitialStats]),
+ [true] = lists:usort([0 =/= proplists:get_value(Name, InitialStats)
+ || Name <- [recv_cnt, recv_oct, recv_avg, recv_max, send_cnt, send_oct, send_avg, send_max]]),
+
+ ok = ssl:send(PassiveC, "Hello world"),
+ wait_for_send(PassiveC),
+ {ok, SStats} = ssl:getstat(PassiveC, [send_cnt, send_oct]),
+ ct:pal("SStats ~p~n", [SStats]),
+ [true] = lists:usort([proplists:get_value(Name, SStats) =/= proplists:get_value(Name, InitialStats)
+ || Name <- [send_cnt, send_oct]]),
+
+ %% Active socket.
+
+ {ok, InitialAStats} = ssl:getstat(ActiveC),
+ ct:pal("InitialAStats ~p~n", [InitialAStats]),
+ [true] = lists:usort([0 =/= proplists:get_value(Name, InitialAStats)
+ || Name <- [recv_cnt, recv_oct, recv_avg, recv_max, send_cnt, send_oct, send_avg, send_max]]),
+
+ _ = receive
+ {ssl, ActiveC, _} ->
+ ok
+ after
+ ?SLEEP ->
+ exit(timeout)
+ end,
+
+ ok = ssl:send(ActiveC, "Hello world"),
+ wait_for_send(ActiveC),
+ {ok, ASStats} = ssl:getstat(ActiveC, [send_cnt, send_oct]),
+ ct:pal("ASStats ~p~n", [ASStats]),
+ [true] = lists:usort([proplists:get_value(Name, ASStats) =/= proplists:get_value(Name, InitialAStats)
+ || Name <- [send_cnt, send_oct]]),
+
+ ok.
+
+%%--------------------------------------------------------------------
controller_dies() ->
[{doc,"Test that the socket is closed after controlling process dies"}].
controller_dies(Config) when is_list(Config) ->
@@ -2582,7 +2701,7 @@ client_no_wrap_sequence_number(Config) when is_list(Config) ->
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
ErlData = "From erlang to erlang",
- N = 10,
+ N = 12,
Server =
ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
@@ -2591,7 +2710,7 @@ client_no_wrap_sequence_number(Config) when is_list(Config) ->
{options, ServerOpts}]),
Port = ssl_test_lib:inet_port(Server),
- Version = ssl_test_lib:protocol_version(Config),
+ Version = ssl_test_lib:protocol_version(Config, tuple),
Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
{host, Hostname},
@@ -2619,7 +2738,7 @@ server_no_wrap_sequence_number(Config) when is_list(Config) ->
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Data = "From erlang to erlang",
- N = 10,
+ N = 12,
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
@@ -3010,7 +3129,7 @@ tls_ciphersuite_vs_version(Config) when is_list(Config) ->
>>),
{ok, <<22, RecMajor:8, RecMinor:8, _RecLen:16, 2, HelloLen:24>>} = gen_tcp:recv(Socket, 9, 10000),
{ok, <<HelloBin:HelloLen/binary>>} = gen_tcp:recv(Socket, HelloLen, 5000),
- ServerHello = tls_handshake:decode_handshake({RecMajor, RecMinor}, 2, HelloBin),
+ ServerHello = tls_handshake:decode_handshake({RecMajor, RecMinor}, 2, HelloBin, false),
case ServerHello of
#server_hello{server_version = {3,0}, cipher_suite = <<0,57>>} ->
ok;
@@ -3488,6 +3607,36 @@ no_rizzo_rc4(Config) when is_list(Config) ->
run_send_recv_rizzo(Ciphers, Config, Version,
{?MODULE, send_recv_result_active_no_rizzo, []}).
+rizzo_one_n_minus_one() ->
+ [{doc,"Test that the 1/n-1-split mitigation of Rizzo/Dungon attack can be explicitly selected"}].
+
+rizzo_one_n_minus_one(Config) when is_list(Config) ->
+ Ciphers = [X || X ={_,Y,_} <- ssl:cipher_suites(), Y =/= rc4_128],
+ Prop = proplists:get_value(tc_group_properties, Config),
+ Version = proplists:get_value(name, Prop),
+ run_send_recv_rizzo(Ciphers, Config, Version,
+ {?MODULE, send_recv_result_active_rizzo, []}).
+
+rizzo_zero_n() ->
+ [{doc,"Test that the 0/n-split mitigation of Rizzo/Dungon attack can be explicitly selected"}].
+
+rizzo_zero_n(Config) when is_list(Config) ->
+ Ciphers = [X || X ={_,Y,_} <- ssl:cipher_suites(), Y =/= rc4_128],
+ Prop = proplists:get_value(tc_group_properties, Config),
+ Version = proplists:get_value(name, Prop),
+ run_send_recv_rizzo(Ciphers, Config, Version,
+ {?MODULE, send_recv_result_active_no_rizzo, []}).
+
+rizzo_disabled() ->
+ [{doc,"Test that the mitigation of Rizzo/Dungon attack can be explicitly disabled"}].
+
+rizzo_disabled(Config) when is_list(Config) ->
+ Ciphers = [X || X ={_,Y,_} <- ssl:cipher_suites(), Y =/= rc4_128],
+ Prop = proplists:get_value(tc_group_properties, Config),
+ Version = proplists:get_value(name, Prop),
+ run_send_recv_rizzo(Ciphers, Config, Version,
+ {?MODULE, send_recv_result_active_no_rizzo, []}).
+
%%--------------------------------------------------------------------
new_server_wants_peer_cert() ->
[{doc, "Test that server configured to do client certification does"
@@ -3860,6 +4009,7 @@ prf_verify_value(Socket, TlsVer, Expected, Algo) ->
send_recv_result_timeout_client(Socket) ->
{error, timeout} = ssl:recv(Socket, 11, 500),
+ {error, timeout} = ssl:recv(Socket, 11, 0),
ssl:send(Socket, "Hello world"),
receive
Msg ->
@@ -3960,6 +4110,18 @@ renegotiate_rejected(Socket) ->
ssl:send(Socket, "Hello world"),
ok.
+rizzo_add_mitigation_option(Value, Config) ->
+ lists:foldl(fun(Opt, Acc) ->
+ case proplists:get_value(Opt, Acc) of
+ undefined -> Acc;
+ C ->
+ N = lists:keystore(beast_mitigation, 1, C,
+ {beast_mitigation, Value}),
+ lists:keystore(Opt, 1, Acc, {Opt, N})
+ end
+ end, Config,
+ [client_opts, client_dsa_opts, server_opts, server_dsa_opts,
+ server_ecdsa_opts, server_ecdh_rsa_opts]).
new_config(PrivDir, ServerOpts0) ->
CaCertFile = proplists:get_value(cacertfile, ServerOpts0),
@@ -4500,4 +4662,6 @@ first_rsa_suite([{rsa, _, _, _} = Suite| _]) ->
first_rsa_suite([_ | Rest]) ->
first_rsa_suite(Rest).
-
+wait_for_send(Socket) ->
+ %% Make sure TLS process processed send message event
+ _ = ssl:connection_information(Socket).
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index d90ec428ee..f0ce82f4fe 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -21,6 +21,7 @@
-module(ssl_dist_SUITE).
-include_lib("common_test/include/ct.hrl").
+-include_lib("public_key/include/public_key.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
@@ -41,7 +42,9 @@
%%--------------------------------------------------------------------
all() ->
[basic, payload, plain_options, plain_verify_options, nodelay_option,
- listen_port_options, listen_options, connect_options, use_interface].
+ listen_port_options, listen_options, connect_options, use_interface,
+ verify_fun_fail, verify_fun_pass, crl_check_pass, crl_check_fail,
+ crl_check_best_effort, crl_cache_check_pass, crl_cache_check_fail].
groups() ->
[].
@@ -418,6 +421,255 @@ use_interface(Config) when is_list(Config) ->
stop_ssl_node(NH1),
success(Config).
+%%--------------------------------------------------------------------
+verify_fun_fail() ->
+ [{doc,"Test specifying verify_fun with a function that always fails"}].
+verify_fun_fail(Config) when is_list(Config) ->
+ DistOpts = "-ssl_dist_opt "
+ "server_verify verify_peer server_verify_fun "
+ "\"{ssl_dist_SUITE,verify_fail_always,{}}\" "
+ "client_verify verify_peer client_verify_fun "
+ "\"{ssl_dist_SUITE,verify_fail_always,{}}\" ",
+
+ NH1 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+ NH2 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+ Node2 = NH2#node_handle.nodename,
+
+ pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ %% Check that the function ran on the client node.
+ [{verify_fail_always_ran, true}] =
+ apply_on_ssl_node(NH1, fun () -> ets:tab2list(verify_fun_ran) end),
+ %% On the server node, it wouldn't run, because the server didn't
+ %% request a certificate from the client.
+ undefined =
+ apply_on_ssl_node(NH2, fun () -> ets:info(verify_fun_ran) end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+verify_fail_always(_Certificate, _Event, _State) ->
+ %% Create an ETS table, to record the fact that the verify function ran.
+ %% Spawn a new process, to avoid the ETS table disappearing.
+ Parent = self(),
+ spawn(
+ fun() ->
+ ets:new(verify_fun_ran, [public, named_table]),
+ ets:insert(verify_fun_ran, {verify_fail_always_ran, true}),
+ Parent ! go_ahead,
+ timer:sleep(infinity)
+ end),
+ receive go_ahead -> ok end,
+ {fail, bad_certificate}.
+
+%%--------------------------------------------------------------------
+verify_fun_pass() ->
+ [{doc,"Test specifying verify_fun with a function that always succeeds"}].
+verify_fun_pass(Config) when is_list(Config) ->
+ DistOpts = "-ssl_dist_opt "
+ "server_verify verify_peer server_verify_fun "
+ "\"{ssl_dist_SUITE,verify_pass_always,{}}\" "
+ "server_fail_if_no_peer_cert true "
+ "client_verify verify_peer client_verify_fun "
+ "\"{ssl_dist_SUITE,verify_pass_always,{}}\" ",
+
+ NH1 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+ Node1 = NH1#node_handle.nodename,
+ NH2 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+ Node2 = NH2#node_handle.nodename,
+
+ pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ %% Check that the function ran on the client node.
+ [{verify_pass_always_ran, true}] =
+ apply_on_ssl_node(NH1, fun () -> ets:tab2list(verify_fun_ran) end),
+ %% Check that it ran on the server node as well. The server
+ %% requested and verified the client's certificate because we
+ %% passed fail_if_no_peer_cert.
+ [{verify_pass_always_ran, true}] =
+ apply_on_ssl_node(NH2, fun () -> ets:tab2list(verify_fun_ran) end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+verify_pass_always(_Certificate, _Event, State) ->
+ %% Create an ETS table, to record the fact that the verify function ran.
+ %% Spawn a new process, to avoid the ETS table disappearing.
+ Parent = self(),
+ spawn(
+ fun() ->
+ ets:new(verify_fun_ran, [public, named_table]),
+ ets:insert(verify_fun_ran, {verify_pass_always_ran, true}),
+ Parent ! go_ahead,
+ timer:sleep(infinity)
+ end),
+ receive go_ahead -> ok end,
+ {valid, State}.
+%%--------------------------------------------------------------------
+crl_check_pass() ->
+ [{doc,"Test crl_check with non-revoked certificate"}].
+crl_check_pass(Config) when is_list(Config) ->
+ DistOpts = "-ssl_dist_opt client_crl_check true",
+ NewConfig =
+ [{many_verify_opts, true}, {additional_dist_opts, DistOpts}] ++ Config,
+
+ NH1 = start_ssl_node(NewConfig),
+ Node1 = NH1#node_handle.nodename,
+ NH2 = start_ssl_node(NewConfig),
+ Node2 = NH2#node_handle.nodename,
+
+ PrivDir = ?config(priv_dir, Config),
+ cache_crls_on_ssl_nodes(PrivDir, ["erlangCA", "otpCA"], [NH1, NH2]),
+
+ %% The server's certificate is not revoked, so connection succeeds.
+ pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+%%--------------------------------------------------------------------
+crl_check_fail() ->
+ [{doc,"Test crl_check with revoked certificate"}].
+crl_check_fail(Config) when is_list(Config) ->
+ DistOpts = "-ssl_dist_opt client_crl_check true",
+ NewConfig =
+ [{many_verify_opts, true},
+ %% The server uses a revoked certificate.
+ {server_cert_dir, "revoked"},
+ {additional_dist_opts, DistOpts}] ++ Config,
+
+ NH1 = start_ssl_node(NewConfig),
+ %%Node1 = NH1#node_handle.nodename,
+ NH2 = start_ssl_node(NewConfig),
+ Node2 = NH2#node_handle.nodename,
+
+ PrivDir = ?config(priv_dir, Config),
+ cache_crls_on_ssl_nodes(PrivDir, ["erlangCA", "otpCA"], [NH1, NH2]),
+
+ %% The server's certificate is revoked, so connection fails.
+ pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+%%--------------------------------------------------------------------
+crl_check_best_effort() ->
+ [{doc,"Test specifying crl_check as best_effort"}].
+crl_check_best_effort(Config) when is_list(Config) ->
+ DistOpts = "-ssl_dist_opt "
+ "server_verify verify_peer server_crl_check best_effort",
+ NewConfig =
+ [{many_verify_opts, true}, {additional_dist_opts, DistOpts}] ++ Config,
+
+ %% We don't have the correct CRL at hand, but since crl_check is
+ %% best_effort, we accept it anyway.
+ NH1 = start_ssl_node(NewConfig),
+ Node1 = NH1#node_handle.nodename,
+ NH2 = start_ssl_node(NewConfig),
+ Node2 = NH2#node_handle.nodename,
+
+ pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+%%--------------------------------------------------------------------
+crl_cache_check_pass() ->
+ [{doc,"Test specifying crl_check with custom crl_cache module"}].
+crl_cache_check_pass(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NodeDir = filename:join([PrivDir, "Certs"]),
+ DistOpts = "-ssl_dist_opt "
+ "client_crl_check true "
+ "client_crl_cache "
+ "\"{ssl_dist_SUITE,{\\\"" ++ NodeDir ++ "\\\",[]}}\"",
+ NewConfig =
+ [{many_verify_opts, true}, {additional_dist_opts, DistOpts}] ++ Config,
+
+ NH1 = start_ssl_node(NewConfig),
+ Node1 = NH1#node_handle.nodename,
+ NH2 = start_ssl_node(NewConfig),
+ Node2 = NH2#node_handle.nodename,
+
+ pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+%%--------------------------------------------------------------------
+crl_cache_check_fail() ->
+ [{doc,"Test custom crl_cache module with revoked certificate"}].
+crl_cache_check_fail(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NodeDir = filename:join([PrivDir, "Certs"]),
+ DistOpts = "-ssl_dist_opt "
+ "client_crl_check true "
+ "client_crl_cache "
+ "\"{ssl_dist_SUITE,{\\\"" ++ NodeDir ++ "\\\",[]}}\"",
+ NewConfig =
+ [{many_verify_opts, true},
+ %% The server uses a revoked certificate.
+ {server_cert_dir, "revoked"},
+ {additional_dist_opts, DistOpts}] ++ Config,
+
+ NH1 = start_ssl_node(NewConfig),
+ NH2 = start_ssl_node(NewConfig),
+ Node2 = NH2#node_handle.nodename,
+
+ pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
+
+ [] = apply_on_ssl_node(NH1, fun () -> nodes() end),
+ [] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
+
+%% ssl_crl_cache_api callbacks
+lookup(_DistributionPoint, _DbHandle) ->
+ not_available.
+
+select({rdnSequence, NameParts}, {NodeDir, _}) ->
+ %% Extract the CN from the issuer name...
+ [CN] = [CN ||
+ [#'AttributeTypeAndValue'{
+ type = ?'id-at-commonName',
+ value = <<_, _, CN/binary>>}] <- NameParts],
+ %% ...and use that as the directory name to find the CRL.
+ error_logger:info_report([{found_cn, CN}]),
+ CRLFile = filename:join([NodeDir, CN, "crl.pem"]),
+ {ok, PemBin} = file:read_file(CRLFile),
+ PemEntries = public_key:pem_decode(PemBin),
+ CRLs = [ CRL || {'CertificateList', CRL, not_encrypted}
+ <- PemEntries],
+ CRLs.
+
+fresh_crl(_DistributionPoint, CRL) ->
+ CRL.
%%--------------------------------------------------------------------
%%% Internal functions -----------------------------------------------
@@ -528,6 +780,19 @@ start_ssl_node_raw(Name, Args) ->
exit({failed_to_start_node, Name, Error})
end.
+cache_crls_on_ssl_nodes(PrivDir, CANames, NHs) ->
+ [begin
+ File = filename:join([PrivDir, "Certs", CAName, "crl.pem"]),
+ {ok, PemBin} = file:read_file(File),
+ PemEntries = public_key:pem_decode(PemBin),
+ CRLs = [ CRL || {'CertificateList', CRL, not_encrypted}
+ <- PemEntries],
+ ok = apply_on_ssl_node(NH, ssl_manager, insert_crls,
+ ["no_distribution_point", CRLs, dist])
+ end
+ || NH <- NHs, CAName <- CANames],
+ ok.
+
%%
%% command line creation
%%
@@ -563,11 +828,13 @@ mk_node_cmdline(ListenPort, Name, Args) ->
++ NameSw ++ " " ++ Name ++ " "
++ "-pa " ++ Pa ++ " "
++ "-run application start crypto -run application start public_key "
+ ++ "-eval 'net_kernel:verbose(1)' "
++ "-run " ++ atom_to_list(?MODULE) ++ " cnct2tstsrvr "
++ host_name() ++ " "
++ integer_to_list(ListenPort) ++ " "
++ Args ++ " "
++ "-env ERL_CRASH_DUMP " ++ Pwd ++ "/erl_crash_dump." ++ Name ++ " "
+ ++ "-kernel error_logger \"{file,\\\"" ++ Pwd ++ "/error_log." ++ Name ++ "\\\"}\" "
++ "-setcookie " ++ atom_to_list(erlang:get_cookie()).
%%
@@ -815,8 +1082,8 @@ setup_dist_opts(Config) ->
DataDir = proplists:get_value(data_dir, Config),
Dhfile = filename:join([DataDir, "dHParam.pem"]),
NodeDir = filename:join([PrivDir, "Certs"]),
- SDir = filename:join([NodeDir, "server"]),
- CDir = filename:join([NodeDir, "client"]),
+ SDir = filename:join([NodeDir, proplists:get_value(server_cert_dir, Config, "server")]),
+ CDir = filename:join([NodeDir, proplists:get_value(client_cert_dir, Config, "client")]),
SC = filename:join([SDir, "cert.pem"]),
SK = filename:join([SDir, "key.pem"]),
SKC = filename:join([SDir, "keycert.pem"]),
diff --git a/lib/ssl/test/ssl_handshake_SUITE.erl b/lib/ssl/test/ssl_handshake_SUITE.erl
index 26e83413c1..a671e3e307 100644
--- a/lib/ssl/test/ssl_handshake_SUITE.erl
+++ b/lib/ssl/test/ssl_handshake_SUITE.erl
@@ -99,7 +99,8 @@ decode_hello_handshake(_Config) ->
16#70, 16#64, 16#79, 16#2f, 16#32>>,
Version = {3, 0},
- {Records, _Buffer} = tls_handshake:get_tls_handshake(Version, HelloPacket, <<>>),
+ {Records, _Buffer} = tls_handshake:get_tls_handshake(Version, HelloPacket, <<>>,
+ #ssl_options{v2_hello_compatible = false}),
{Hello, _Data} = hd(Records),
#renegotiation_info{renegotiated_connection = <<0>>}
diff --git a/lib/ssl/test/ssl_npn_hello_SUITE.erl b/lib/ssl/test/ssl_npn_hello_SUITE.erl
index 533501e788..00eb9fee4f 100644
--- a/lib/ssl/test/ssl_npn_hello_SUITE.erl
+++ b/lib/ssl/test/ssl_npn_hello_SUITE.erl
@@ -57,7 +57,7 @@ encode_and_decode_client_hello_test(Config) ->
HandShakeData = create_client_handshake(undefined),
Version = ssl_test_lib:protocol_version(Config),
{[{DecodedHandshakeMessage, _Raw}], _} =
- tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>),
+ tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>, #ssl_options{}),
NextProtocolNegotiation = (DecodedHandshakeMessage#client_hello.extensions)#hello_extensions.next_protocol_negotiation,
NextProtocolNegotiation = undefined.
%%--------------------------------------------------------------------
@@ -65,7 +65,7 @@ encode_and_decode_npn_client_hello_test(Config) ->
HandShakeData = create_client_handshake(#next_protocol_negotiation{extension_data = <<>>}),
Version = ssl_test_lib:protocol_version(Config),
{[{DecodedHandshakeMessage, _Raw}], _} =
- tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>),
+ tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>, #ssl_options{}),
NextProtocolNegotiation = (DecodedHandshakeMessage#client_hello.extensions)#hello_extensions.next_protocol_negotiation,
NextProtocolNegotiation = #next_protocol_negotiation{extension_data = <<>>}.
%%--------------------------------------------------------------------
@@ -73,7 +73,7 @@ encode_and_decode_server_hello_test(Config) ->
HandShakeData = create_server_handshake(undefined),
Version = ssl_test_lib:protocol_version(Config),
{[{DecodedHandshakeMessage, _Raw}], _} =
- tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>),
+ tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>, #ssl_options{}),
NextProtocolNegotiation = (DecodedHandshakeMessage#server_hello.extensions)#hello_extensions.next_protocol_negotiation,
NextProtocolNegotiation = undefined.
%%--------------------------------------------------------------------
@@ -81,7 +81,7 @@ encode_and_decode_npn_server_hello_test(Config) ->
HandShakeData = create_server_handshake(#next_protocol_negotiation{extension_data = <<6, "spdy/2">>}),
Version = ssl_test_lib:protocol_version(Config),
{[{DecodedHandshakeMessage, _Raw}], _} =
- tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>),
+ tls_handshake:get_tls_handshake(Version, list_to_binary(HandShakeData), <<>>, #ssl_options{}),
NextProtocolNegotiation = (DecodedHandshakeMessage#server_hello.extensions)#hello_extensions.next_protocol_negotiation,
ct:log("~p ~n", [NextProtocolNegotiation]),
NextProtocolNegotiation = #next_protocol_negotiation{extension_data = <<6, "spdy/2">>}.
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 6a73acb704..042d57c0e2 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.erl
@@ -167,7 +167,7 @@ end_per_group(_GroupName, Config) ->
Config.
init_per_testcase(_TestCase, Config) ->
- ct:timetrap({seconds, 30}),
+ ct:timetrap({seconds, 90}),
Config.
diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl
index 5e6137d2a6..b352844ba0 100644
--- a/lib/ssl/test/ssl_session_cache_SUITE.erl
+++ b/lib/ssl/test/ssl_session_cache_SUITE.erl
@@ -118,7 +118,7 @@ init_customized_session_cache(Type, Config) ->
Config)),
ets:new(ssl_test, [named_table, public, set]),
ets:insert(ssl_test, {type, Type}),
- ct:timetrap({seconds, 5}),
+ ct:timetrap({seconds, 20}),
Config.
end_per_testcase(session_cache_process_list, Config) ->
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 543728627e..27c670cdc2 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1315,11 +1315,22 @@ ssl_options(Option, Config) ->
Opts ++ ProtocolOpts.
protocol_version(Config) ->
+ protocol_version(Config, atom).
+
+protocol_version(Config, tuple) ->
case proplists:get_value(protocol, Config) of
dtls ->
dtls_record:protocol_version(dtls_record:highest_protocol_version([]));
_ ->
- tls_record:protocol_version(tls_record:highest_protocol_version([]))
+ tls_record:highest_protocol_version(tls_record:supported_protocol_versions())
+ end;
+
+protocol_version(Config, atom) ->
+ case proplists:get_value(protocol, Config) of
+ dtls ->
+ dtls_record:protocol_version(protocol_version(Config, tuple));
+ _ ->
+ tls_record:protocol_version(protocol_version(Config, tuple))
end.
protocol_options(Config, Options) ->
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 9df31a3381..d9a4657a79 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -131,6 +131,13 @@ end_per_suite(_Config) ->
ssl:stop(),
application:stop(crypto).
+init_per_group(basic, Config) ->
+ case ssl_test_lib:supports_ssl_tls_version(sslv2) of
+ true ->
+ [{v2_hello_compatible, true} | Config];
+ false ->
+ [{v2_hello_compatible, false} | Config]
+ end;
init_per_group(GroupName, Config) ->
case ssl_test_lib:is_tls_version(GroupName) of
true ->
@@ -296,15 +303,18 @@ basic_erlang_server_openssl_client() ->
basic_erlang_server_openssl_client(Config) when is_list(Config) ->
process_flag(trap_exit, true),
ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
+ V2Compat = proplists:get_value(v2_hello_compatible, Config),
{_, ServerNode, _} = ssl_test_lib:run_where(Config),
Data = "From openssl to erlang",
+ ct:pal("v2_hello_compatible: ~p", [V2Compat]),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
- {mfa, {?MODULE, erlang_ssl_receive, [Data]}},
- {options, ServerOpts}]),
+ {mfa, {?MODULE, erlang_ssl_receive, [Data]}},
+ {options,[{v2_hello_compatible, V2Compat} | ServerOpts]}]),
+
Port = ssl_test_lib:inet_port(Server),
Exe = "openssl",
@@ -318,8 +328,8 @@ basic_erlang_server_openssl_client(Config) when is_list(Config) ->
%% Clean close down! Server needs to be closed first !!
ssl_test_lib:close(Server),
ssl_test_lib:close_port(OpenSslPort),
- process_flag(trap_exit, false),
- ok.
+ process_flag(trap_exit, false).
+
%%--------------------------------------------------------------------
erlang_client_openssl_server() ->
[{doc,"Test erlang client with openssl server"}].
diff --git a/lib/stdlib/src/beam_lib.erl b/lib/stdlib/src/beam_lib.erl
index 7a17226e46..fe9df601eb 100644
--- a/lib/stdlib/src/beam_lib.erl
+++ b/lib/stdlib/src/beam_lib.erl
@@ -46,7 +46,7 @@
terminate/2,code_change/3]).
-export([make_crypto_key/2, get_crypto_key/1]). %Utilities used by compiler
--export_type([attrib_entry/0, compinfo_entry/0, labeled_entry/0]).
+-export_type([attrib_entry/0, compinfo_entry/0, labeled_entry/0, label/0]).
-import(lists, [append/1, delete/2, foreach/2, keysort/2,
member/2, reverse/1, sort/1, splitwith/2]).
diff --git a/lib/stdlib/src/erl_compile.erl b/lib/stdlib/src/erl_compile.erl
index ef54076ee3..a6ae398d03 100644
--- a/lib/stdlib/src/erl_compile.erl
+++ b/lib/stdlib/src/erl_compile.erl
@@ -60,6 +60,7 @@ compile_cmdline() ->
_ -> my_halt(2)
end.
+-spec my_halt(_) -> no_return().
my_halt(Reason) ->
erlang:halt(Reason).
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl
index b8ce311c35..f53b0e2246 100644
--- a/lib/stdlib/src/escript.erl
+++ b/lib/stdlib/src/escript.erl
@@ -906,6 +906,7 @@ anno(L) ->
fatal(Str) ->
throw(Str).
+-spec my_halt(_) -> no_return().
my_halt(Reason) ->
erlang:halt(Reason).
diff --git a/lib/stdlib/src/proc_lib.erl b/lib/stdlib/src/proc_lib.erl
index 4a19603ec2..3dc1848550 100644
--- a/lib/stdlib/src/proc_lib.erl
+++ b/lib/stdlib/src/proc_lib.erl
@@ -479,18 +479,12 @@ trans_init(gen,init_it,[gen_server,_,_,supervisor_bridge,[Module|_],_]) ->
{supervisor_bridge,Module,1};
trans_init(gen,init_it,[gen_server,_,_,_,supervisor_bridge,[Module|_],_]) ->
{supervisor_bridge,Module,1};
-trans_init(gen,init_it,[GenMod,_,_,Module,_,_])
- when GenMod =:= gen_server;
- GenMod =:= gen_statem;
- GenMod =:= gen_fsm ->
- {Module,init,1};
-trans_init(gen,init_it,[GenMod,_,_,_,Module|_])
- when GenMod =:= gen_server;
- GenMod =:= gen_statem;
- GenMod =:= gen_fsm ->
- {Module,init,1};
trans_init(gen,init_it,[gen_event|_]) ->
{gen_event,init_it,6};
+trans_init(gen,init_it,[_GenMod,_,_,Module,_,_]) when is_atom(Module) ->
+ {Module,init,1};
+trans_init(gen,init_it,[_GenMod,_,_,_,Module|_]) when is_atom(Module) ->
+ {Module,init,1};
trans_init(M, F, A) when is_atom(M), is_atom(F) ->
{M,F,length(A)}.
diff --git a/lib/stdlib/src/stdlib.app.src b/lib/stdlib/src/stdlib.app.src
index 32bcdc4f2a..09176d2ca0 100644
--- a/lib/stdlib/src/stdlib.app.src
+++ b/lib/stdlib/src/stdlib.app.src
@@ -106,7 +106,7 @@
dets]},
{applications, [kernel]},
{env, []},
- {runtime_dependencies, ["sasl-2.6","kernel-4.1","erts-7.3","crypto-3.3",
+ {runtime_dependencies, ["sasl-3.0","kernel-5.0","erts-8.0","crypto-3.3",
"compiler-5.0"]}
]}.
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index 38b764541a..c81e72689c 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -30,7 +30,7 @@
%% Internal exports
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
- terminate/2, code_change/3]).
+ terminate/2, code_change/3, format_status/2]).
-export([try_again_restart/2]).
%% For release_handler only
@@ -246,7 +246,7 @@ check_childspecs(ChildSpecs) when is_list(ChildSpecs) ->
check_childspecs(X) -> {error, {badarg, X}}.
%%%-----------------------------------------------------------------
-%%% Called by timer:apply_after from restart/2
+%%% Called by restart/2
-spec try_again_restart(SupRef, Child) -> ok when
SupRef :: sup_ref(),
Child :: child_id() | pid().
@@ -264,8 +264,13 @@ cast(Supervisor, Req) ->
get_callback_module(Pid) ->
{status, _Pid, {module, _Mod},
[_PDict, _SysState, _Parent, _Dbg, Misc]} = sys:get_status(Pid),
- [_Header, _Data, {data, [{"State", State}]}] = Misc,
- State#state.module.
+ case lists:keyfind(supervisor, 1, Misc) of
+ {supervisor, [{"Callback", Mod}]} ->
+ Mod;
+ _ ->
+ [_Header, _Data, {data, [{"State", State}]} | _] = Misc,
+ State#state.module
+ end.
%%% ---------------------------------------------------
%%%
@@ -571,8 +576,8 @@ count_child(#child{pid = Pid, child_type = supervisor},
end.
-%%% If a restart attempt failed, this message is sent via
-%%% timer:apply_after(0,...) in order to give gen_server the chance to
+%%% If a restart attempt failed, this message is cast
+%%% from restart/2 in order to give gen_server the chance to
%%% check it's inbox before trying again.
-spec handle_cast({try_again_restart, child_id() | pid()}, state()) ->
{'noreply', state()} | {stop, shutdown, state()}.
@@ -790,16 +795,10 @@ restart(Child, State) ->
Id = if ?is_simple(State) -> Child#child.pid;
true -> Child#child.name
end,
- {ok, _TRef} = timer:apply_after(0,
- ?MODULE,
- try_again_restart,
- [self(),Id]),
+ ok = try_again_restart(self(), Id),
{ok,NState2};
{try_again, NState2, #child{name=ChName}} ->
- {ok, _TRef} = timer:apply_after(0,
- ?MODULE,
- try_again_restart,
- [self(),ChName]),
+ ok = try_again_restart(self(), ChName),
{ok,NState2};
Other ->
Other
@@ -1456,3 +1455,9 @@ report_progress(Child, SupName) ->
Progress = [{supervisor, SupName},
{started, extract_child(Child)}],
error_logger:info_report(progress, Progress).
+
+format_status(terminate, [_PDict, State]) ->
+ State;
+format_status(_, [_PDict, State]) ->
+ [{data, [{"State", State}]},
+ {supervisor, [{"Callback", State#state.module}]}].
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl
index 55fdcdd054..c5cfea5e9e 100644
--- a/lib/stdlib/test/binary_module_SUITE.erl
+++ b/lib/stdlib/test/binary_module_SUITE.erl
@@ -19,9 +19,7 @@
%%
-module(binary_module_SUITE).
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_testcase/2, end_per_testcase/2,
- init_per_group/2,end_per_group/2,
+-export([all/0, suite/0,
interesting/1,scope_return/1,random_ref_comp/1,random_ref_sr_comp/1,
random_ref_fla_comp/1,parts/1, bin_to_list/1, list_to_bin/1,
copy/1, referenced/1,guard/1,encode_decode/1,badargs/1,longest_common_trap/1]).
@@ -30,15 +28,9 @@
-include_lib("common_test/include/ct.hrl").
-init_per_testcase(_Case, Config) ->
- Config.
-
-end_per_testcase(_Case, _Config) ->
- ok.
-
suite() ->
[{ct_hooks,[ts_install_cth]},
- {timetrap,{minutes,30}}].
+ {timetrap,{minutes,10}}].
all() ->
[scope_return,interesting, random_ref_fla_comp, random_ref_sr_comp,
@@ -46,21 +38,6 @@ all() ->
referenced, guard, encode_decode, badargs,
longest_common_trap].
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-define(MASK_ERROR(EXPR),mask_error((catch (EXPR)))).
@@ -961,6 +938,7 @@ random_parts(X,N) ->
%% Test pseudorandomly generated cases against reference implementation.
random_ref_comp(Config) when is_list(Config) ->
+ ct:timetrap({minutes,30}), %% valgrind needs a lot of time
put(success_counter,0),
rand:seed(exsplus, {1271,769940,559934}),
Nr = {1,40},
@@ -991,6 +969,7 @@ random_ref_comp(Config) when is_list(Config) ->
%% Test pseudorandomly generated cases against reference implementation
%% of split and replace.
random_ref_sr_comp(Config) when is_list(Config) ->
+ ct:timetrap({minutes,30}), %% valgrind needs a lot
put(success_counter,0),
rand:seed(exsplus, {1271,769940,559934}),
Nr = {1,40},
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 15e3142408..40764a943d 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -125,7 +125,7 @@ end_per_testcase(_Func, _Config) ->
suite() ->
[{ct_hooks,[ts_install_cth]},
- {timetrap,{minutes,20}}].
+ {timetrap,{minutes,5}}].
all() ->
[{group, new}, {group, insert}, {group, lookup},
@@ -215,7 +215,7 @@ memory_check_summary(_Config) ->
receive {get_failed_memchecks, FailedMemchecks} -> ok end,
io:format("Failed memchecks: ~p\n",[FailedMemchecks]),
NoFailedMemchecks = length(FailedMemchecks),
- if NoFailedMemchecks > 3 ->
+ if NoFailedMemchecks > 300 ->
ct:fail("Too many failed (~p) memchecks", [NoFailedMemchecks]);
true ->
ok
@@ -604,9 +604,9 @@ memory(Config) when is_list(Config) ->
memory_do(Opts) ->
L = [T1,T2,T3,T4] = fill_sets_int(1000,Opts),
XR1 = case mem_mode(T1) of
- {normal,_} -> {13836,13046,13046,13052}; %{13862,13072,13072,13078};
- {compressed,4} -> {11041,10251,10251,10252}; %{11067,10277,10277,10278};
- {compressed,8} -> {10050,9260,9260,9260} %{10076,9286,9286,9286}
+ {normal,_} -> {13836,13560,13560,13566}; %{13836,13046,13046,13052}
+ {compressed,4} -> {11041,10865,10865,10866}; %{11041,10251,10251,10252}
+ {compressed,8} -> {10050,9774,9774,9774} % {10050,9260,9260,9260}
end,
XRes1 = adjust_xmem(L, XR1),
Res1 = {?S(T1),?S(T2),?S(T3),?S(T4)},
@@ -620,9 +620,9 @@ memory_do(Opts) ->
end,
L),
XR2 = case mem_mode(T1) of
- {normal,_} -> {13826,13037,13028,13034}; %{13852,13063,13054,13060};
- {compressed,4} -> {11031,10242,10233,10234}; %{11057,10268,10259,10260};
- {compressed,8} -> {10040,9251,9242,9242} %10066,9277,9268,9268}
+ {normal,_} -> {13826,13551,13542,13548}; %{13826,13037,13028,13034};
+ {compressed,4} -> {11031,10856,10747,10748}; %{11031,10242,10233,10234};
+ {compressed,8} -> {10040,9765,9756,9756} %{10040,9251,9242,9242}
end,
XRes2 = adjust_xmem(L, XR2),
Res2 = {?S(T1),?S(T2),?S(T3),?S(T4)},
@@ -636,9 +636,9 @@ memory_do(Opts) ->
end,
L),
XR3 = case mem_mode(T1) of
- {normal,_} -> {13816,13028,13010,13016}; %{13842,13054,13036,13042};
- {compressed,4} -> {11021,10233,10215,10216}; %{11047,10259,10241,10242};
- {compressed,8} -> {10030,9242,9224,9224} %{10056,9268,9250,9250}
+ {normal,_} -> {13816,13542,13524,13530}; %{13816,13028,13010,13016}
+ {compressed,4} -> {11021,10747,10729,10730}; %{11021,10233,10215,10216}
+ {compressed,8} -> {10030,9756,9738,9738} %{10030,9242,9224,9224}
end,
XRes3 = adjust_xmem(L, XR3),
Res3 = {?S(T1),?S(T2),?S(T3),?S(T4)},
@@ -698,7 +698,7 @@ chk_normal_tab_struct_size() ->
io:format("?TAB_STRUCT_SZ=~p~n", [?TAB_STRUCT_SZ]),
ok.
-adjust_xmem([T1,T2,T3,T4], {A0,B0,C0,D0} = _Mem0) ->
+adjust_xmem([_T1,_T2,_T3,_T4], {A0,B0,C0,D0} = _Mem0) ->
%% Adjust for 64-bit, smp, and os:
%% Table struct size may differ.
@@ -2809,16 +2809,22 @@ privacy_do(Opts) ->
privacy_check(pub,prot,priv),
Owner ! {shift,1,{pub,prot,priv}},
- receive {Pub1,Prot1,Priv1} -> ok end,
- privacy_check(Pub1,Prot1,Priv1),
+ receive
+ {Pub1,Prot1,Priv1} ->
+ ok = privacy_check(Pub1,Prot1,Priv1),
+ Owner ! {shift,2,{Pub1,Prot1,Priv1}}
+ end,
- Owner ! {shift,2,{Pub1,Prot1,Priv1}},
- receive {Pub2,Prot2,Priv2} -> ok end,
- privacy_check(Pub2,Prot2,Priv2),
+ receive
+ {Pub2,Prot2,Priv2} ->
+ ok = privacy_check(Pub2,Prot2,Priv2),
+ Owner ! {shift,0,{Pub2,Prot2,Priv2}}
+ end,
- Owner ! {shift,0,{Pub2,Prot2,Priv2}},
- receive {Pub2,Prot2,Priv2} -> ok end,
- privacy_check(Pub2,Prot2,Priv2),
+ receive
+ {Pub3,Prot3,Priv3} ->
+ ok = privacy_check(Pub3,Prot3,Priv3)
+ end,
Owner ! die,
receive {'EXIT',Owner,_} -> ok end,
@@ -2836,7 +2842,8 @@ privacy_check(Pub,Prot,Priv) ->
{'EXIT',{badarg,_}} = (catch ets:insert(Priv,{3,foo})),
%% check that it really wasn't written, either
- [] = ets:lookup(Prot,foo).
+ [] = ets:lookup(Prot,foo),
+ ok.
privacy_owner(Boss, Opts) ->
ets_new(pub, [public,named_table | Opts]),
@@ -3197,7 +3204,6 @@ delete_large_named_table_1(Name, Flags, Data, Fix) ->
true = ets:safe_fixtable(Tab, true),
lists:foreach(fun({K,_}) -> ets:delete(Tab, K) end, Data)
end,
- Parent = self(),
{Pid, MRef} = my_spawn_opt(fun() ->
receive
ets_new ->
@@ -3297,6 +3303,7 @@ exit_large_table_owner_do(Opts,{FEData,Config}) ->
verify_rescheduling_exit(Config, FEData, Opts, false, 1, 1).
exit_many_large_table_owner(Config) when is_list(Config) ->
+ ct:timetrap({minutes,30}), %% valgrind needs a lot
%%Data = [{erlang:phash2(I, 16#ffffff),I} || I <- lists:seq(1, 500000)],
FEData = fun(Do) -> repeat_while(fun(500000) -> {false,ok};
(I) -> Do({erlang:phash2(I, 16#ffffff),I}),
@@ -4270,6 +4277,7 @@ do_lookup_element(Tab, N, M) ->
heavy_concurrent(Config) when is_list(Config) ->
+ ct:timetrap({minutes,30}), %% valgrind needs a lot of time
repeat_for_opts(do_heavy_concurrent).
do_heavy_concurrent(Opts) ->
@@ -5342,12 +5350,12 @@ verify_table_load(T) ->
Stats = ets:info(T,stats),
{Buckets,AvgLen,StdDev,ExpSD,_MinLen,_MaxLen,_} = Stats,
ok = if
- AvgLen > 7 ->
+ AvgLen > 2 ->
io:format("Table overloaded: Stats=~p\n~p\n",
[Stats, ets:info(T)]),
false;
- Buckets>256, AvgLen < 6 ->
+ Buckets>256, AvgLen < 0.5 ->
io:format("Table underloaded: Stats=~p\n~p\n",
[Stats, ets:info(T)]),
false;
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl
index 3242511f4a..338cd3dc0a 100644
--- a/lib/stdlib/test/gen_server_SUITE.erl
+++ b/lib/stdlib/test/gen_server_SUITE.erl
@@ -185,7 +185,7 @@ start(Config) when is_list(Config) ->
gen_server:start({global, my_test_name},
gen_server_SUITE, [], []),
ok = gen_server:call({global, my_test_name}, stop),
- ct:sleep(1),
+ busy_wait_for_process(Pid4,600),
{'EXIT', {noproc,_}} = (catch gen_server:call(Pid4, started_p, 10)),
%% global register linked
@@ -214,7 +214,7 @@ start(Config) when is_list(Config) ->
gen_server:start({via, dummy_via, my_test_name},
gen_server_SUITE, [], []),
ok = gen_server:call({via, dummy_via, my_test_name}, stop),
- ct:sleep(1),
+ busy_wait_for_process(Pid6,600),
{'EXIT', {noproc,_}} = (catch gen_server:call(Pid6, started_p, 10)),
%% via register linked
diff --git a/lib/stdlib/test/id_transform_SUITE.erl b/lib/stdlib/test/id_transform_SUITE.erl
index 54f452825f..3d4ae1a189 100644
--- a/lib/stdlib/test/id_transform_SUITE.erl
+++ b/lib/stdlib/test/id_transform_SUITE.erl
@@ -61,13 +61,8 @@ id_transform(Config) when is_list(Config) ->
"erl_id_trans.erl"]),
{ok,erl_id_trans,Bin} = compile:file(File,[binary]),
{module,erl_id_trans} = code:load_binary(erl_id_trans, File, Bin),
- case test_server:purify_is_running() of
- false ->
- ct:timetrap({hours,1}),
- run_in_test_suite();
- true ->
- {skip,"Valgrind (too slow)"}
- end.
+ ct:timetrap({hours,1}),
+ run_in_test_suite().
run_in_test_suite() ->
SuperDir = filename:dirname(filename:dirname(code:which(?MODULE))),
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl
index be6b470ca7..7d48cbc97c 100644
--- a/lib/stdlib/test/io_SUITE.erl
+++ b/lib/stdlib/test/io_SUITE.erl
@@ -19,10 +19,7 @@
%%
-module(io_SUITE).
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2]).
-
--export([init_per_testcase/2, end_per_testcase/2]).
+-export([all/0, suite/0]).
-export([error_1/1, float_g/1, otp_5403/1, otp_5813/1, otp_6230/1,
otp_6282/1, otp_6354/1, otp_6495/1, otp_6517/1, otp_6502/1,
@@ -51,12 +48,6 @@
-define(privdir(Conf), proplists:get_value(priv_dir, Conf)).
-endif.
-init_per_testcase(_Case, Config) ->
- Config.
-
-end_per_testcase(_Case, _Config) ->
- ok.
-
suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap,{minutes,1}}].
@@ -72,22 +63,6 @@ all() ->
io_lib_width_too_small, io_with_huge_message_queue,
format_string, maps, coverage].
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
-
%% Error cases for output.
error_1(Config) when is_list(Config) ->
%% We don't do erroneous output on stdout - the test server
@@ -952,7 +927,7 @@ otp_6708(Config) when is_list(Config) ->
otp_7084() ->
- [{timetrap,{minutes,3}}].
+ [{timetrap,{minutes,6}}]. %% valgrind needs a lot of time
%% OTP-7084. Printing floating point numbers nicely.
otp_7084(Config) when is_list(Config) ->
@@ -1830,13 +1805,14 @@ bad_printable_range(Config) when is_list(Config) ->
Cmd = lists:concat([lib:progname()," +pcunnnnnicode -run erlang halt"]),
P = open_port({spawn, Cmd}, [stderr_to_stdout, {line, 200}]),
ok = receive
- {P, {data, {eol , "bad range of printable characters" ++ _}}} ->
- ok;
- Other ->
- Other
- after 1000 ->
- timeout
- end,
+ {P, {data, {eol , "bad range of printable characters" ++ _}}} ->
+ ok;
+ Other ->
+ Other
+ %% valgrind needs a lot of time
+ after 6000 ->
+ timeout
+ end,
catch port_close(P),
flush_from_port(P),
ok.
diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl
index 4e39f011f6..1e286a9306 100644
--- a/lib/stdlib/test/io_proto_SUITE.erl
+++ b/lib/stdlib/test/io_proto_SUITE.erl
@@ -75,7 +75,7 @@ end_per_testcase(_Case, Config) ->
suite() ->
[{ct_hooks,[ts_install_cth]},
- {timetrap,{minutes,20}}].
+ {timetrap,{minutes,5}}].
all() ->
[setopts_getopts, unicode_options, unicode_options_gen,
@@ -462,6 +462,7 @@ unicode_options(Config) when is_list(Config) ->
%% Tests various unicode options on random generated files.
unicode_options_gen(Config) when is_list(Config) ->
+ ct:timetrap({minutes,30}), %% valgrind needs a alot of time
random:seed(1240, 900586, 553728),
PrivDir = proplists:get_value(priv_dir, Config),
AllModes = [utf8,utf16,{utf16,big},{utf16,little},
diff --git a/lib/stdlib/test/rand_SUITE.erl b/lib/stdlib/test/rand_SUITE.erl
index 1bcdc3ccd0..cb778c96d4 100644
--- a/lib/stdlib/test/rand_SUITE.erl
+++ b/lib/stdlib/test/rand_SUITE.erl
@@ -18,18 +18,13 @@
%% %CopyrightEnd%
-module(rand_SUITE).
--export([all/0, suite/0,groups/0,
- init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,
- init_per_testcase/2, end_per_testcase/2
- ]).
+-export([all/0, suite/0,groups/0]).
-export([interval_int/1, interval_float/1, seed/1,
api_eq/1, reference/1,
basic_stats_uniform_1/1, basic_stats_uniform_2/1,
basic_stats_normal/1,
- plugin/1, measure/1
- ]).
+ plugin/1, measure/1]).
-export([test/0, gen/1]).
@@ -37,12 +32,6 @@
-define(LOOP, 1000000).
-init_per_testcase(_Case, Config) ->
- Config.
-
-end_per_testcase(_Case, _Config) ->
- ok.
-
suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap,{minutes,3}}].
@@ -52,19 +41,12 @@ all() ->
api_eq,
reference,
{group, basic_stats},
- plugin, measure
- ].
+ plugin, measure].
groups() ->
[{basic_stats, [parallel],
[basic_stats_uniform_1, basic_stats_uniform_2, basic_stats_normal]}].
-init_per_suite(Config) -> Config.
-end_per_suite(_Config) -> ok.
-
-init_per_group(_GroupName, Config) -> Config.
-end_per_group(_GroupName, Config) -> Config.
-
%% A simple helper to test without test_server during dev
test() ->
Tests = all(),
@@ -285,16 +267,19 @@ gen(_, _, Acc) -> lists:reverse(Acc).
%% Check that the algorithms generate sound values.
basic_stats_uniform_1(Config) when is_list(Config) ->
+ ct:timetrap({minutes,6}), %% valgrind needs a lot of time
[basic_uniform_1(?LOOP, rand:seed_s(Alg), 0.0, array:new([{default, 0}]))
|| Alg <- algs()],
ok.
basic_stats_uniform_2(Config) when is_list(Config) ->
+ ct:timetrap({minutes,6}), %% valgrind needs a lot of time
[basic_uniform_2(?LOOP, rand:seed_s(Alg), 0, array:new([{default, 0}]))
|| Alg <- algs()],
ok.
basic_stats_normal(Config) when is_list(Config) ->
+ ct:timetrap({minutes,6}), %% valgrind needs a lot of time
io:format("Testing normal~n",[]),
[basic_normal_1(?LOOP, rand:seed_s(Alg), 0, 0) || Alg <- algs()],
ok.
@@ -395,6 +380,7 @@ crypto_uniform_n(N, State0) ->
%% Not a test but measures the time characteristics of the different algorithms
measure(Suite) when is_atom(Suite) -> [];
measure(_Config) ->
+ ct:timetrap({minutes,6}), %% valgrind needs a lot of time
Algos = [crypto64|algs()],
io:format("RNG uniform integer performance~n",[]),
_ = measure_1(random, fun(State) -> {int, random:uniform_s(10000, State)} end),
diff --git a/lib/stdlib/test/select_SUITE.erl b/lib/stdlib/test/select_SUITE.erl
index e999d040c9..22b6d37e5d 100644
--- a/lib/stdlib/test/select_SUITE.erl
+++ b/lib/stdlib/test/select_SUITE.erl
@@ -59,42 +59,20 @@ config(priv_dir,_) ->
".".
-else.
%% When run in test server.
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,select_test/1,
- init_per_testcase/2, end_per_testcase/2,
- return_values/1]).
-
-init_per_testcase(_Case, Config) ->
- Config.
-
-end_per_testcase(_Case, _Config) ->
- ok.
+-export([all/0, suite/0,
+ select_test/1, return_values/1]).
suite() ->
[{ct_hooks,[ts_install_cth]},
- {timetrap,{minutes,20}}].
+ {timetrap,{minutes,1}}].
all() ->
[return_values, select_test].
-groups() ->
- [].
-
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
%% Test select in numerous ways.
select_test(Config) when is_list(Config) ->
+ ct:timetrap({minutes,40}), %% valgrinds needs a lot of time
do_test(Config).
%% Test return values in specific situations for select/3 and select/1.
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index 3f1aa0e7a3..cd2c6b0cbb 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -66,7 +66,7 @@
%% Misc tests
-export([child_unlink/1, tree/1, count_children/1,
- count_restarting_children/1,
+ count_restarting_children/1, get_callback_module/1,
do_not_save_start_parameters_for_temporary_children/1,
do_not_save_child_specs_for_temporary_children/1,
simple_one_for_one_scale_many_temporary_children/1,
@@ -91,7 +91,7 @@ all() ->
{group, normal_termination},
{group, shutdown_termination},
{group, abnormal_termination}, child_unlink, tree,
- count_children, count_restarting_children,
+ count_children, count_restarting_children, get_callback_module,
do_not_save_start_parameters_for_temporary_children,
do_not_save_child_specs_for_temporary_children,
simple_one_for_one_scale_many_temporary_children, temporary_bystander,
@@ -1507,6 +1507,14 @@ count_restarting_children(Config) when is_list(Config) ->
[1,0,0,0] = get_child_counts(SupPid).
%%-------------------------------------------------------------------------
+%% Test get_callback_module
+get_callback_module(Config) when is_list(Config) ->
+ Child = {child, {supervisor_1, start_child, []}, temporary, 1000,
+ worker, []},
+ {ok, SupPid} = start_link({ok, {{simple_one_for_one, 2, 3600}, [Child]}}),
+ supervisor_SUITE = supervisor:get_callback_module(SupPid).
+
+%%-------------------------------------------------------------------------
%% Temporary children shall not be restarted so they should not save
%% start parameters, as it potentially can take up a huge amount of
%% memory for no purpose.
diff --git a/lib/stdlib/test/unicode_SUITE.erl b/lib/stdlib/test/unicode_SUITE.erl
index 81a591f433..07d63bdf22 100644
--- a/lib/stdlib/test/unicode_SUITE.erl
+++ b/lib/stdlib/test/unicode_SUITE.erl
@@ -21,10 +21,7 @@
-include_lib("common_test/include/ct.hrl").
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,
- init_per_testcase/2,
- end_per_testcase/2,
+-export([all/0, suite/0,groups/0,
utf8_illegal_sequences_bif/1,
utf16_illegal_sequences_bif/1,
random_lists/1,
@@ -38,12 +35,6 @@
ex_binaries_errors_utf32_little/1,
ex_binaries_errors_utf32_big/1]).
-init_per_testcase(_Case, Config) ->
- Config.
-
-end_per_testcase(_Case, _Config) ->
- ok.
-
suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap,{minutes,20}}].
@@ -63,18 +54,6 @@ groups() ->
ex_binaries_errors_utf32_little,
ex_binaries_errors_utf32_big]}].
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-init_per_group(_GroupName, Config) ->
- Config.
-
-end_per_group(_GroupName, Config) ->
- Config.
-
binaries_errors_limit(Config) when is_list(Config) ->
setlimit(10),
ex_binaries_errors_utf8(Config),
@@ -761,6 +740,7 @@ leading_lo_surrogate_bif(HiSurr, LoSurr, End) when LoSurr =< End ->
leading_lo_surrogate_bif(_, _, _) -> ok.
utf8_illegal_sequences_bif(Config) when is_list(Config) ->
+ ct:timetrap({minutes,40}), %% valgrind needs a lot
setlimit(10),
ex_utf8_illegal_sequences_bif(Config),
setlimit(default),
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl
index c96df4f8f2..1be8d775be 100644
--- a/lib/wx/api_gen/gl_gen_erl.erl
+++ b/lib/wx/api_gen/gl_gen_erl.erl
@@ -463,7 +463,7 @@ doc_return_types(T, Ps0) ->
Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= true, Where =/= c],
doc_return_types2(T, Ps).
-doc_return_types2(void, []) -> "ok";
+doc_return_types2(void, []) -> "'ok'";
doc_return_types2(void, [#arg{type=T}]) -> doc_arg_type2(T);
doc_return_types2(T, []) -> doc_arg_type2(T);
doc_return_types2(void, Ps) ->
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index 85ebc093f5..17e10fb306 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -33,7 +33,7 @@
-type wxEvtHandler() :: wx:wx_object().
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
--spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
+-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> 'ok'.
connect(This, EventType) ->
connect(This, EventType, []).
@@ -55,9 +55,9 @@ connect(This, EventType) ->
%% to process the event. Default not specfied i.e. a message will
%% be delivered to the process calling this function.
%% {userData, term()} An erlang term that will be sent with the event. Default: [].
--spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> ok when
- Option :: {id, integer()} | {lastId, integer()} | {skip, boolean()} |
- callback | {callback, function()} | {userData, term()}.
+-spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> 'ok' when
+ Option :: {'id', integer()} | {'lastId', integer()} | {'skip', boolean()} |
+ 'callback' | {'callback', function()} | {'userData', term()}.
connect(This=#wx_ref{type=ThisT}, EventType, Options) ->
EvH = parse_opts(Options, #evh{et=EventType}),
?CLASS(ThisT,wxEvtHandler),
@@ -115,7 +115,7 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType) when is_atom(EventT
%% EventType may be the atom 'null' to match any eventtype.
%% Notice that the options skip and userdata is not used to match the eventhandler.
-spec disconnect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> boolean() when
- Option :: {id, integer()} | {lastId, integer()} | {callback, function()}.
+ Option :: {'id', integer()} | {'lastId', integer()} | {'callback', function()}.
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
?CLASS(ThisT,wxEvtHandler),
EvH = parse_opts(Opts, #evh{et=EventType}),
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 55c179142d..84d3990786 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -210,7 +210,7 @@ gen_funcs(Defs) ->
w(" void *This = getPtr(bp,memenv);~n"),
w(" wxeRefData *refd = getRefData(This);~n"),
w(" if(This && refd) {~n"),
- w(" if(recurse_level > 1 && refd->type != 4) {~n"),
+ w(" if(recurse_level > 1 && refd->type != 8) {~n"),
w(" delayed_delete->Append(Ecmd.Save(op));~n"),
w(" } else {~n"),
w(" delete_object(This, refd);~n"),
@@ -255,7 +255,21 @@ gen_funcs(Defs) ->
],
w("bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {~n", []),
+ w(" if(wxe_debug) {\n"
+ " wxString msg;\n"
+ " const wxChar *class_info = wxT(\"unknown\");\n"
+ " if(refd->type < 10) {\n"
+ " wxClassInfo *cinfo = ((wxObject *)ptr)->GetClassInfo();\n"
+ " class_info = cinfo->GetClassName();\n"
+ " }\n"
+ " msg.Printf(wxT(\"Deleting {wx_ref, %d, %s} at %p \"), refd->ref, class_info, ptr);\n"
+ " send_msg(\"debug\", &msg);\n"
+ " };\n"),
+
w(" switch(refd->type) {~n", []),
+ w("#if wxUSE_GRAPHICS_CONTEXT~n", []),
+ w(" case 4: delete (wxGraphicsObject *) ptr; break;~n", []),
+ w("#endif~n", []),
Case = fun(C=#class{name=Class, id=Id, abstract=IsAbs, parent=P}) when P /= "static" ->
UglyWorkaround = lists:member(Class, UglySkipList),
HaveVirtual = virtual_dest(C),
@@ -761,7 +775,7 @@ call_wx(_N,{constructor,_},#type{base={class,RClass}},Ps) ->
end;
false ->
case is_dc(RClass) of
- true -> 4;
+ true -> 8;
false ->
case hd(reverse(wx_gen_erl:parents(RClass))) of
root -> Id;
@@ -819,19 +833,19 @@ return_res1(#type{name=Type,base={class,_},single=list,ref=reference}) ->
return_res1(#type{name=Type,base={comp,_,_},single=array,by_val=true}) ->
{Type ++ " Result = ", ""};
return_res1(#type{name=Type,single=true,by_val=true, base={class, _}}) ->
- %% Temporary memory leak !!!!!!
- case {need_copy_constr(Type),Type} of
- {true, _} -> ok;
- {_, "wxGraphics" ++ _} -> ok;
- _ ->
- io:format("~s::~s Building return value of temp ~s~n",
- [get(current_class),get(current_func),Type])
- end,
- case need_copy_constr(Type) of
- true ->
+ case {need_copy_constr(Type), Type} of
+ {true, _} ->
{Type ++ " * Result = new E" ++ Type ++ "(", "); newPtr((void *) Result,"
++ "3, memenv);"};
- false ->
+ {false, "wxGraphics" ++ _} ->
+ %% {"wxGraphicsObject * Result = new wxGraphicsObject(", "); newPtr((void *) Result,"
+ %% ++ "3, memenv);"};
+ {Type ++ " * Result = new " ++ Type ++ "(", "); newPtr((void *) Result,"
+ ++ "4, memenv);"};
+ {false, _} ->
+ %% Temporary memory leak !!!!!!
+ io:format("~s::~s Building return value of temp ~s~n",
+ [get(current_class),get(current_func),Type]),
{Type ++ " * Result = new " ++ Type ++ "(", "); newPtr((void *) Result,"
++ "3, memenv);"}
end;
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index 2e14fd272d..794de25002 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.erl
@@ -379,7 +379,7 @@ gen_dest(#class{name=CName,abstract=Abs}, Ms) ->
gen_dest2(Class, Id) ->
w("%% @doc Destroys this object, do not use object again~n", []),
- w("-spec destroy(This::~s()) -> ok.~n", [Class]),
+ w("-spec destroy(This::~s()) -> 'ok'.~n", [Class]),
w("destroy(Obj=#wx_ref{type=Type}) ->~n", []),
w(" ?CLASS(Type,~s),~n",[Class]),
case Id of
@@ -482,7 +482,7 @@ arg_type_test(#param{name=Name0,in=In,type=#type{base={class,T},single=true},def
arg_type_test(#param{name=Name0,in=In,type=#type{base={class,T}}, def=none},EOS,Acc)
when In =/= false ->
Name = erl_arg_name(Name0),
- w(" [?CLASS(~sT,~s) || #wx_ref{type=~sT} <- ~s],~s", [Name,T,Name,Name,EOS]),
+ w(" _ = [?CLASS(~sT,~s) || #wx_ref{type=~sT} <- ~s],~s", [Name,T,Name,Name,EOS]),
Acc;
arg_type_test(#param{name=Name0,def=none,in=In,
type={merged,
@@ -770,7 +770,7 @@ write_spec(Args, Optional, {complex, Res}, Eol) ->
optional_type(Opts, Eol) ->
"Option :: " ++ args(fun optional_type2/1, Eol++"\t\t | ", Opts).
optional_type2(#param{name=Name, def=_Def, type=T}) ->
- "{" ++ erl_option_name(Name) ++ ", " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
+ "{'" ++ erl_option_name(Name) ++ "', " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
doc_link("utils", Func) ->
w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#~s\">"
@@ -861,7 +861,7 @@ doc_arg_type3(T, _) -> ?error({unknown_type,T}).
doc_return_types(T, Ps) ->
doc_return_types2(T, [P || P=#param{in=In} <- Ps,In =/= true]).
-doc_return_types2(void, []) -> {simple, "ok"};
+doc_return_types2(void, []) -> {simple, "'ok'"};
doc_return_types2(void, [#param{type=T}]) -> {simple, doc_arg_type2(T, out)};
doc_return_types2(T, []) -> {simple, doc_arg_type2(T, out)};
doc_return_types2(void, Ps) when length(Ps) < 4 ->
@@ -1220,7 +1220,7 @@ gen_event_recs() ->
build_event_rec(Class=#class{name=Name, event=Evs}) ->
EvTypes = [event_type_name(Ev) || Ev <- Evs],
- Str = args(fun(Ev) -> Ev end, " | ", EvTypes),
+ Str = args(fun(Ev) -> "'" ++ Ev ++ "'" end, " | ", EvTypes),
Attr = filter_attrs(Class),
Rec = event_rec_name(Name),
%%GetName = fun(#param{name=N}) ->event_attr_name(N) end,
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index 942baf7c7f..4243d8a35a 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -51,7 +51,7 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd)
void *This = getPtr(bp,memenv);
wxeRefData *refd = getRefData(This);
if(This && refd) {
- if(recurse_level > 1 && refd->type != 4) {
+ if(recurse_level > 1 && refd->type != 8) {
delayed_delete->Append(Ecmd.Save(op));
} else {
delete_object(This, refd);
@@ -5889,27 +5889,27 @@ case wxMirrorDC_new: { // wxMirrorDC::wxMirrorDC
wxDC *dc = (wxDC *) getPtr(bp,memenv); bp += 4;
bool * mirror = (bool *) bp; bp += 4;
wxMirrorDC * Result = new EwxMirrorDC(*dc,*mirror);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMirrorDC");
break;
}
case wxScreenDC_new: { // wxScreenDC::wxScreenDC
wxScreenDC * Result = new EwxScreenDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxScreenDC");
break;
}
#if wxUSE_POSTSCRIPT
case wxPostScriptDC_new_0: { // wxPostScriptDC::wxPostScriptDC
wxPostScriptDC * Result = new EwxPostScriptDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxPostScriptDC");
break;
}
case wxPostScriptDC_new_1: { // wxPostScriptDC::wxPostScriptDC
wxPrintData *printData = (wxPrintData *) getPtr(bp,memenv); bp += 4;
wxPostScriptDC * Result = new EwxPostScriptDC(*printData);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxPostScriptDC");
break;
}
@@ -5931,7 +5931,7 @@ case wxPostScriptDC_GetResolution: { // wxPostScriptDC::GetResolution
#if !wxCHECK_VERSION(2,9,0)
case wxWindowDC_new_0: { // wxWindowDC::wxWindowDC
wxWindowDC * Result = new EwxWindowDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxWindowDC");
break;
}
@@ -5939,14 +5939,14 @@ case wxWindowDC_new_0: { // wxWindowDC::wxWindowDC
case wxWindowDC_new_1: { // wxWindowDC::wxWindowDC
wxWindow *win = (wxWindow *) getPtr(bp,memenv); bp += 4;
wxWindowDC * Result = new EwxWindowDC(win);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxWindowDC");
break;
}
#if !wxCHECK_VERSION(2,9,0)
case wxClientDC_new_0: { // wxClientDC::wxClientDC
wxClientDC * Result = new EwxClientDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxClientDC");
break;
}
@@ -5954,14 +5954,14 @@ case wxClientDC_new_0: { // wxClientDC::wxClientDC
case wxClientDC_new_1: { // wxClientDC::wxClientDC
wxWindow *win = (wxWindow *) getPtr(bp,memenv); bp += 4;
wxClientDC * Result = new EwxClientDC(win);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxClientDC");
break;
}
#if !wxCHECK_VERSION(2,9,0)
case wxPaintDC_new_0: { // wxPaintDC::wxPaintDC
wxPaintDC * Result = new EwxPaintDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxPaintDC");
break;
}
@@ -5969,27 +5969,27 @@ case wxPaintDC_new_0: { // wxPaintDC::wxPaintDC
case wxPaintDC_new_1: { // wxPaintDC::wxPaintDC
wxWindow *win = (wxWindow *) getPtr(bp,memenv); bp += 4;
wxPaintDC * Result = new EwxPaintDC(win);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxPaintDC");
break;
}
case wxMemoryDC_new_1_0: { // wxMemoryDC::wxMemoryDC
wxBitmap *bitmap = (wxBitmap *) getPtr(bp,memenv); bp += 4;
wxMemoryDC * Result = new EwxMemoryDC(*bitmap);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMemoryDC");
break;
}
case wxMemoryDC_new_1_1: { // wxMemoryDC::wxMemoryDC
wxDC * dc = (wxDC *) getPtr(bp,memenv); bp += 4;
wxMemoryDC * Result = new EwxMemoryDC(dc);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMemoryDC");
break;
}
case wxMemoryDC_new_0: { // wxMemoryDC::wxMemoryDC
wxMemoryDC * Result = new EwxMemoryDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxMemoryDC");
break;
}
@@ -6009,7 +6009,7 @@ case wxMemoryDC_SelectObjectAsSource: { // wxMemoryDC::SelectObjectAsSource
}
case wxBufferedDC_new_0: { // wxBufferedDC::wxBufferedDC
wxBufferedDC * Result = new EwxBufferedDC();
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedDC");
break;
}
@@ -6027,7 +6027,7 @@ buffer = (wxBitmap *) getPtr(bp,memenv); bp += 4;
} break;
}};
wxBufferedDC * Result = new EwxBufferedDC(dc,*buffer,style);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedDC");
break;
}
@@ -6044,7 +6044,7 @@ case wxBufferedDC_new_3: { // wxBufferedDC::wxBufferedDC
} break;
}};
wxBufferedDC * Result = new EwxBufferedDC(dc,area,style);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedDC");
break;
}
@@ -6091,7 +6091,7 @@ case wxBufferedPaintDC_new_3: { // wxBufferedPaintDC::wxBufferedPaintDC
} break;
}};
wxBufferedPaintDC * Result = new EwxBufferedPaintDC(window,*buffer,style);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedPaintDC");
break;
}
@@ -6105,7 +6105,7 @@ case wxBufferedPaintDC_new_2: { // wxBufferedPaintDC::wxBufferedPaintDC
} break;
}};
wxBufferedPaintDC * Result = new EwxBufferedPaintDC(window,style);
- newPtr((void *) Result, 4, memenv);
+ newPtr((void *) Result, 8, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBufferedPaintDC");
break;
}
@@ -6147,7 +6147,7 @@ case wxGraphicsContext_CreatePen: { // wxGraphicsContext::CreatePen
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
wxPen *pen = (wxPen *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsPen * Result = new wxGraphicsPen(This->CreatePen(*pen)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsPen * Result = new wxGraphicsPen(This->CreatePen(*pen)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsPen");
break;
}
@@ -6155,7 +6155,7 @@ case wxGraphicsContext_CreateBrush: { // wxGraphicsContext::CreateBrush
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
wxBrush *brush = (wxBrush *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateBrush(*brush)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateBrush(*brush)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsBrush");
break;
}
@@ -6179,7 +6179,7 @@ case wxGraphicsContext_CreateRadialGradientBrush: { // wxGraphicsContext::Create
int * cColorA = (int *) bp; bp += 4;
wxColour cColor = wxColour(*cColorR,*cColorG,*cColorB,*cColorA);
if(!This) throw wxe_badarg(0);
- wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateRadialGradientBrush(*xo,*yo,*xc,*yc,*radius,oColor,cColor)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateRadialGradientBrush(*xo,*yo,*xc,*yc,*radius,oColor,cColor)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsBrush");
break;
}
@@ -6203,7 +6203,7 @@ case wxGraphicsContext_CreateLinearGradientBrush: { // wxGraphicsContext::Create
int * c2A = (int *) bp; bp += 4;
wxColour c2 = wxColour(*c2R,*c2G,*c2B,*c2A);
if(!This) throw wxe_badarg(0);
- wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateLinearGradientBrush(*x1,*y1,*x2,*y2,c1,c2)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateLinearGradientBrush(*x1,*y1,*x2,*y2,c1,c2)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsBrush");
break;
}
@@ -6223,7 +6223,7 @@ case wxGraphicsContext_CreateFont: { // wxGraphicsContext::CreateFont
} break;
}};
if(!This) throw wxe_badarg(0);
- wxGraphicsFont * Result = new wxGraphicsFont(This->CreateFont(*font,col)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsFont * Result = new wxGraphicsFont(This->CreateFont(*font,col)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsFont");
break;
}
@@ -6263,14 +6263,14 @@ case wxGraphicsContext_CreateMatrix: { // wxGraphicsContext::CreateMatrix
} break;
}};
if(!This) throw wxe_badarg(0);
- wxGraphicsMatrix * Result = new wxGraphicsMatrix(This->CreateMatrix(a,b,c,d,tx,ty)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsMatrix * Result = new wxGraphicsMatrix(This->CreateMatrix(a,b,c,d,tx,ty)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsMatrix");
break;
}
case wxGraphicsContext_CreatePath: { // wxGraphicsContext::CreatePath
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsPath * Result = new wxGraphicsPath(This->CreatePath()); newPtr((void *) Result,3, memenv);;
+ wxGraphicsPath * Result = new wxGraphicsPath(This->CreatePath()); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsPath");
break;
}
@@ -6514,7 +6514,7 @@ case wxGraphicsContext_Translate: { // wxGraphicsContext::Translate
case wxGraphicsContext_GetTransform: { // wxGraphicsContext::GetTransform
wxGraphicsContext *This = (wxGraphicsContext *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsMatrix * Result = new wxGraphicsMatrix(This->GetTransform()); newPtr((void *) Result,3, memenv);;
+ wxGraphicsMatrix * Result = new wxGraphicsMatrix(This->GetTransform()); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsMatrix");
break;
}
@@ -7000,7 +7000,7 @@ case wxGraphicsRenderer_CreatePen: { // wxGraphicsRenderer::CreatePen
wxGraphicsRenderer *This = (wxGraphicsRenderer *) getPtr(bp,memenv); bp += 4;
wxPen *pen = (wxPen *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsPen * Result = new wxGraphicsPen(This->CreatePen(*pen)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsPen * Result = new wxGraphicsPen(This->CreatePen(*pen)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsPen");
break;
}
@@ -7008,7 +7008,7 @@ case wxGraphicsRenderer_CreateBrush: { // wxGraphicsRenderer::CreateBrush
wxGraphicsRenderer *This = (wxGraphicsRenderer *) getPtr(bp,memenv); bp += 4;
wxBrush *brush = (wxBrush *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateBrush(*brush)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateBrush(*brush)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsBrush");
break;
}
@@ -7031,7 +7031,7 @@ case wxGraphicsRenderer_CreateLinearGradientBrush: { // wxGraphicsRenderer::Crea
int * c2A = (int *) bp; bp += 4;
wxColour c2 = wxColour(*c2R,*c2G,*c2B,*c2A);
if(!This) throw wxe_badarg(0);
- wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateLinearGradientBrush(*x1,*y1,*x2,*y2,c1,c2)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateLinearGradientBrush(*x1,*y1,*x2,*y2,c1,c2)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsBrush");
break;
}
@@ -7056,7 +7056,7 @@ case wxGraphicsRenderer_CreateRadialGradientBrush: { // wxGraphicsRenderer::Crea
int * cColorA = (int *) bp; bp += 4;
wxColour cColor = wxColour(*cColorR,*cColorG,*cColorB,*cColorA);
if(!This) throw wxe_badarg(0);
- wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateRadialGradientBrush(*xo,*yo,*xc,*yc,*radius,oColor,cColor)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsBrush * Result = new wxGraphicsBrush(This->CreateRadialGradientBrush(*xo,*yo,*xc,*yc,*radius,oColor,cColor)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsBrush");
break;
}
@@ -7076,7 +7076,7 @@ case wxGraphicsRenderer_CreateFont: { // wxGraphicsRenderer::CreateFont
} break;
}};
if(!This) throw wxe_badarg(0);
- wxGraphicsFont * Result = new wxGraphicsFont(This->CreateFont(*font,col)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsFont * Result = new wxGraphicsFont(This->CreateFont(*font,col)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsFont");
break;
}
@@ -7116,14 +7116,14 @@ case wxGraphicsRenderer_CreateMatrix: { // wxGraphicsRenderer::CreateMatrix
} break;
}};
if(!This) throw wxe_badarg(0);
- wxGraphicsMatrix * Result = new wxGraphicsMatrix(This->CreateMatrix(a,b,c,d,tx,ty)); newPtr((void *) Result,3, memenv);;
+ wxGraphicsMatrix * Result = new wxGraphicsMatrix(This->CreateMatrix(a,b,c,d,tx,ty)); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsMatrix");
break;
}
case wxGraphicsRenderer_CreatePath: { // wxGraphicsRenderer::CreatePath
wxGraphicsRenderer *This = (wxGraphicsRenderer *) getPtr(bp,memenv); bp += 4;
if(!This) throw wxe_badarg(0);
- wxGraphicsPath * Result = new wxGraphicsPath(This->CreatePath()); newPtr((void *) Result,3, memenv);;
+ wxGraphicsPath * Result = new wxGraphicsPath(This->CreatePath()); newPtr((void *) Result,4, memenv);;
rt.addRef(getRef((void *)Result,memenv), "wxGraphicsPath");
break;
}
@@ -32071,7 +32071,20 @@ case wxDCOverlay_Clear: { // wxDCOverlay::Clear
bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {
+ if(wxe_debug) {
+ wxString msg;
+ const wxChar *class_info = wxT("unknown");
+ if(refd->type < 10) {
+ wxClassInfo *cinfo = ((wxObject *)ptr)->GetClassInfo();
+ class_info = cinfo->GetClassName();
+ }
+ msg.Printf(wxT("Deleting {wx_ref, %d, %s} at %p "), refd->ref, class_info, ptr);
+ send_msg("debug", &msg);
+ };
switch(refd->type) {
+#if wxUSE_GRAPHICS_CONTEXT
+ case 4: delete (wxGraphicsObject *) ptr; break;
+#endif
case 24: delete (wxGridCellBoolRenderer *) ptr; break;
case 25: delete (wxGridCellBoolEditor *) ptr; break;
case 26: delete (wxGridCellFloatRenderer *) ptr; break;
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index 175bcfce54..0d2da5d4a7 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -490,7 +490,7 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd)
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
if(refd->alloc_in_erl) {
- if((refd->type == 4) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
+ if((refd->type == 8) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
((wxBufferedDC *)ptr)->m_dc = NULL; // Workaround
}
wxString msg;
@@ -500,7 +500,7 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd)
msg.Printf(wxT("Memory leak: {wx_ref, %d, %s}"),
refd->ref, cinfo->GetClassName());
send_msg("error", &msg);
- } else {
+ } else if(refd->type != 4) {
cleanup_ref = delete_object(ptr, refd);
}
if(cleanup_ref) {
@@ -562,7 +562,12 @@ int WxeApp::newPtr(void * ptr, int type, wxeMemEnv *memenv) {
if(wxe_debug) {
wxString msg;
- msg.Printf(wxT("Creating {wx_ref, %d, unknown} at %p "), ref, ptr);
+ const wxChar *class_info = wxT("unknown");
+ if(type < 10) {
+ wxClassInfo *cinfo = ((wxObject *)ptr)->GetClassInfo();
+ class_info = cinfo->GetClassName();
+ }
+ msg.Printf(wxT("Creating {wx_ref, %d, %s} at %p "), ref, class_info, ptr);
send_msg("debug", &msg);
}
@@ -614,12 +619,6 @@ void WxeApp::clearPtr(void * ptr) {
refd->memenv->ref2ptr[ref] = NULL;
free.Append(ref);
- if(wxe_debug) {
- wxString msg;
- msg.Printf(wxT("Deleting {wx_ref, %d, unknown} at %p "), ref, ptr);
- send_msg("debug", &msg);
- }
-
if(((int) refd->pid) != -1) {
// Send terminate pid to owner
wxeReturn rt = wxeReturn(WXE_DRV_PORT,refd->pid, false);
diff --git a/lib/wx/c_src/wxe_memory.h b/lib/wx/c_src/wxe_memory.h
index 455e9696d3..66c83e40c3 100644
--- a/lib/wx/c_src/wxe_memory.h
+++ b/lib/wx/c_src/wxe_memory.h
@@ -48,8 +48,9 @@ class wxeRefData {
int type;
// 0 = wxWindow subclasses, 1 = wxObject subclasses
// 2 = wxDialog subclasses, 3 = allocated wxObjects but not returned from new
- // 4 = wxObjects that should always be deleted directly (wxDC derivates)
- // > 4 classes which lack virtual destr, or are supposed to be allocated on
+ // 4 = wxGraphicsObjects or it's subclasses that can no be overloaded
+ // 8 = wxObjects that should always be deleted directly (wxDC derivates)
+ // > 10 classes which lack virtual destr, or are supposed to be allocated on
// the stack
bool alloc_in_erl;
wxeMemEnv *memenv;
diff --git a/lib/wx/examples/demo/ex_graphicsContext.erl b/lib/wx/examples/demo/ex_graphicsContext.erl
index d883ddfc5c..1193578037 100644
--- a/lib/wx/examples/demo/ex_graphicsContext.erl
+++ b/lib/wx/examples/demo/ex_graphicsContext.erl
@@ -135,6 +135,8 @@ draw(Win, Pen, Brush, Font) ->
wxGraphicsContext:drawPath(Canvas, Path)
end,
wx:foreach(F, lists:seq(1,10)),
+ wxGraphicsObject:destroy(Path),
+ wxGraphicsObject:destroy(Canvas),
ok
catch _:{not_supported, _} ->
Err = "wxGraphicsContext not available in this build of wxwidgets",
diff --git a/lib/wx/include/wx.hrl b/lib/wx/include/wx.hrl
index 44df57898a..af7cca7ed2 100644
--- a/lib/wx/include/wx.hrl
+++ b/lib/wx/include/wx.hrl
@@ -33,236 +33,192 @@
%% Here comes the definitions of all event records.
%% they contain the event type and possible some extra information.
--record(wxNavigationKey,{type :: wxNavigationKeyEventType(), %% Callback event: {@link wxNavigationKeyEvent}
- flags :: integer(),
- focus :: wxWindow:wxWindow()}).
--type wxNavigationKeyEventType() :: navigation_key.
--type wxNavigationKey() :: #wxNavigationKey{}. %% Callback event: {@link wxNavigationKeyEvent}
+-record(wxInitDialog, {type :: wxInitDialogEventType()}). %% Callback event: {@link wxInitDialogEvent}
+-type wxInitDialogEventType() :: 'init_dialog'.
+-type wxInitDialog() :: #wxInitDialog{}. %% Callback event: {@link wxInitDialogEvent}
--record(wxSash,{type :: wxSashEventType(), %% Callback event: {@link wxSashEvent}
- edge :: wx:wx_enum(),
- dragRect :: {X::integer(), Y::integer(), W::integer(), H::integer()},
- dragStatus :: wx:wx_enum()}).
--type wxSashEventType() :: sash_dragged.
--type wxSash() :: #wxSash{}. %% Callback event: {@link wxSashEvent}
+-record(wxClose, {type :: wxCloseEventType()}). %% Callback event: {@link wxCloseEvent}
+-type wxCloseEventType() :: 'close_window' | 'end_session' | 'query_end_session'.
+-type wxClose() :: #wxClose{}. %% Callback event: {@link wxCloseEvent}
--record(wxList,{type :: wxListEventType(), %% Callback event: {@link wxListEvent}
- code :: integer(),
- oldItemIndex :: integer(),
- itemIndex :: integer(),
- col :: integer(),
- pointDrag :: {X::integer(), Y::integer()}}).
--type wxListEventType() :: command_list_begin_drag | command_list_begin_rdrag | command_list_begin_label_edit | command_list_end_label_edit | command_list_delete_item | command_list_delete_all_items | command_list_key_down | command_list_insert_item | command_list_col_click | command_list_col_right_click | command_list_col_begin_drag | command_list_col_dragging | command_list_col_end_drag | command_list_item_selected | command_list_item_deselected | command_list_item_right_click | command_list_item_middle_click | command_list_item_activated | command_list_item_focused | command_list_cache_hint.
--type wxList() :: #wxList{}. %% Callback event: {@link wxListEvent}
+-record(wxStyledText,{type :: wxStyledTextEventType(), %% Callback event: {@link wxStyledTextEvent}
+ position :: integer(),
+ key :: integer(),
+ modifiers :: integer(),
+ modificationType :: integer(),
+ text :: unicode:chardata(),
+ length :: integer(),
+ linesAdded :: integer(),
+ line :: integer(),
+ foldLevelNow :: integer(),
+ foldLevelPrev :: integer(),
+ margin :: integer(),
+ message :: integer(),
+ wParam :: integer(),
+ lParam :: integer(),
+ listType :: integer(),
+ x :: integer(),
+ y :: integer(),
+ dragText :: unicode:chardata(),
+ dragAllowMove :: boolean(),
+ dragResult :: wx:wx_enum()}).
+-type wxStyledTextEventType() :: 'stc_change' | 'stc_styleneeded' | 'stc_charadded' | 'stc_savepointreached' | 'stc_savepointleft' | 'stc_romodifyattempt' | 'stc_key' | 'stc_doubleclick' | 'stc_updateui' | 'stc_modified' | 'stc_macrorecord' | 'stc_marginclick' | 'stc_needshown' | 'stc_painted' | 'stc_userlistselection' | 'stc_uridropped' | 'stc_dwellstart' | 'stc_dwellend' | 'stc_start_drag' | 'stc_drag_over' | 'stc_do_drop' | 'stc_zoom' | 'stc_hotspot_click' | 'stc_hotspot_dclick' | 'stc_calltip_click' | 'stc_autocomp_selection'.
+-type wxStyledText() :: #wxStyledText{}. %% Callback event: {@link wxStyledTextEvent}
+
+-record(wxFileDirPicker,{type :: wxFileDirPickerEventType(), %% Callback event: {@link wxFileDirPickerEvent}
+ path :: unicode:chardata()}).
+-type wxFileDirPickerEventType() :: 'command_filepicker_changed' | 'command_dirpicker_changed'.
+-type wxFileDirPicker() :: #wxFileDirPicker{}. %% Callback event: {@link wxFileDirPickerEvent}
-record(wxNotebook,{type :: wxNotebookEventType(), %% Callback event: {@link wxNotebookEvent}
nSel :: integer(),
nOldSel :: integer()}).
--type wxNotebookEventType() :: command_notebook_page_changed | command_notebook_page_changing.
+-type wxNotebookEventType() :: 'command_notebook_page_changed' | 'command_notebook_page_changing'.
-type wxNotebook() :: #wxNotebook{}. %% Callback event: {@link wxNotebookEvent}
--record(wxDisplayChanged, {type :: wxDisplayChangedEventType()}). %% Callback event: {@link wxDisplayChangedEvent}
--type wxDisplayChangedEventType() :: display_changed.
--type wxDisplayChanged() :: #wxDisplayChanged{}. %% Callback event: {@link wxDisplayChangedEvent}
-
--record(wxErase,{type :: wxEraseEventType(), %% Callback event: {@link wxEraseEvent}
- dc :: wxDC:wxDC()}).
--type wxEraseEventType() :: erase_background.
--type wxErase() :: #wxErase{}. %% Callback event: {@link wxEraseEvent}
-
--record(wxKey,{type :: wxKeyEventType(), %% Callback event: {@link wxKeyEvent}
- x :: integer(),
- y :: integer(),
- keyCode :: integer(),
- controlDown :: boolean(),
- shiftDown :: boolean(),
- altDown :: boolean(),
- metaDown :: boolean(),
- scanCode :: boolean(),
- uniChar :: integer(),
- rawCode :: integer(),
- rawFlags :: integer()}).
--type wxKeyEventType() :: char | char_hook | key_down | key_up.
--type wxKey() :: #wxKey{}. %% Callback event: {@link wxKeyEvent}
-
--record(wxWindowDestroy, {type :: wxWindowDestroyEventType()}). %% Callback event: {@link wxWindowDestroyEvent}
--type wxWindowDestroyEventType() :: destroy.
--type wxWindowDestroy() :: #wxWindowDestroy{}. %% Callback event: {@link wxWindowDestroyEvent}
+-record(wxIdle, {type :: wxIdleEventType()}). %% Callback event: {@link wxIdleEvent}
+-type wxIdleEventType() :: 'idle'.
+-type wxIdle() :: #wxIdle{}. %% Callback event: {@link wxIdleEvent}
--record(wxCalendar,{type :: wxCalendarEventType(), %% Callback event: {@link wxCalendarEvent}
- wday :: wx:wx_enum(),
- date :: wx:wx_datetime()}).
--type wxCalendarEventType() :: calendar_sel_changed | calendar_day_changed | calendar_month_changed | calendar_year_changed | calendar_doubleclicked | calendar_weekday_clicked.
--type wxCalendar() :: #wxCalendar{}. %% Callback event: {@link wxCalendarEvent}
+-record(wxColourPicker,{type :: wxColourPickerEventType(), %% Callback event: {@link wxColourPickerEvent}
+ colour :: wx:wx_colour()}).
+-type wxColourPickerEventType() :: 'command_colourpicker_changed'.
+-type wxColourPicker() :: #wxColourPicker{}. %% Callback event: {@link wxColourPickerEvent}
-record(wxSplitter, {type :: wxSplitterEventType()}). %% Callback event: {@link wxSplitterEvent}
--type wxSplitterEventType() :: command_splitter_sash_pos_changed | command_splitter_sash_pos_changing | command_splitter_doubleclicked | command_splitter_unsplit.
+-type wxSplitterEventType() :: 'command_splitter_sash_pos_changed' | 'command_splitter_sash_pos_changing' | 'command_splitter_doubleclicked' | 'command_splitter_unsplit'.
-type wxSplitter() :: #wxSplitter{}. %% Callback event: {@link wxSplitterEvent}
--record(wxScroll,{type :: wxScrollEventType(), %% Callback event: {@link wxScrollEvent}
- commandInt :: integer(),
- extraLong :: integer()}).
--type wxScrollEventType() :: scroll_top | scroll_bottom | scroll_lineup | scroll_linedown | scroll_pageup | scroll_pagedown | scroll_thumbtrack | scroll_thumbrelease | scroll_changed.
--type wxScroll() :: #wxScroll{}. %% Callback event: {@link wxScrollEvent}
-
--record(wxMenu,{type :: wxMenuEventType(), %% Callback event: {@link wxMenuEvent}
- menuId :: integer(),
- menu :: wxMenu:wxMenu()}).
--type wxMenuEventType() :: menu_open | menu_close | menu_highlight.
--type wxMenu() :: #wxMenu{}. %% Callback event: {@link wxMenuEvent}
-
--record(wxContextMenu,{type :: wxContextMenuEventType(), %% Callback event: {@link wxContextMenuEvent}
- pos :: {X::integer(), Y::integer()}}).
--type wxContextMenuEventType() :: context_menu.
--type wxContextMenu() :: #wxContextMenu{}. %% Callback event: {@link wxContextMenuEvent}
-
--record(wxShow,{type :: wxShowEventType(), %% Callback event: {@link wxShowEvent}
- show :: boolean()}).
--type wxShowEventType() :: show.
--type wxShow() :: #wxShow{}. %% Callback event: {@link wxShowEvent}
+-record(wxSash,{type :: wxSashEventType(), %% Callback event: {@link wxSashEvent}
+ edge :: wx:wx_enum(),
+ dragRect :: {X::integer(), Y::integer(), W::integer(), H::integer()},
+ dragStatus :: wx:wx_enum()}).
+-type wxSashEventType() :: 'sash_dragged'.
+-type wxSash() :: #wxSash{}. %% Callback event: {@link wxSashEvent}
--record(wxSpin,{type :: wxSpinEventType(), %% Callback event: {@link wxSpinEvent}
- commandInt :: integer()}).
--type wxSpinEventType() :: command_spinctrl_updated | spin_up | spin_down | spin.
--type wxSpin() :: #wxSpin{}. %% Callback event: {@link wxSpinEvent}
+-record(wxHelp, {type :: wxHelpEventType()}). %% Callback event: {@link wxHelpEvent}
+-type wxHelpEventType() :: 'help' | 'detailed_help'.
+-type wxHelp() :: #wxHelp{}. %% Callback event: {@link wxHelpEvent}
--record(wxSetCursor,{type :: wxSetCursorEventType(), %% Callback event: {@link wxSetCursorEvent}
- x :: integer(),
- y :: integer(),
- cursor :: wxCursor:wxCursor()}).
--type wxSetCursorEventType() :: set_cursor.
--type wxSetCursor() :: #wxSetCursor{}. %% Callback event: {@link wxSetCursorEvent}
+-record(wxDisplayChanged, {type :: wxDisplayChangedEventType()}). %% Callback event: {@link wxDisplayChangedEvent}
+-type wxDisplayChangedEventType() :: 'display_changed'.
+-type wxDisplayChanged() :: #wxDisplayChanged{}. %% Callback event: {@link wxDisplayChangedEvent}
-record(wxMouseCaptureLost, {type :: wxMouseCaptureLostEventType()}). %% Callback event: {@link wxMouseCaptureLostEvent}
--type wxMouseCaptureLostEventType() :: mouse_capture_lost.
+-type wxMouseCaptureLostEventType() :: 'mouse_capture_lost'.
-type wxMouseCaptureLost() :: #wxMouseCaptureLost{}. %% Callback event: {@link wxMouseCaptureLostEvent}
-record(wxFontPicker,{type :: wxFontPickerEventType(), %% Callback event: {@link wxFontPickerEvent}
font :: wxFont:wxFont()}).
--type wxFontPickerEventType() :: command_fontpicker_changed.
+-type wxFontPickerEventType() :: 'command_fontpicker_changed'.
-type wxFontPicker() :: #wxFontPicker{}. %% Callback event: {@link wxFontPickerEvent}
--record(wxScrollWin,{type :: wxScrollWinEventType(), %% Callback event: {@link wxScrollWinEvent}
+-record(wxFocus,{type :: wxFocusEventType(), %% Callback event: {@link wxFocusEvent}
+ win :: wxWindow:wxWindow()}).
+-type wxFocusEventType() :: 'set_focus' | 'kill_focus'.
+-type wxFocus() :: #wxFocus{}. %% Callback event: {@link wxFocusEvent}
+
+-record(wxPaletteChanged, {type :: wxPaletteChangedEventType()}). %% Callback event: {@link wxPaletteChangedEvent}
+-type wxPaletteChangedEventType() :: 'palette_changed'.
+-type wxPaletteChanged() :: #wxPaletteChanged{}. %% Callback event: {@link wxPaletteChangedEvent}
+
+-record(wxScroll,{type :: wxScrollEventType(), %% Callback event: {@link wxScrollEvent}
commandInt :: integer(),
extraLong :: integer()}).
--type wxScrollWinEventType() :: scrollwin_top | scrollwin_bottom | scrollwin_lineup | scrollwin_linedown | scrollwin_pageup | scrollwin_pagedown | scrollwin_thumbtrack | scrollwin_thumbrelease.
--type wxScrollWin() :: #wxScrollWin{}. %% Callback event: {@link wxScrollWinEvent}
-
--record(wxPaint, {type :: wxPaintEventType()}). %% Callback event: {@link wxPaintEvent}
--type wxPaintEventType() :: paint.
--type wxPaint() :: #wxPaint{}. %% Callback event: {@link wxPaintEvent}
+-type wxScrollEventType() :: 'scroll_top' | 'scroll_bottom' | 'scroll_lineup' | 'scroll_linedown' | 'scroll_pageup' | 'scroll_pagedown' | 'scroll_thumbtrack' | 'scroll_thumbrelease' | 'scroll_changed'.
+-type wxScroll() :: #wxScroll{}. %% Callback event: {@link wxScrollEvent}
-record(wxChildFocus, {type :: wxChildFocusEventType()}). %% Callback event: {@link wxChildFocusEvent}
--type wxChildFocusEventType() :: child_focus.
+-type wxChildFocusEventType() :: 'child_focus'.
-type wxChildFocus() :: #wxChildFocus{}. %% Callback event: {@link wxChildFocusEvent}
+-record(wxAuiNotebook,{type :: wxAuiNotebookEventType(), %% Callback event: {@link wxAuiNotebookEvent}
+ old_selection :: integer(),
+ selection :: integer(),
+ drag_source :: wxAuiNotebook:wxAuiNotebook()}).
+-type wxAuiNotebookEventType() :: 'command_auinotebook_page_close' | 'command_auinotebook_page_changed' | 'command_auinotebook_page_changing' | 'command_auinotebook_button' | 'command_auinotebook_begin_drag' | 'command_auinotebook_end_drag' | 'command_auinotebook_drag_motion' | 'command_auinotebook_allow_dnd' | 'command_auinotebook_tab_middle_down' | 'command_auinotebook_tab_middle_up' | 'command_auinotebook_tab_right_down' | 'command_auinotebook_tab_right_up' | 'command_auinotebook_page_closed' | 'command_auinotebook_drag_done' | 'command_auinotebook_bg_dclick'.
+-type wxAuiNotebook() :: #wxAuiNotebook{}. %% Callback event: {@link wxAuiNotebookEvent}
+
+-record(wxSize,{type :: wxSizeEventType(), %% Callback event: {@link wxSizeEvent}
+ size :: {W::integer(), H::integer()},
+ rect :: {X::integer(), Y::integer(), W::integer(), H::integer()}}).
+-type wxSizeEventType() :: 'size'.
+-type wxSize() :: #wxSize{}. %% Callback event: {@link wxSizeEvent}
+
+-record(wxCommand,{type :: wxCommandEventType(), %% Callback event: {@link wxCommandEvent}
+ cmdString :: unicode:chardata(),
+ commandInt :: integer(),
+ extraLong :: integer()}).
+-type wxCommandEventType() :: 'command_button_clicked' | 'command_checkbox_clicked' | 'command_choice_selected' | 'command_listbox_selected' | 'command_listbox_doubleclicked' | 'command_text_updated' | 'command_text_enter' | 'command_menu_selected' | 'command_slider_updated' | 'command_radiobox_selected' | 'command_radiobutton_selected' | 'command_scrollbar_updated' | 'command_vlbox_selected' | 'command_combobox_selected' | 'command_tool_rclicked' | 'command_tool_enter' | 'command_checklistbox_toggled' | 'command_togglebutton_clicked' | 'command_left_click' | 'command_left_dclick' | 'command_right_click' | 'command_set_focus' | 'command_kill_focus' | 'command_enter'.
+-type wxCommand() :: #wxCommand{}. %% Callback event: {@link wxCommandEvent}
+
-record(wxMaximize, {type :: wxMaximizeEventType()}). %% Callback event: {@link wxMaximizeEvent}
--type wxMaximizeEventType() :: maximize.
+-type wxMaximizeEventType() :: 'maximize'.
-type wxMaximize() :: #wxMaximize{}. %% Callback event: {@link wxMaximizeEvent}
--record(wxFileDirPicker,{type :: wxFileDirPickerEventType(), %% Callback event: {@link wxFileDirPickerEvent}
- path :: unicode:chardata()}).
--type wxFileDirPickerEventType() :: command_filepicker_changed | command_dirpicker_changed.
--type wxFileDirPicker() :: #wxFileDirPicker{}. %% Callback event: {@link wxFileDirPickerEvent}
+-record(wxSpin,{type :: wxSpinEventType(), %% Callback event: {@link wxSpinEvent}
+ commandInt :: integer()}).
+-type wxSpinEventType() :: 'command_spinctrl_updated' | 'spin_up' | 'spin_down' | 'spin'.
+-type wxSpin() :: #wxSpin{}. %% Callback event: {@link wxSpinEvent}
--record(wxFocus,{type :: wxFocusEventType(), %% Callback event: {@link wxFocusEvent}
- win :: wxWindow:wxWindow()}).
--type wxFocusEventType() :: set_focus | kill_focus.
--type wxFocus() :: #wxFocus{}. %% Callback event: {@link wxFocusEvent}
+-record(wxMenu,{type :: wxMenuEventType(), %% Callback event: {@link wxMenuEvent}
+ menuId :: integer(),
+ menu :: wxMenu:wxMenu()}).
+-type wxMenuEventType() :: 'menu_open' | 'menu_close' | 'menu_highlight'.
+-type wxMenu() :: #wxMenu{}. %% Callback event: {@link wxMenuEvent}
--record(wxDate,{type :: wxDateEventType(), %% Callback event: {@link wxDateEvent}
- date :: wx:wx_datetime()}).
--type wxDateEventType() :: date_changed.
--type wxDate() :: #wxDate{}. %% Callback event: {@link wxDateEvent}
+-record(wxShow,{type :: wxShowEventType(), %% Callback event: {@link wxShowEvent}
+ show :: boolean()}).
+-type wxShowEventType() :: 'show'.
+-type wxShow() :: #wxShow{}. %% Callback event: {@link wxShowEvent}
--record(wxHtmlLink,{type :: wxHtmlLinkEventType(), %% Callback event: {@link wxHtmlLinkEvent}
- linkInfo :: wx:wx_wxHtmlLinkInfo()}).
--type wxHtmlLinkEventType() :: command_html_link_clicked.
--type wxHtmlLink() :: #wxHtmlLink{}. %% Callback event: {@link wxHtmlLinkEvent}
+-record(wxWindowDestroy, {type :: wxWindowDestroyEventType()}). %% Callback event: {@link wxWindowDestroyEvent}
+-type wxWindowDestroyEventType() :: 'destroy'.
+-type wxWindowDestroy() :: #wxWindowDestroy{}. %% Callback event: {@link wxWindowDestroyEvent}
--record(wxHelp, {type :: wxHelpEventType()}). %% Callback event: {@link wxHelpEvent}
--type wxHelpEventType() :: help | detailed_help.
--type wxHelp() :: #wxHelp{}. %% Callback event: {@link wxHelpEvent}
+-record(wxContextMenu,{type :: wxContextMenuEventType(), %% Callback event: {@link wxContextMenuEvent}
+ pos :: {X::integer(), Y::integer()}}).
+-type wxContextMenuEventType() :: 'context_menu'.
+-type wxContextMenu() :: #wxContextMenu{}. %% Callback event: {@link wxContextMenuEvent}
-record(wxActivate,{type :: wxActivateEventType(), %% Callback event: {@link wxActivateEvent}
active :: boolean()}).
--type wxActivateEventType() :: activate | activate_app | hibernate.
+-type wxActivateEventType() :: 'activate' | 'activate_app' | 'hibernate'.
-type wxActivate() :: #wxActivate{}. %% Callback event: {@link wxActivateEvent}
--record(wxStyledText,{type :: wxStyledTextEventType(), %% Callback event: {@link wxStyledTextEvent}
- position :: integer(),
- key :: integer(),
- modifiers :: integer(),
- modificationType :: integer(),
- text :: unicode:chardata(),
- length :: integer(),
- linesAdded :: integer(),
- line :: integer(),
- foldLevelNow :: integer(),
- foldLevelPrev :: integer(),
- margin :: integer(),
- message :: integer(),
- wParam :: integer(),
- lParam :: integer(),
- listType :: integer(),
- x :: integer(),
- y :: integer(),
- dragText :: unicode:chardata(),
- dragAllowMove :: boolean(),
- dragResult :: wx:wx_enum()}).
--type wxStyledTextEventType() :: stc_change | stc_styleneeded | stc_charadded | stc_savepointreached | stc_savepointleft | stc_romodifyattempt | stc_key | stc_doubleclick | stc_updateui | stc_modified | stc_macrorecord | stc_marginclick | stc_needshown | stc_painted | stc_userlistselection | stc_uridropped | stc_dwellstart | stc_dwellend | stc_start_drag | stc_drag_over | stc_do_drop | stc_zoom | stc_hotspot_click | stc_hotspot_dclick | stc_calltip_click | stc_autocomp_selection.
--type wxStyledText() :: #wxStyledText{}. %% Callback event: {@link wxStyledTextEvent}
-
--record(wxSysColourChanged, {type :: wxSysColourChangedEventType()}). %% Callback event: {@link wxSysColourChangedEvent}
--type wxSysColourChangedEventType() :: sys_colour_changed.
--type wxSysColourChanged() :: #wxSysColourChanged{}. %% Callback event: {@link wxSysColourChangedEvent}
+-record(wxMove,{type :: wxMoveEventType(), %% Callback event: {@link wxMoveEvent}
+ pos :: {X::integer(), Y::integer()},
+ rect :: {X::integer(), Y::integer(), W::integer(), H::integer()}}).
+-type wxMoveEventType() :: 'move'.
+-type wxMove() :: #wxMove{}. %% Callback event: {@link wxMoveEvent}
--record(wxGrid,{type :: wxGridEventType(), %% Callback event: {@link wxGridEvent}
- row :: integer(),
+-record(wxList,{type :: wxListEventType(), %% Callback event: {@link wxListEvent}
+ code :: integer(),
+ oldItemIndex :: integer(),
+ itemIndex :: integer(),
col :: integer(),
- x :: integer(),
- y :: integer(),
- selecting :: boolean(),
- control :: boolean(),
- meta :: boolean(),
- shift :: boolean(),
- alt :: boolean()}).
--type wxGridEventType() :: grid_cell_left_click | grid_cell_right_click | grid_cell_left_dclick | grid_cell_right_dclick | grid_label_left_click | grid_label_right_click | grid_label_left_dclick | grid_label_right_dclick | grid_row_size | grid_col_size | grid_range_select | grid_cell_change | grid_select_cell | grid_editor_shown | grid_editor_hidden | grid_editor_created | grid_cell_begin_drag.
--type wxGrid() :: #wxGrid{}. %% Callback event: {@link wxGridEvent}
-
--record(wxPaletteChanged, {type :: wxPaletteChangedEventType()}). %% Callback event: {@link wxPaletteChangedEvent}
--type wxPaletteChangedEventType() :: palette_changed.
--type wxPaletteChanged() :: #wxPaletteChanged{}. %% Callback event: {@link wxPaletteChangedEvent}
+ pointDrag :: {X::integer(), Y::integer()}}).
+-type wxListEventType() :: 'command_list_begin_drag' | 'command_list_begin_rdrag' | 'command_list_begin_label_edit' | 'command_list_end_label_edit' | 'command_list_delete_item' | 'command_list_delete_all_items' | 'command_list_key_down' | 'command_list_insert_item' | 'command_list_col_click' | 'command_list_col_right_click' | 'command_list_col_begin_drag' | 'command_list_col_dragging' | 'command_list_col_end_drag' | 'command_list_item_selected' | 'command_list_item_deselected' | 'command_list_item_right_click' | 'command_list_item_middle_click' | 'command_list_item_activated' | 'command_list_item_focused' | 'command_list_cache_hint'.
+-type wxList() :: #wxList{}. %% Callback event: {@link wxListEvent}
--record(wxUpdateUI, {type :: wxUpdateUIEventType()}). %% Callback event: {@link wxUpdateUIEvent}
--type wxUpdateUIEventType() :: update_ui.
--type wxUpdateUI() :: #wxUpdateUI{}. %% Callback event: {@link wxUpdateUIEvent}
+-record(wxClipboardText, {type :: wxClipboardTextEventType()}). %% Callback event: {@link wxClipboardTextEvent}
+-type wxClipboardTextEventType() :: 'command_text_copy' | 'command_text_cut' | 'command_text_paste'.
+-type wxClipboardText() :: #wxClipboardText{}. %% Callback event: {@link wxClipboardTextEvent}
--record(wxSize,{type :: wxSizeEventType(), %% Callback event: {@link wxSizeEvent}
- size :: {W::integer(), H::integer()},
- rect :: {X::integer(), Y::integer(), W::integer(), H::integer()}}).
--type wxSizeEventType() :: size.
--type wxSize() :: #wxSize{}. %% Callback event: {@link wxSizeEvent}
+-record(wxScrollWin,{type :: wxScrollWinEventType(), %% Callback event: {@link wxScrollWinEvent}
+ commandInt :: integer(),
+ extraLong :: integer()}).
+-type wxScrollWinEventType() :: 'scrollwin_top' | 'scrollwin_bottom' | 'scrollwin_lineup' | 'scrollwin_linedown' | 'scrollwin_pageup' | 'scrollwin_pagedown' | 'scrollwin_thumbtrack' | 'scrollwin_thumbrelease'.
+-type wxScrollWin() :: #wxScrollWin{}. %% Callback event: {@link wxScrollWinEvent}
-record(wxIconize,{type :: wxIconizeEventType(), %% Callback event: {@link wxIconizeEvent}
iconized :: boolean()}).
--type wxIconizeEventType() :: iconize.
+-type wxIconizeEventType() :: 'iconize'.
-type wxIconize() :: #wxIconize{}. %% Callback event: {@link wxIconizeEvent}
--record(wxAuiNotebook,{type :: wxAuiNotebookEventType(), %% Callback event: {@link wxAuiNotebookEvent}
- old_selection :: integer(),
- selection :: integer(),
- drag_source :: wxAuiNotebook:wxAuiNotebook()}).
--type wxAuiNotebookEventType() :: command_auinotebook_page_close | command_auinotebook_page_changed | command_auinotebook_page_changing | command_auinotebook_button | command_auinotebook_begin_drag | command_auinotebook_end_drag | command_auinotebook_drag_motion | command_auinotebook_allow_dnd | command_auinotebook_tab_middle_down | command_auinotebook_tab_middle_up | command_auinotebook_tab_right_down | command_auinotebook_tab_right_up | command_auinotebook_page_closed | command_auinotebook_drag_done | command_auinotebook_bg_dclick.
--type wxAuiNotebook() :: #wxAuiNotebook{}. %% Callback event: {@link wxAuiNotebookEvent}
-
--record(wxClose, {type :: wxCloseEventType()}). %% Callback event: {@link wxCloseEvent}
--type wxCloseEventType() :: close_window | end_session | query_end_session.
--type wxClose() :: #wxClose{}. %% Callback event: {@link wxCloseEvent}
-
--record(wxMouseCaptureChanged, {type :: wxMouseCaptureChangedEventType()}). %% Callback event: {@link wxMouseCaptureChangedEvent}
--type wxMouseCaptureChangedEventType() :: mouse_capture_changed.
--type wxMouseCaptureChanged() :: #wxMouseCaptureChanged{}. %% Callback event: {@link wxMouseCaptureChangedEvent}
+-record(wxUpdateUI, {type :: wxUpdateUIEventType()}). %% Callback event: {@link wxUpdateUIEvent}
+-type wxUpdateUIEventType() :: 'update_ui'.
+-type wxUpdateUI() :: #wxUpdateUI{}. %% Callback event: {@link wxUpdateUIEvent}
-record(wxMouse,{type :: wxMouseEventType(), %% Callback event: {@link wxMouseEvent}
x :: integer(),
@@ -277,17 +233,86 @@
wheelRotation :: integer(),
wheelDelta :: integer(),
linesPerAction :: integer()}).
--type wxMouseEventType() :: left_down | left_up | middle_down | middle_up | right_down | right_up | motion | enter_window | leave_window | left_dclick | middle_dclick | right_dclick | mousewheel.
+-type wxMouseEventType() :: 'left_down' | 'left_up' | 'middle_down' | 'middle_up' | 'right_down' | 'right_up' | 'motion' | 'enter_window' | 'leave_window' | 'left_dclick' | 'middle_dclick' | 'right_dclick' | 'mousewheel'.
-type wxMouse() :: #wxMouse{}. %% Callback event: {@link wxMouseEvent}
--record(wxClipboardText, {type :: wxClipboardTextEventType()}). %% Callback event: {@link wxClipboardTextEvent}
--type wxClipboardTextEventType() :: command_text_copy | command_text_cut | command_text_paste.
--type wxClipboardText() :: #wxClipboardText{}. %% Callback event: {@link wxClipboardTextEvent}
+-record(wxTree,{type :: wxTreeEventType(), %% Callback event: {@link wxTreeEvent}
+ item :: integer(),
+ itemOld :: integer(),
+ pointDrag :: {X::integer(), Y::integer()}}).
+-type wxTreeEventType() :: 'command_tree_begin_drag' | 'command_tree_begin_rdrag' | 'command_tree_begin_label_edit' | 'command_tree_end_label_edit' | 'command_tree_delete_item' | 'command_tree_get_info' | 'command_tree_set_info' | 'command_tree_item_expanded' | 'command_tree_item_expanding' | 'command_tree_item_collapsed' | 'command_tree_item_collapsing' | 'command_tree_sel_changed' | 'command_tree_sel_changing' | 'command_tree_key_down' | 'command_tree_item_activated' | 'command_tree_item_right_click' | 'command_tree_item_middle_click' | 'command_tree_end_drag' | 'command_tree_state_image_click' | 'command_tree_item_gettooltip' | 'command_tree_item_menu'.
+-type wxTree() :: #wxTree{}. %% Callback event: {@link wxTreeEvent}
+
+-record(wxSysColourChanged, {type :: wxSysColourChangedEventType()}). %% Callback event: {@link wxSysColourChangedEvent}
+-type wxSysColourChangedEventType() :: 'sys_colour_changed'.
+-type wxSysColourChanged() :: #wxSysColourChanged{}. %% Callback event: {@link wxSysColourChangedEvent}
+
+-record(wxNavigationKey,{type :: wxNavigationKeyEventType(), %% Callback event: {@link wxNavigationKeyEvent}
+ flags :: integer(),
+ focus :: wxWindow:wxWindow()}).
+-type wxNavigationKeyEventType() :: 'navigation_key'.
+-type wxNavigationKey() :: #wxNavigationKey{}. %% Callback event: {@link wxNavigationKeyEvent}
+
+-record(wxQueryNewPalette, {type :: wxQueryNewPaletteEventType()}). %% Callback event: {@link wxQueryNewPaletteEvent}
+-type wxQueryNewPaletteEventType() :: 'query_new_palette'.
+-type wxQueryNewPalette() :: #wxQueryNewPalette{}. %% Callback event: {@link wxQueryNewPaletteEvent}
+
+-record(wxMouseCaptureChanged, {type :: wxMouseCaptureChangedEventType()}). %% Callback event: {@link wxMouseCaptureChangedEvent}
+-type wxMouseCaptureChangedEventType() :: 'mouse_capture_changed'.
+-type wxMouseCaptureChanged() :: #wxMouseCaptureChanged{}. %% Callback event: {@link wxMouseCaptureChangedEvent}
+
+-record(wxHtmlLink,{type :: wxHtmlLinkEventType(), %% Callback event: {@link wxHtmlLinkEvent}
+ linkInfo :: wx:wx_wxHtmlLinkInfo()}).
+-type wxHtmlLinkEventType() :: 'command_html_link_clicked'.
+-type wxHtmlLink() :: #wxHtmlLink{}. %% Callback event: {@link wxHtmlLinkEvent}
+
+-record(wxKey,{type :: wxKeyEventType(), %% Callback event: {@link wxKeyEvent}
+ x :: integer(),
+ y :: integer(),
+ keyCode :: integer(),
+ controlDown :: boolean(),
+ shiftDown :: boolean(),
+ altDown :: boolean(),
+ metaDown :: boolean(),
+ scanCode :: boolean(),
+ uniChar :: integer(),
+ rawCode :: integer(),
+ rawFlags :: integer()}).
+-type wxKeyEventType() :: 'char' | 'char_hook' | 'key_down' | 'key_up'.
+-type wxKey() :: #wxKey{}. %% Callback event: {@link wxKeyEvent}
+
+-record(wxTaskBarIcon, {type :: wxTaskBarIconEventType()}). %% Callback event: {@link wxTaskBarIconEvent}
+-type wxTaskBarIconEventType() :: 'taskbar_move' | 'taskbar_left_down' | 'taskbar_left_up' | 'taskbar_right_down' | 'taskbar_right_up' | 'taskbar_left_dclick' | 'taskbar_right_dclick'.
+-type wxTaskBarIcon() :: #wxTaskBarIcon{}. %% Callback event: {@link wxTaskBarIconEvent}
+
+-record(wxGrid,{type :: wxGridEventType(), %% Callback event: {@link wxGridEvent}
+ row :: integer(),
+ col :: integer(),
+ x :: integer(),
+ y :: integer(),
+ selecting :: boolean(),
+ control :: boolean(),
+ meta :: boolean(),
+ shift :: boolean(),
+ alt :: boolean()}).
+-type wxGridEventType() :: 'grid_cell_left_click' | 'grid_cell_right_click' | 'grid_cell_left_dclick' | 'grid_cell_right_dclick' | 'grid_label_left_click' | 'grid_label_right_click' | 'grid_label_left_dclick' | 'grid_label_right_dclick' | 'grid_row_size' | 'grid_col_size' | 'grid_range_select' | 'grid_cell_change' | 'grid_select_cell' | 'grid_editor_shown' | 'grid_editor_hidden' | 'grid_editor_created' | 'grid_cell_begin_drag'.
+-type wxGrid() :: #wxGrid{}. %% Callback event: {@link wxGridEvent}
+
+-record(wxCalendar,{type :: wxCalendarEventType(), %% Callback event: {@link wxCalendarEvent}
+ wday :: wx:wx_enum(),
+ date :: wx:wx_datetime()}).
+-type wxCalendarEventType() :: 'calendar_sel_changed' | 'calendar_day_changed' | 'calendar_month_changed' | 'calendar_year_changed' | 'calendar_doubleclicked' | 'calendar_weekday_clicked'.
+-type wxCalendar() :: #wxCalendar{}. %% Callback event: {@link wxCalendarEvent}
-record(wxWindowCreate, {type :: wxWindowCreateEventType()}). %% Callback event: {@link wxWindowCreateEvent}
--type wxWindowCreateEventType() :: create.
+-type wxWindowCreateEventType() :: 'create'.
-type wxWindowCreate() :: #wxWindowCreate{}. %% Callback event: {@link wxWindowCreateEvent}
+-record(wxDate,{type :: wxDateEventType(), %% Callback event: {@link wxDateEvent}
+ date :: wx:wx_datetime()}).
+-type wxDateEventType() :: 'date_changed'.
+-type wxDate() :: #wxDate{}. %% Callback event: {@link wxDateEvent}
+
-record(wxAuiManager,{type :: wxAuiManagerEventType(), %% Callback event: {@link wxAuiManagerEvent}
manager :: wxAuiManager:wxAuiManager(),
pane :: wxAuiPaneInfo:wxAuiPaneInfo(),
@@ -295,58 +320,33 @@
veto_flag :: boolean(),
canveto_flag :: boolean(),
dc :: wxDC:wxDC()}).
--type wxAuiManagerEventType() :: aui_pane_button | aui_pane_close | aui_pane_maximize | aui_pane_restore | aui_pane_activated | aui_render | aui_find_manager.
+-type wxAuiManagerEventType() :: 'aui_pane_button' | 'aui_pane_close' | 'aui_pane_maximize' | 'aui_pane_restore' | 'aui_pane_activated' | 'aui_render' | 'aui_find_manager'.
-type wxAuiManager() :: #wxAuiManager{}. %% Callback event: {@link wxAuiManagerEvent}
--record(wxInitDialog, {type :: wxInitDialogEventType()}). %% Callback event: {@link wxInitDialogEvent}
--type wxInitDialogEventType() :: init_dialog.
--type wxInitDialog() :: #wxInitDialog{}. %% Callback event: {@link wxInitDialogEvent}
-
--record(wxCommand,{type :: wxCommandEventType(), %% Callback event: {@link wxCommandEvent}
- cmdString :: unicode:chardata(),
- commandInt :: integer(),
- extraLong :: integer()}).
--type wxCommandEventType() :: command_button_clicked | command_checkbox_clicked | command_choice_selected | command_listbox_selected | command_listbox_doubleclicked | command_text_updated | command_text_enter | command_menu_selected | command_slider_updated | command_radiobox_selected | command_radiobutton_selected | command_scrollbar_updated | command_vlbox_selected | command_combobox_selected | command_tool_rclicked | command_tool_enter | command_checklistbox_toggled | command_togglebutton_clicked | command_left_click | command_left_dclick | command_right_click | command_set_focus | command_kill_focus | command_enter.
--type wxCommand() :: #wxCommand{}. %% Callback event: {@link wxCommandEvent}
-
-record(wxJoystick,{type :: wxJoystickEventType(), %% Callback event: {@link wxJoystickEvent}
pos :: {X::integer(), Y::integer()},
zPosition :: integer(),
buttonChange :: integer(),
buttonState :: integer(),
joyStick :: integer()}).
--type wxJoystickEventType() :: joy_button_down | joy_button_up | joy_move | joy_zmove.
+-type wxJoystickEventType() :: 'joy_button_down' | 'joy_button_up' | 'joy_move' | 'joy_zmove'.
-type wxJoystick() :: #wxJoystick{}. %% Callback event: {@link wxJoystickEvent}
--record(wxQueryNewPalette, {type :: wxQueryNewPaletteEventType()}). %% Callback event: {@link wxQueryNewPaletteEvent}
--type wxQueryNewPaletteEventType() :: query_new_palette.
--type wxQueryNewPalette() :: #wxQueryNewPalette{}. %% Callback event: {@link wxQueryNewPaletteEvent}
-
--record(wxMove,{type :: wxMoveEventType(), %% Callback event: {@link wxMoveEvent}
- pos :: {X::integer(), Y::integer()},
- rect :: {X::integer(), Y::integer(), W::integer(), H::integer()}}).
--type wxMoveEventType() :: move.
--type wxMove() :: #wxMove{}. %% Callback event: {@link wxMoveEvent}
-
--record(wxIdle, {type :: wxIdleEventType()}). %% Callback event: {@link wxIdleEvent}
--type wxIdleEventType() :: idle.
--type wxIdle() :: #wxIdle{}. %% Callback event: {@link wxIdleEvent}
-
--record(wxColourPicker,{type :: wxColourPickerEventType(), %% Callback event: {@link wxColourPickerEvent}
- colour :: wx:wx_colour()}).
--type wxColourPickerEventType() :: command_colourpicker_changed.
--type wxColourPicker() :: #wxColourPicker{}. %% Callback event: {@link wxColourPickerEvent}
+-record(wxPaint, {type :: wxPaintEventType()}). %% Callback event: {@link wxPaintEvent}
+-type wxPaintEventType() :: 'paint'.
+-type wxPaint() :: #wxPaint{}. %% Callback event: {@link wxPaintEvent}
--record(wxTaskBarIcon, {type :: wxTaskBarIconEventType()}). %% Callback event: {@link wxTaskBarIconEvent}
--type wxTaskBarIconEventType() :: taskbar_move | taskbar_left_down | taskbar_left_up | taskbar_right_down | taskbar_right_up | taskbar_left_dclick | taskbar_right_dclick.
--type wxTaskBarIcon() :: #wxTaskBarIcon{}. %% Callback event: {@link wxTaskBarIconEvent}
+-record(wxErase,{type :: wxEraseEventType(), %% Callback event: {@link wxEraseEvent}
+ dc :: wxDC:wxDC()}).
+-type wxEraseEventType() :: 'erase_background'.
+-type wxErase() :: #wxErase{}. %% Callback event: {@link wxEraseEvent}
--record(wxTree,{type :: wxTreeEventType(), %% Callback event: {@link wxTreeEvent}
- item :: integer(),
- itemOld :: integer(),
- pointDrag :: {X::integer(), Y::integer()}}).
--type wxTreeEventType() :: command_tree_begin_drag | command_tree_begin_rdrag | command_tree_begin_label_edit | command_tree_end_label_edit | command_tree_delete_item | command_tree_get_info | command_tree_set_info | command_tree_item_expanded | command_tree_item_expanding | command_tree_item_collapsed | command_tree_item_collapsing | command_tree_sel_changed | command_tree_sel_changing | command_tree_key_down | command_tree_item_activated | command_tree_item_right_click | command_tree_item_middle_click | command_tree_end_drag | command_tree_state_image_click | command_tree_item_gettooltip | command_tree_item_menu.
--type wxTree() :: #wxTree{}. %% Callback event: {@link wxTreeEvent}
+-record(wxSetCursor,{type :: wxSetCursorEventType(), %% Callback event: {@link wxSetCursorEvent}
+ x :: integer(),
+ y :: integer(),
+ cursor :: wxCursor:wxCursor()}).
+-type wxSetCursorEventType() :: 'set_cursor'.
+-type wxSetCursor() :: #wxSetCursor{}. %% Callback event: {@link wxSetCursorEvent}
-type event() :: wxActivate() | wxAuiManager() | wxAuiNotebook() | wxCalendar() | wxChildFocus() | wxClipboardText() | wxClose() | wxColourPicker() | wxCommand() | wxContextMenu() | wxDate() | wxDisplayChanged() | wxErase() | wxFileDirPicker() | wxFocus() | wxFontPicker() | wxGrid() | wxHelp() | wxHtmlLink() | wxIconize() | wxIdle() | wxInitDialog() | wxJoystick() | wxKey() | wxList() | wxMaximize() | wxMenu() | wxMouse() | wxMouseCaptureChanged() | wxMouseCaptureLost() | wxMove() | wxNavigationKey() | wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() | wxSash() | wxScroll() | wxScrollWin() | wxSetCursor() | wxShow() | wxSize() | wxSpin() | wxSplitter() | wxStyledText() | wxSysColourChanged() | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCreate() | wxWindowDestroy().
-type wxEventType() :: wxActivateEventType() | wxAuiManagerEventType() | wxAuiNotebookEventType() | wxCalendarEventType() | wxChildFocusEventType() | wxClipboardTextEventType() | wxCloseEventType() | wxColourPickerEventType() | wxCommandEventType() | wxContextMenuEventType() | wxDateEventType() | wxDisplayChangedEventType() | wxEraseEventType() | wxFileDirPickerEventType() | wxFocusEventType() | wxFontPickerEventType() | wxGridEventType() | wxHelpEventType() | wxHtmlLinkEventType() | wxIconizeEventType() | wxIdleEventType() | wxInitDialogEventType() | wxJoystickEventType() | wxKeyEventType() | wxListEventType() | wxMaximizeEventType() | wxMenuEventType() | wxMouseCaptureChangedEventType() | wxMouseCaptureLostEventType() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType().
diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl
index bedd4e9cca..e10b99b10a 100644
--- a/lib/wx/src/gen/gl.erl
+++ b/lib/wx/src/gen/gl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -321,7 +321,7 @@ send_bin(Tuple) when is_tuple(Tuple) ->
%% in the frame buffer.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearIndex.xml">external</a> documentation.
--spec clearIndex(C) -> ok when C :: float().
+-spec clearIndex(C) -> 'ok' when C :: float().
clearIndex(C) ->
cast(5037, <<C:?GLfloat>>).
@@ -332,7 +332,7 @@ clearIndex(C) ->
%% range [0 1].
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearColor.xml">external</a> documentation.
--spec clearColor(Red, Green, Blue, Alpha) -> ok when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
+-spec clearColor(Red, Green, Blue, Alpha) -> 'ok' when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
clearColor(Red,Green,Blue,Alpha) ->
cast(5038, <<Red:?GLclampf,Green:?GLclampf,Blue:?GLclampf,Alpha:?GLclampf>>).
@@ -362,7 +362,7 @@ clearColor(Red,Green,Blue,Alpha) ->
%% that buffer.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClear.xml">external</a> documentation.
--spec clear(Mask) -> ok when Mask :: integer().
+-spec clear(Mask) -> 'ok' when Mask :: integer().
clear(Mask) ->
cast(5039, <<Mask:?GLbitfield>>).
@@ -379,7 +379,7 @@ clear(Mask) ->
%% writing.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndexMask.xml">external</a> documentation.
--spec indexMask(Mask) -> ok when Mask :: integer().
+-spec indexMask(Mask) -> 'ok' when Mask :: integer().
indexMask(Mask) ->
cast(5040, <<Mask:?GLuint>>).
@@ -395,7 +395,7 @@ indexMask(Mask) ->
%% enabled or disabled for entire color components.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml">external</a> documentation.
--spec colorMask(Red, Green, Blue, Alpha) -> ok when Red :: 0|1,Green :: 0|1,Blue :: 0|1,Alpha :: 0|1.
+-spec colorMask(Red, Green, Blue, Alpha) -> 'ok' when Red :: 0|1,Green :: 0|1,Blue :: 0|1,Alpha :: 0|1.
colorMask(Red,Green,Blue,Alpha) ->
cast(5041, <<Red:?GLboolean,Green:?GLboolean,Blue:?GLboolean,Alpha:?GLboolean>>).
@@ -438,7 +438,7 @@ colorMask(Red,Green,Blue,Alpha) ->
%% operations. ``gl:alphaFunc'' does not affect screen clear operations.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml">external</a> documentation.
--spec alphaFunc(Func, Ref) -> ok when Func :: enum(),Ref :: clamp().
+-spec alphaFunc(Func, Ref) -> 'ok' when Func :: enum(),Ref :: clamp().
alphaFunc(Func,Ref) ->
cast(5042, <<Func:?GLenum,Ref:?GLclampf>>).
@@ -513,7 +513,7 @@ alphaFunc(Func,Ref) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml">external</a> documentation.
--spec blendFunc(Sfactor, Dfactor) -> ok when Sfactor :: enum(),Dfactor :: enum().
+-spec blendFunc(Sfactor, Dfactor) -> 'ok' when Sfactor :: enum(),Dfactor :: enum().
blendFunc(Sfactor,Dfactor) ->
cast(5043, <<Sfactor:?GLenum,Dfactor:?GLenum>>).
@@ -543,7 +543,7 @@ blendFunc(Sfactor,Dfactor) ->
%% the source and destination colors.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml">external</a> documentation.
--spec logicOp(Opcode) -> ok when Opcode :: enum().
+-spec logicOp(Opcode) -> 'ok' when Opcode :: enum().
logicOp(Opcode) ->
cast(5044, <<Opcode:?GLenum>>).
@@ -559,7 +559,7 @@ logicOp(Opcode) ->
%% front-facing and back-facing. See {@link gl:frontFace/1} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml">external</a> documentation.
--spec cullFace(Mode) -> ok when Mode :: enum().
+-spec cullFace(Mode) -> 'ok' when Mode :: enum().
cullFace(Mode) ->
cast(5045, <<Mode:?GLenum>>).
@@ -582,7 +582,7 @@ cullFace(Mode) ->
%% default, counterclockwise polygons are taken to be front-facing.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml">external</a> documentation.
--spec frontFace(Mode) -> ok when Mode :: enum().
+-spec frontFace(Mode) -> 'ok' when Mode :: enum().
frontFace(Mode) ->
cast(5046, <<Mode:?GLenum>>).
@@ -594,7 +594,7 @@ frontFace(Mode) ->
%% built-in variable gl_PointSize will be used.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml">external</a> documentation.
--spec pointSize(Size) -> ok when Size :: float().
+-spec pointSize(Size) -> 'ok' when Size :: float().
pointSize(Size) ->
cast(5047, <<Size:?GLfloat>>).
@@ -626,7 +626,7 @@ pointSize(Size) ->
%% , `?GL_SMOOTH_LINE_WIDTH_RANGE', and `?GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml">external</a> documentation.
--spec lineWidth(Width) -> ok when Width :: float().
+-spec lineWidth(Width) -> 'ok' when Width :: float().
lineWidth(Width) ->
cast(5048, <<Width:?GLfloat>>).
@@ -658,7 +658,7 @@ lineWidth(Width) ->
%% stippling is disabled.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml">external</a> documentation.
--spec lineStipple(Factor, Pattern) -> ok when Factor :: integer(),Pattern :: integer().
+-spec lineStipple(Factor, Pattern) -> 'ok' when Factor :: integer(),Pattern :: integer().
lineStipple(Factor,Pattern) ->
cast(5049, <<Factor:?GLint,Pattern:?GLushort>>).
@@ -686,7 +686,7 @@ lineStipple(Factor,Pattern) ->
%% control the rasterization of the polygon.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml">external</a> documentation.
--spec polygonMode(Face, Mode) -> ok when Face :: enum(),Mode :: enum().
+-spec polygonMode(Face, Mode) -> 'ok' when Face :: enum(),Mode :: enum().
polygonMode(Face,Mode) ->
cast(5050, <<Face:?GLenum,Mode:?GLenum>>).
@@ -704,7 +704,7 @@ polygonMode(Face,Mode) ->
%% to surfaces, and for rendering solids with highlighted edges.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml">external</a> documentation.
--spec polygonOffset(Factor, Units) -> ok when Factor :: float(),Units :: float().
+-spec polygonOffset(Factor, Units) -> 'ok' when Factor :: float(),Units :: float().
polygonOffset(Factor,Units) ->
cast(5051, <<Factor:?GLfloat,Units:?GLfloat>>).
@@ -735,7 +735,7 @@ polygonOffset(Factor,Units) ->
%% the stipple pattern consists of all 1's.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml">external</a> documentation.
--spec polygonStipple(Mask) -> ok when Mask :: binary().
+-spec polygonStipple(Mask) -> 'ok' when Mask :: binary().
polygonStipple(Mask) ->
send_bin(Mask),
cast(5052, <<>>).
@@ -774,12 +774,12 @@ getPolygonStipple() ->
%% is set to `?GL_POINT' or `?GL_LINE'. See {@link gl:polygonMode/2} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlag.xml">external</a> documentation.
--spec edgeFlag(Flag) -> ok when Flag :: 0|1.
+-spec edgeFlag(Flag) -> 'ok' when Flag :: 0|1.
edgeFlag(Flag) ->
cast(5054, <<Flag:?GLboolean>>).
%% @equiv edgeFlag(Flag)
--spec edgeFlagv(Flag) -> ok when Flag :: {Flag :: 0|1}.
+-spec edgeFlagv(Flag) -> 'ok' when Flag :: {Flag :: 0|1}.
edgeFlagv({Flag}) -> edgeFlag(Flag).
%% @doc Define the scissor box
@@ -799,7 +799,7 @@ edgeFlagv({Flag}) -> edgeFlag(Flag).
%% window.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml">external</a> documentation.
--spec scissor(X, Y, Width, Height) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+-spec scissor(X, Y, Width, Height) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
scissor(X,Y,Width,Height) ->
cast(5055, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
@@ -827,7 +827,7 @@ scissor(X,Y,Width,Height) ->
%% disabled.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml">external</a> documentation.
--spec clipPlane(Plane, Equation) -> ok when Plane :: enum(),Equation :: {float(),float(),float(),float()}.
+-spec clipPlane(Plane, Equation) -> 'ok' when Plane :: enum(),Equation :: {float(),float(),float(),float()}.
clipPlane(Plane,{E1,E2,E3,E4}) ->
cast(5056, <<Plane:?GLenum,0:32,E1:?GLdouble,E2:?GLdouble,E3:?GLdouble,E4:?GLdouble>>).
@@ -884,7 +884,7 @@ getClipPlane(Plane) ->
%% buffers. The context is selected at GL initialization.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffer.xml">external</a> documentation.
--spec drawBuffer(Mode) -> ok when Mode :: enum().
+-spec drawBuffer(Mode) -> 'ok' when Mode :: enum().
drawBuffer(Mode) ->
cast(5058, <<Mode:?GLenum>>).
@@ -909,7 +909,7 @@ drawBuffer(Mode) ->
%% in double-buffered configurations.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml">external</a> documentation.
--spec readBuffer(Mode) -> ok when Mode :: enum().
+-spec readBuffer(Mode) -> 'ok' when Mode :: enum().
readBuffer(Mode) ->
cast(5059, <<Mode:?GLenum>>).
@@ -1019,13 +1019,13 @@ readBuffer(Mode) ->
%% and clamped to the implementation-dependent point size range.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml">external</a> documentation.
--spec enable(Cap) -> ok when Cap :: enum().
+-spec enable(Cap) -> 'ok' when Cap :: enum().
enable(Cap) ->
cast(5060, <<Cap:?GLenum>>).
%% @doc
%% See {@link enable/1}
--spec disable(Cap) -> ok when Cap :: enum().
+-spec disable(Cap) -> 'ok' when Cap :: enum().
disable(Cap) ->
cast(5061, <<Cap:?GLenum>>).
@@ -1115,13 +1115,13 @@ isEnabled(Cap) ->
%% is called. See {@link gl:vertexPointer/4} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnableClientState.xml">external</a> documentation.
--spec enableClientState(Cap) -> ok when Cap :: enum().
+-spec enableClientState(Cap) -> 'ok' when Cap :: enum().
enableClientState(Cap) ->
cast(5063, <<Cap:?GLenum>>).
%% @doc
%% See {@link enableClientState/1}
--spec disableClientState(Cap) -> ok when Cap :: enum().
+-spec disableClientState(Cap) -> 'ok' when Cap :: enum().
disableClientState(Cap) ->
cast(5064, <<Cap:?GLenum>>).
@@ -2089,13 +2089,13 @@ getIntegerv(Pname) ->
%% Initially, the attribute stack is empty.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushAttrib.xml">external</a> documentation.
--spec pushAttrib(Mask) -> ok when Mask :: integer().
+-spec pushAttrib(Mask) -> 'ok' when Mask :: integer().
pushAttrib(Mask) ->
cast(5069, <<Mask:?GLbitfield>>).
%% @doc
%% See {@link pushAttrib/1}
--spec popAttrib() -> ok.
+-spec popAttrib() -> 'ok'.
popAttrib() ->
cast(5070, <<>>).
@@ -2123,13 +2123,13 @@ popAttrib() ->
%% Initially, the client attribute stack is empty.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushClientAttrib.xml">external</a> documentation.
--spec pushClientAttrib(Mask) -> ok when Mask :: integer().
+-spec pushClientAttrib(Mask) -> 'ok' when Mask :: integer().
pushClientAttrib(Mask) ->
cast(5071, <<Mask:?GLbitfield>>).
%% @doc
%% See {@link pushClientAttrib/1}
--spec popClientAttrib() -> ok.
+-spec popClientAttrib() -> 'ok'.
popClientAttrib() ->
cast(5072, <<>>).
@@ -2274,7 +2274,7 @@ getString(Name) ->
%% state, and all changes to the frame buffer contents.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml">external</a> documentation.
--spec finish() -> ok.
+-spec finish() -> 'ok'.
finish() ->
cast(5076, <<>>).
@@ -2292,7 +2292,7 @@ finish() ->
%% for user input that depends on the generated image.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFlush.xml">external</a> documentation.
--spec flush() -> ok.
+-spec flush() -> 'ok'.
flush() ->
cast(5077, <<>>).
@@ -2334,7 +2334,7 @@ flush() ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glHint.xml">external</a> documentation.
--spec hint(Target, Mode) -> ok when Target :: enum(),Mode :: enum().
+-spec hint(Target, Mode) -> 'ok' when Target :: enum(),Mode :: enum().
hint(Target,Mode) ->
cast(5078, <<Target:?GLenum,Mode:?GLenum>>).
@@ -2344,7 +2344,7 @@ hint(Target,Mode) ->
%% buffer. Values specified by ``gl:clearDepth'' are clamped to the range [0 1].
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearDepth.xml">external</a> documentation.
--spec clearDepth(Depth) -> ok when Depth :: clamp().
+-spec clearDepth(Depth) -> 'ok' when Depth :: clamp().
clearDepth(Depth) ->
cast(5079, <<Depth:?GLclampd>>).
@@ -2385,7 +2385,7 @@ clearDepth(Depth) ->
%% always passes.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml">external</a> documentation.
--spec depthFunc(Func) -> ok when Func :: enum().
+-spec depthFunc(Func) -> 'ok' when Func :: enum().
depthFunc(Func) ->
cast(5080, <<Func:?GLenum>>).
@@ -2396,7 +2396,7 @@ depthFunc(Func) ->
%% depth buffer writing is enabled.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthMask.xml">external</a> documentation.
--spec depthMask(Flag) -> ok when Flag :: 0|1.
+-spec depthMask(Flag) -> 'ok' when Flag :: 0|1.
depthMask(Flag) ->
cast(5081, <<Flag:?GLboolean>>).
@@ -2413,7 +2413,7 @@ depthMask(Flag) ->
%% the depth buffer range is fully utilized.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml">external</a> documentation.
--spec depthRange(Near_val, Far_val) -> ok when Near_val :: clamp(),Far_val :: clamp().
+-spec depthRange(Near_val, Far_val) -> 'ok' when Near_val :: clamp(),Far_val :: clamp().
depthRange(Near_val,Far_val) ->
cast(5082, <<Near_val:?GLclampd,Far_val:?GLclampd>>).
@@ -2425,7 +2425,7 @@ depthRange(Near_val,Far_val) ->
%% Values specified by ``gl:clearAccum'' are clamped to the range [-1 1].
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearAccum.xml">external</a> documentation.
--spec clearAccum(Red, Green, Blue, Alpha) -> ok when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
+-spec clearAccum(Red, Green, Blue, Alpha) -> 'ok' when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
clearAccum(Red,Green,Blue,Alpha) ->
cast(5083, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat,Alpha:?GLfloat>>).
@@ -2484,7 +2484,7 @@ clearAccum(Red,Green,Blue,Alpha) ->
%% to set it to, then call {@link gl:clear/1} with the accumulation buffer enabled.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAccum.xml">external</a> documentation.
--spec accum(Op, Value) -> ok when Op :: enum(),Value :: float().
+-spec accum(Op, Value) -> 'ok' when Op :: enum(),Value :: float().
accum(Op,Value) ->
cast(5084, <<Op:?GLenum,Value:?GLfloat>>).
@@ -2507,7 +2507,7 @@ accum(Op,Value) ->
%% with argument `?GL_MATRIX_MODE'. The initial value is `?GL_MODELVIEW'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml">external</a> documentation.
--spec matrixMode(Mode) -> ok when Mode :: enum().
+-spec matrixMode(Mode) -> 'ok' when Mode :: enum().
matrixMode(Mode) ->
cast(5085, <<Mode:?GLenum>>).
@@ -2532,7 +2532,7 @@ matrixMode(Mode) ->
%% matrix stack.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml">external</a> documentation.
--spec ortho(Left, Right, Bottom, Top, Near_val, Far_val) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
+-spec ortho(Left, Right, Bottom, Top, Near_val, Far_val) -> 'ok' when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
ortho(Left,Right,Bottom,Top,Near_val,Far_val) ->
cast(5086, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble,Near_val:?GLdouble,Far_val:?GLdouble>>).
@@ -2562,7 +2562,7 @@ ortho(Left,Right,Bottom,Top,Near_val,Far_val) ->
%% matrix stack.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml">external</a> documentation.
--spec frustum(Left, Right, Bottom, Top, Near_val, Far_val) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
+-spec frustum(Left, Right, Bottom, Top, Near_val, Far_val) -> 'ok' when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
frustum(Left,Right,Bottom,Top,Near_val,Far_val) ->
cast(5087, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble,Near_val:?GLdouble,Far_val:?GLdouble>>).
@@ -2580,7 +2580,7 @@ frustum(Left,Right,Bottom,Top,Near_val,Far_val) ->
%% To query this range, call {@link gl:getBooleanv/1} with argument `?GL_MAX_VIEWPORT_DIMS'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml">external</a> documentation.
--spec viewport(X, Y, Width, Height) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+-spec viewport(X, Y, Width, Height) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
viewport(X,Y,Width,Height) ->
cast(5088, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
@@ -2605,13 +2605,13 @@ viewport(X,Y,Width,Height) ->
%% GL state.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushMatrix.xml">external</a> documentation.
--spec pushMatrix() -> ok.
+-spec pushMatrix() -> 'ok'.
pushMatrix() ->
cast(5089, <<>>).
%% @doc
%% See {@link pushMatrix/0}
--spec popMatrix() -> ok.
+-spec popMatrix() -> 'ok'.
popMatrix() ->
cast(5090, <<>>).
@@ -2625,7 +2625,7 @@ popMatrix() ->
%% but in some cases it is more efficient.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadIdentity.xml">external</a> documentation.
--spec loadIdentity() -> ok.
+-spec loadIdentity() -> 'ok'.
loadIdentity() ->
cast(5091, <<>>).
@@ -2645,7 +2645,7 @@ loadIdentity() ->
%% Projection and texture transformations are similarly defined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadMatrix.xml">external</a> documentation.
--spec loadMatrixd(M) -> ok when M :: matrix().
+-spec loadMatrixd(M) -> 'ok' when M :: matrix().
loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5092, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -2653,7 +2653,7 @@ loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc
%% See {@link loadMatrixd/1}
--spec loadMatrixf(M) -> ok when M :: matrix().
+-spec loadMatrixf(M) -> 'ok' when M :: matrix().
loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5093, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -2668,7 +2668,7 @@ loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% It is either the projection matrix, modelview matrix, or the texture matrix.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml">external</a> documentation.
--spec multMatrixd(M) -> ok when M :: matrix().
+-spec multMatrixd(M) -> 'ok' when M :: matrix().
multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5094, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -2676,7 +2676,7 @@ multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc
%% See {@link multMatrixd/1}
--spec multMatrixf(M) -> ok when M :: matrix().
+-spec multMatrixf(M) -> 'ok' when M :: matrix().
multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5095, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -2699,13 +2699,13 @@ multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% to save and restore the unrotated coordinate system.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml">external</a> documentation.
--spec rotated(Angle, X, Y, Z) -> ok when Angle :: float(),X :: float(),Y :: float(),Z :: float().
+-spec rotated(Angle, X, Y, Z) -> 'ok' when Angle :: float(),X :: float(),Y :: float(),Z :: float().
rotated(Angle,X,Y,Z) ->
cast(5096, <<Angle:?GLdouble,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc
%% See {@link rotated/4}
--spec rotatef(Angle, X, Y, Z) -> ok when Angle :: float(),X :: float(),Y :: float(),Z :: float().
+-spec rotatef(Angle, X, Y, Z) -> 'ok' when Angle :: float(),X :: float(),Y :: float(),Z :: float().
rotatef(Angle,X,Y,Z) ->
cast(5097, <<Angle:?GLfloat,X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
@@ -2728,13 +2728,13 @@ rotatef(Angle,X,Y,Z) ->
%% coordinate system.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml">external</a> documentation.
--spec scaled(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec scaled(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
scaled(X,Y,Z) ->
cast(5098, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc
%% See {@link scaled/3}
--spec scalef(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec scalef(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
scalef(X,Y,Z) ->
cast(5099, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
@@ -2753,13 +2753,13 @@ scalef(X,Y,Z) ->
%% coordinate system.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml">external</a> documentation.
--spec translated(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec translated(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
translated(X,Y,Z) ->
cast(5100, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc
%% See {@link translated/3}
--spec translatef(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec translatef(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
translatef(X,Y,Z) ->
cast(5101, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
@@ -2788,7 +2788,7 @@ isList(List) ->
%% display list are ignored. If `Range' is 0, nothing happens.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteLists.xml">external</a> documentation.
--spec deleteLists(List, Range) -> ok when List :: integer(),Range :: integer().
+-spec deleteLists(List, Range) -> 'ok' when List :: integer(),Range :: integer().
deleteLists(List,Range) ->
cast(5103, <<List:?GLuint,Range:?GLsizei>>).
@@ -2851,14 +2851,14 @@ genLists(Range) ->
%% when {@link gl:endList/0} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml">external</a> documentation.
--spec newList(List, Mode) -> ok when List :: integer(),Mode :: enum().
+-spec newList(List, Mode) -> 'ok' when List :: integer(),Mode :: enum().
newList(List,Mode) ->
cast(5105, <<List:?GLuint,Mode:?GLenum>>).
%% @doc glBeginList
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginList.xml">external</a> documentation.
--spec endList() -> ok.
+-spec endList() -> 'ok'.
endList() ->
cast(5106, <<>>).
@@ -2880,7 +2880,7 @@ endList() ->
%% , and {@link gl:pushMatrix/0} to preserve GL state across ``gl:callList'' calls.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCallList.xml">external</a> documentation.
--spec callList(List) -> ok when List :: integer().
+-spec callList(List) -> 'ok' when List :: integer().
callList(List) ->
cast(5107, <<List:?GLuint>>).
@@ -2947,7 +2947,7 @@ callList(List) ->
%% to preserve GL state across ``gl:callLists'' calls.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCallLists.xml">external</a> documentation.
--spec callLists(Lists) -> ok when Lists :: [integer()].
+-spec callLists(Lists) -> 'ok' when Lists :: [integer()].
callLists(Lists) ->
cast(5108, <<(length(Lists)):?GLuint,
(<< <<C:?GLuint>> || C <- Lists>>)/binary,0:(((1+length(Lists)) rem 2)*32)>>).
@@ -2961,7 +2961,7 @@ callLists(Lists) ->
%% the others are ignored.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glListBase.xml">external</a> documentation.
--spec listBase(Base) -> ok when Base :: integer().
+-spec listBase(Base) -> 'ok' when Base :: integer().
listBase(Base) ->
cast(5109, <<Base:?GLuint>>).
@@ -3032,13 +3032,13 @@ listBase(Base) ->
%% (3), `?GL_QUADS' (4), and `?GL_QUAD_STRIP' (2).
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml">external</a> documentation.
--spec 'begin'(Mode) -> ok when Mode :: enum().
+-spec 'begin'(Mode) -> 'ok' when Mode :: enum().
'begin'(Mode) ->
cast(5110, <<Mode:?GLenum>>).
%% @doc
%% See {@link 'begin'/1}
--spec 'end'() -> ok.
+-spec 'end'() -> 'ok'.
'end'() ->
cast(5111, <<>>).
@@ -3052,122 +3052,122 @@ listBase(Base) ->
%% y, and z are specified, w defaults to 1.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml">external</a> documentation.
--spec vertex2d(X, Y) -> ok when X :: float(),Y :: float().
+-spec vertex2d(X, Y) -> 'ok' when X :: float(),Y :: float().
vertex2d(X,Y) ->
cast(5112, <<X:?GLdouble,Y:?GLdouble>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex2f(X, Y) -> ok when X :: float(),Y :: float().
+-spec vertex2f(X, Y) -> 'ok' when X :: float(),Y :: float().
vertex2f(X,Y) ->
cast(5113, <<X:?GLfloat,Y:?GLfloat>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex2i(X, Y) -> ok when X :: integer(),Y :: integer().
+-spec vertex2i(X, Y) -> 'ok' when X :: integer(),Y :: integer().
vertex2i(X,Y) ->
cast(5114, <<X:?GLint,Y:?GLint>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex2s(X, Y) -> ok when X :: integer(),Y :: integer().
+-spec vertex2s(X, Y) -> 'ok' when X :: integer(),Y :: integer().
vertex2s(X,Y) ->
cast(5115, <<X:?GLshort,Y:?GLshort>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec vertex3d(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
vertex3d(X,Y,Z) ->
cast(5116, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec vertex3f(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
vertex3f(X,Y,Z) ->
cast(5117, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+-spec vertex3i(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
vertex3i(X,Y,Z) ->
cast(5118, <<X:?GLint,Y:?GLint,Z:?GLint>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+-spec vertex3s(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
vertex3s(X,Y,Z) ->
cast(5119, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex4d(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec vertex4d(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
vertex4d(X,Y,Z,W) ->
cast(5120, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex4f(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec vertex4f(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
vertex4f(X,Y,Z,W) ->
cast(5121, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex4i(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec vertex4i(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertex4i(X,Y,Z,W) ->
cast(5122, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
%% @doc
%% See {@link vertex2d/2}
--spec vertex4s(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec vertex4s(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertex4s(X,Y,Z,W) ->
cast(5123, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
%% @equiv vertex2d(X,Y)
--spec vertex2dv(V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec vertex2dv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertex2dv({X,Y}) -> vertex2d(X,Y).
%% @equiv vertex2f(X,Y)
--spec vertex2fv(V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec vertex2fv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertex2fv({X,Y}) -> vertex2f(X,Y).
%% @equiv vertex2i(X,Y)
--spec vertex2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec vertex2iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertex2iv({X,Y}) -> vertex2i(X,Y).
%% @equiv vertex2s(X,Y)
--spec vertex2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec vertex2sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertex2sv({X,Y}) -> vertex2s(X,Y).
%% @equiv vertex3d(X,Y,Z)
--spec vertex3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec vertex3dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z).
%% @equiv vertex3f(X,Y,Z)
--spec vertex3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec vertex3fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z).
%% @equiv vertex3i(X,Y,Z)
--spec vertex3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec vertex3iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z).
%% @equiv vertex3s(X,Y,Z)
--spec vertex3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec vertex3sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z).
%% @equiv vertex4d(X,Y,Z,W)
--spec vertex4dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec vertex4dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertex4dv({X,Y,Z,W}) -> vertex4d(X,Y,Z,W).
%% @equiv vertex4f(X,Y,Z,W)
--spec vertex4fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec vertex4fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertex4fv({X,Y,Z,W}) -> vertex4f(X,Y,Z,W).
%% @equiv vertex4i(X,Y,Z,W)
--spec vertex4iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec vertex4iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertex4iv({X,Y,Z,W}) -> vertex4i(X,Y,Z,W).
%% @equiv vertex4s(X,Y,Z,W)
--spec vertex4sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec vertex4sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W).
%% @doc Set the current normal vector
@@ -3187,52 +3187,52 @@ vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W).
%% Normalization is initially disabled.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml">external</a> documentation.
--spec normal3b(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer().
+-spec normal3b(Nx, Ny, Nz) -> 'ok' when Nx :: integer(),Ny :: integer(),Nz :: integer().
normal3b(Nx,Ny,Nz) ->
cast(5124, <<Nx:?GLbyte,Ny:?GLbyte,Nz:?GLbyte>>).
%% @doc
%% See {@link normal3b/3}
--spec normal3d(Nx, Ny, Nz) -> ok when Nx :: float(),Ny :: float(),Nz :: float().
+-spec normal3d(Nx, Ny, Nz) -> 'ok' when Nx :: float(),Ny :: float(),Nz :: float().
normal3d(Nx,Ny,Nz) ->
cast(5125, <<Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble>>).
%% @doc
%% See {@link normal3b/3}
--spec normal3f(Nx, Ny, Nz) -> ok when Nx :: float(),Ny :: float(),Nz :: float().
+-spec normal3f(Nx, Ny, Nz) -> 'ok' when Nx :: float(),Ny :: float(),Nz :: float().
normal3f(Nx,Ny,Nz) ->
cast(5126, <<Nx:?GLfloat,Ny:?GLfloat,Nz:?GLfloat>>).
%% @doc
%% See {@link normal3b/3}
--spec normal3i(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer().
+-spec normal3i(Nx, Ny, Nz) -> 'ok' when Nx :: integer(),Ny :: integer(),Nz :: integer().
normal3i(Nx,Ny,Nz) ->
cast(5127, <<Nx:?GLint,Ny:?GLint,Nz:?GLint>>).
%% @doc
%% See {@link normal3b/3}
--spec normal3s(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer().
+-spec normal3s(Nx, Ny, Nz) -> 'ok' when Nx :: integer(),Ny :: integer(),Nz :: integer().
normal3s(Nx,Ny,Nz) ->
cast(5128, <<Nx:?GLshort,Ny:?GLshort,Nz:?GLshort>>).
%% @equiv normal3b(Nx,Ny,Nz)
--spec normal3bv(V) -> ok when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
+-spec normal3bv(V) -> 'ok' when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz).
%% @equiv normal3d(Nx,Ny,Nz)
--spec normal3dv(V) -> ok when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
+-spec normal3dv(V) -> 'ok' when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz).
%% @equiv normal3f(Nx,Ny,Nz)
--spec normal3fv(V) -> ok when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
+-spec normal3fv(V) -> 'ok' when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz).
%% @equiv normal3i(Nx,Ny,Nz)
--spec normal3iv(V) -> ok when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
+-spec normal3iv(V) -> 'ok' when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz).
%% @equiv normal3s(Nx,Ny,Nz)
--spec normal3sv(V) -> ok when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
+-spec normal3sv(V) -> 'ok' when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz).
%% @doc Set the current color index
@@ -3249,52 +3249,52 @@ normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz).
%% value that do not correspond to bits in the frame buffer are masked out.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml">external</a> documentation.
--spec indexd(C) -> ok when C :: float().
+-spec indexd(C) -> 'ok' when C :: float().
indexd(C) ->
cast(5129, <<C:?GLdouble>>).
%% @doc
%% See {@link indexd/1}
--spec indexf(C) -> ok when C :: float().
+-spec indexf(C) -> 'ok' when C :: float().
indexf(C) ->
cast(5130, <<C:?GLfloat>>).
%% @doc
%% See {@link indexd/1}
--spec indexi(C) -> ok when C :: integer().
+-spec indexi(C) -> 'ok' when C :: integer().
indexi(C) ->
cast(5131, <<C:?GLint>>).
%% @doc
%% See {@link indexd/1}
--spec indexs(C) -> ok when C :: integer().
+-spec indexs(C) -> 'ok' when C :: integer().
indexs(C) ->
cast(5132, <<C:?GLshort>>).
%% @doc
%% See {@link indexd/1}
--spec indexub(C) -> ok when C :: integer().
+-spec indexub(C) -> 'ok' when C :: integer().
indexub(C) ->
cast(5133, <<C:?GLubyte>>).
%% @equiv indexd(C)
--spec indexdv(C) -> ok when C :: {C :: float()}.
+-spec indexdv(C) -> 'ok' when C :: {C :: float()}.
indexdv({C}) -> indexd(C).
%% @equiv indexf(C)
--spec indexfv(C) -> ok when C :: {C :: float()}.
+-spec indexfv(C) -> 'ok' when C :: {C :: float()}.
indexfv({C}) -> indexf(C).
%% @equiv indexi(C)
--spec indexiv(C) -> ok when C :: {C :: integer()}.
+-spec indexiv(C) -> 'ok' when C :: {C :: integer()}.
indexiv({C}) -> indexi(C).
%% @equiv indexs(C)
--spec indexsv(C) -> ok when C :: {C :: integer()}.
+-spec indexsv(C) -> 'ok' when C :: {C :: integer()}.
indexsv({C}) -> indexs(C).
%% @equiv indexub(C)
--spec indexubv(C) -> ok when C :: {C :: integer()}.
+-spec indexubv(C) -> 'ok' when C :: {C :: integer()}.
indexubv({C}) -> indexub(C).
%% @doc Set the current color
@@ -3323,162 +3323,162 @@ indexubv({C}) -> indexub(C).
%% are interpolated or written into a color buffer.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml">external</a> documentation.
--spec color3b(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec color3b(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3b(Red,Green,Blue) ->
cast(5134, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte>>).
%% @doc
%% See {@link color3b/3}
--spec color3d(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
+-spec color3d(Red, Green, Blue) -> 'ok' when Red :: float(),Green :: float(),Blue :: float().
color3d(Red,Green,Blue) ->
cast(5135, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble>>).
%% @doc
%% See {@link color3b/3}
--spec color3f(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
+-spec color3f(Red, Green, Blue) -> 'ok' when Red :: float(),Green :: float(),Blue :: float().
color3f(Red,Green,Blue) ->
cast(5136, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat>>).
%% @doc
%% See {@link color3b/3}
--spec color3i(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec color3i(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3i(Red,Green,Blue) ->
cast(5137, <<Red:?GLint,Green:?GLint,Blue:?GLint>>).
%% @doc
%% See {@link color3b/3}
--spec color3s(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec color3s(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3s(Red,Green,Blue) ->
cast(5138, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort>>).
%% @doc
%% See {@link color3b/3}
--spec color3ub(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec color3ub(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3ub(Red,Green,Blue) ->
cast(5139, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte>>).
%% @doc
%% See {@link color3b/3}
--spec color3ui(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec color3ui(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3ui(Red,Green,Blue) ->
cast(5140, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint>>).
%% @doc
%% See {@link color3b/3}
--spec color3us(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec color3us(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3us(Red,Green,Blue) ->
cast(5141, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort>>).
%% @doc
%% See {@link color3b/3}
--spec color4b(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+-spec color4b(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4b(Red,Green,Blue,Alpha) ->
cast(5142, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte,Alpha:?GLbyte>>).
%% @doc
%% See {@link color3b/3}
--spec color4d(Red, Green, Blue, Alpha) -> ok when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
+-spec color4d(Red, Green, Blue, Alpha) -> 'ok' when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
color4d(Red,Green,Blue,Alpha) ->
cast(5143, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble,Alpha:?GLdouble>>).
%% @doc
%% See {@link color3b/3}
--spec color4f(Red, Green, Blue, Alpha) -> ok when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
+-spec color4f(Red, Green, Blue, Alpha) -> 'ok' when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
color4f(Red,Green,Blue,Alpha) ->
cast(5144, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat,Alpha:?GLfloat>>).
%% @doc
%% See {@link color3b/3}
--spec color4i(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+-spec color4i(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4i(Red,Green,Blue,Alpha) ->
cast(5145, <<Red:?GLint,Green:?GLint,Blue:?GLint,Alpha:?GLint>>).
%% @doc
%% See {@link color3b/3}
--spec color4s(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+-spec color4s(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4s(Red,Green,Blue,Alpha) ->
cast(5146, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort,Alpha:?GLshort>>).
%% @doc
%% See {@link color3b/3}
--spec color4ub(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+-spec color4ub(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4ub(Red,Green,Blue,Alpha) ->
cast(5147, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte,Alpha:?GLubyte>>).
%% @doc
%% See {@link color3b/3}
--spec color4ui(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+-spec color4ui(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4ui(Red,Green,Blue,Alpha) ->
cast(5148, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint,Alpha:?GLuint>>).
%% @doc
%% See {@link color3b/3}
--spec color4us(Red, Green, Blue, Alpha) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
+-spec color4us(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4us(Red,Green,Blue,Alpha) ->
cast(5149, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort,Alpha:?GLushort>>).
%% @equiv color3b(Red,Green,Blue)
--spec color3bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec color3bv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue).
%% @equiv color3d(Red,Green,Blue)
--spec color3dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
+-spec color3dv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float()}.
color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue).
%% @equiv color3f(Red,Green,Blue)
--spec color3fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
+-spec color3fv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float()}.
color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue).
%% @equiv color3i(Red,Green,Blue)
--spec color3iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec color3iv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue).
%% @equiv color3s(Red,Green,Blue)
--spec color3sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec color3sv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue).
%% @equiv color3ub(Red,Green,Blue)
--spec color3ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec color3ubv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue).
%% @equiv color3ui(Red,Green,Blue)
--spec color3uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec color3uiv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue).
%% @equiv color3us(Red,Green,Blue)
--spec color3usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec color3usv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue).
%% @equiv color4b(Red,Green,Blue,Alpha)
--spec color4bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+-spec color4bv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4bv({Red,Green,Blue,Alpha}) -> color4b(Red,Green,Blue,Alpha).
%% @equiv color4d(Red,Green,Blue,Alpha)
--spec color4dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
+-spec color4dv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
color4dv({Red,Green,Blue,Alpha}) -> color4d(Red,Green,Blue,Alpha).
%% @equiv color4f(Red,Green,Blue,Alpha)
--spec color4fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
+-spec color4fv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
color4fv({Red,Green,Blue,Alpha}) -> color4f(Red,Green,Blue,Alpha).
%% @equiv color4i(Red,Green,Blue,Alpha)
--spec color4iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+-spec color4iv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4iv({Red,Green,Blue,Alpha}) -> color4i(Red,Green,Blue,Alpha).
%% @equiv color4s(Red,Green,Blue,Alpha)
--spec color4sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+-spec color4sv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4sv({Red,Green,Blue,Alpha}) -> color4s(Red,Green,Blue,Alpha).
%% @equiv color4ub(Red,Green,Blue,Alpha)
--spec color4ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+-spec color4ubv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4ubv({Red,Green,Blue,Alpha}) -> color4ub(Red,Green,Blue,Alpha).
%% @equiv color4ui(Red,Green,Blue,Alpha)
--spec color4uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+-spec color4uiv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4uiv({Red,Green,Blue,Alpha}) -> color4ui(Red,Green,Blue,Alpha).
%% @equiv color4us(Red,Green,Blue,Alpha)
--spec color4usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
+-spec color4usv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha).
%% @doc Set the current texture coordinates
@@ -3496,162 +3496,162 @@ color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha).
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml">external</a> documentation.
--spec texCoord1d(S) -> ok when S :: float().
+-spec texCoord1d(S) -> 'ok' when S :: float().
texCoord1d(S) ->
cast(5150, <<S:?GLdouble>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord1f(S) -> ok when S :: float().
+-spec texCoord1f(S) -> 'ok' when S :: float().
texCoord1f(S) ->
cast(5151, <<S:?GLfloat>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord1i(S) -> ok when S :: integer().
+-spec texCoord1i(S) -> 'ok' when S :: integer().
texCoord1i(S) ->
cast(5152, <<S:?GLint>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord1s(S) -> ok when S :: integer().
+-spec texCoord1s(S) -> 'ok' when S :: integer().
texCoord1s(S) ->
cast(5153, <<S:?GLshort>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord2d(S, T) -> ok when S :: float(),T :: float().
+-spec texCoord2d(S, T) -> 'ok' when S :: float(),T :: float().
texCoord2d(S,T) ->
cast(5154, <<S:?GLdouble,T:?GLdouble>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord2f(S, T) -> ok when S :: float(),T :: float().
+-spec texCoord2f(S, T) -> 'ok' when S :: float(),T :: float().
texCoord2f(S,T) ->
cast(5155, <<S:?GLfloat,T:?GLfloat>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord2i(S, T) -> ok when S :: integer(),T :: integer().
+-spec texCoord2i(S, T) -> 'ok' when S :: integer(),T :: integer().
texCoord2i(S,T) ->
cast(5156, <<S:?GLint,T:?GLint>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord2s(S, T) -> ok when S :: integer(),T :: integer().
+-spec texCoord2s(S, T) -> 'ok' when S :: integer(),T :: integer().
texCoord2s(S,T) ->
cast(5157, <<S:?GLshort,T:?GLshort>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord3d(S, T, R) -> ok when S :: float(),T :: float(),R :: float().
+-spec texCoord3d(S, T, R) -> 'ok' when S :: float(),T :: float(),R :: float().
texCoord3d(S,T,R) ->
cast(5158, <<S:?GLdouble,T:?GLdouble,R:?GLdouble>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord3f(S, T, R) -> ok when S :: float(),T :: float(),R :: float().
+-spec texCoord3f(S, T, R) -> 'ok' when S :: float(),T :: float(),R :: float().
texCoord3f(S,T,R) ->
cast(5159, <<S:?GLfloat,T:?GLfloat,R:?GLfloat>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord3i(S, T, R) -> ok when S :: integer(),T :: integer(),R :: integer().
+-spec texCoord3i(S, T, R) -> 'ok' when S :: integer(),T :: integer(),R :: integer().
texCoord3i(S,T,R) ->
cast(5160, <<S:?GLint,T:?GLint,R:?GLint>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord3s(S, T, R) -> ok when S :: integer(),T :: integer(),R :: integer().
+-spec texCoord3s(S, T, R) -> 'ok' when S :: integer(),T :: integer(),R :: integer().
texCoord3s(S,T,R) ->
cast(5161, <<S:?GLshort,T:?GLshort,R:?GLshort>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord4d(S, T, R, Q) -> ok when S :: float(),T :: float(),R :: float(),Q :: float().
+-spec texCoord4d(S, T, R, Q) -> 'ok' when S :: float(),T :: float(),R :: float(),Q :: float().
texCoord4d(S,T,R,Q) ->
cast(5162, <<S:?GLdouble,T:?GLdouble,R:?GLdouble,Q:?GLdouble>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord4f(S, T, R, Q) -> ok when S :: float(),T :: float(),R :: float(),Q :: float().
+-spec texCoord4f(S, T, R, Q) -> 'ok' when S :: float(),T :: float(),R :: float(),Q :: float().
texCoord4f(S,T,R,Q) ->
cast(5163, <<S:?GLfloat,T:?GLfloat,R:?GLfloat,Q:?GLfloat>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord4i(S, T, R, Q) -> ok when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
+-spec texCoord4i(S, T, R, Q) -> 'ok' when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
texCoord4i(S,T,R,Q) ->
cast(5164, <<S:?GLint,T:?GLint,R:?GLint,Q:?GLint>>).
%% @doc
%% See {@link texCoord1d/1}
--spec texCoord4s(S, T, R, Q) -> ok when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
+-spec texCoord4s(S, T, R, Q) -> 'ok' when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
texCoord4s(S,T,R,Q) ->
cast(5165, <<S:?GLshort,T:?GLshort,R:?GLshort,Q:?GLshort>>).
%% @equiv texCoord1d(S)
--spec texCoord1dv(V) -> ok when V :: {S :: float()}.
+-spec texCoord1dv(V) -> 'ok' when V :: {S :: float()}.
texCoord1dv({S}) -> texCoord1d(S).
%% @equiv texCoord1f(S)
--spec texCoord1fv(V) -> ok when V :: {S :: float()}.
+-spec texCoord1fv(V) -> 'ok' when V :: {S :: float()}.
texCoord1fv({S}) -> texCoord1f(S).
%% @equiv texCoord1i(S)
--spec texCoord1iv(V) -> ok when V :: {S :: integer()}.
+-spec texCoord1iv(V) -> 'ok' when V :: {S :: integer()}.
texCoord1iv({S}) -> texCoord1i(S).
%% @equiv texCoord1s(S)
--spec texCoord1sv(V) -> ok when V :: {S :: integer()}.
+-spec texCoord1sv(V) -> 'ok' when V :: {S :: integer()}.
texCoord1sv({S}) -> texCoord1s(S).
%% @equiv texCoord2d(S,T)
--spec texCoord2dv(V) -> ok when V :: {S :: float(),T :: float()}.
+-spec texCoord2dv(V) -> 'ok' when V :: {S :: float(),T :: float()}.
texCoord2dv({S,T}) -> texCoord2d(S,T).
%% @equiv texCoord2f(S,T)
--spec texCoord2fv(V) -> ok when V :: {S :: float(),T :: float()}.
+-spec texCoord2fv(V) -> 'ok' when V :: {S :: float(),T :: float()}.
texCoord2fv({S,T}) -> texCoord2f(S,T).
%% @equiv texCoord2i(S,T)
--spec texCoord2iv(V) -> ok when V :: {S :: integer(),T :: integer()}.
+-spec texCoord2iv(V) -> 'ok' when V :: {S :: integer(),T :: integer()}.
texCoord2iv({S,T}) -> texCoord2i(S,T).
%% @equiv texCoord2s(S,T)
--spec texCoord2sv(V) -> ok when V :: {S :: integer(),T :: integer()}.
+-spec texCoord2sv(V) -> 'ok' when V :: {S :: integer(),T :: integer()}.
texCoord2sv({S,T}) -> texCoord2s(S,T).
%% @equiv texCoord3d(S,T,R)
--spec texCoord3dv(V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
+-spec texCoord3dv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float()}.
texCoord3dv({S,T,R}) -> texCoord3d(S,T,R).
%% @equiv texCoord3f(S,T,R)
--spec texCoord3fv(V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
+-spec texCoord3fv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float()}.
texCoord3fv({S,T,R}) -> texCoord3f(S,T,R).
%% @equiv texCoord3i(S,T,R)
--spec texCoord3iv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
+-spec texCoord3iv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer()}.
texCoord3iv({S,T,R}) -> texCoord3i(S,T,R).
%% @equiv texCoord3s(S,T,R)
--spec texCoord3sv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
+-spec texCoord3sv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer()}.
texCoord3sv({S,T,R}) -> texCoord3s(S,T,R).
%% @equiv texCoord4d(S,T,R,Q)
--spec texCoord4dv(V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
+-spec texCoord4dv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
texCoord4dv({S,T,R,Q}) -> texCoord4d(S,T,R,Q).
%% @equiv texCoord4f(S,T,R,Q)
--spec texCoord4fv(V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
+-spec texCoord4fv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
texCoord4fv({S,T,R,Q}) -> texCoord4f(S,T,R,Q).
%% @equiv texCoord4i(S,T,R,Q)
--spec texCoord4iv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
+-spec texCoord4iv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
texCoord4iv({S,T,R,Q}) -> texCoord4i(S,T,R,Q).
%% @equiv texCoord4s(S,T,R,Q)
--spec texCoord4sv(V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
+-spec texCoord4sv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q).
%% @doc Specify the raster position for pixel operations
@@ -3696,122 +3696,122 @@ texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q).
%% initial value.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml">external</a> documentation.
--spec rasterPos2d(X, Y) -> ok when X :: float(),Y :: float().
+-spec rasterPos2d(X, Y) -> 'ok' when X :: float(),Y :: float().
rasterPos2d(X,Y) ->
cast(5166, <<X:?GLdouble,Y:?GLdouble>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos2f(X, Y) -> ok when X :: float(),Y :: float().
+-spec rasterPos2f(X, Y) -> 'ok' when X :: float(),Y :: float().
rasterPos2f(X,Y) ->
cast(5167, <<X:?GLfloat,Y:?GLfloat>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos2i(X, Y) -> ok when X :: integer(),Y :: integer().
+-spec rasterPos2i(X, Y) -> 'ok' when X :: integer(),Y :: integer().
rasterPos2i(X,Y) ->
cast(5168, <<X:?GLint,Y:?GLint>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos2s(X, Y) -> ok when X :: integer(),Y :: integer().
+-spec rasterPos2s(X, Y) -> 'ok' when X :: integer(),Y :: integer().
rasterPos2s(X,Y) ->
cast(5169, <<X:?GLshort,Y:?GLshort>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec rasterPos3d(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
rasterPos3d(X,Y,Z) ->
cast(5170, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec rasterPos3f(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
rasterPos3f(X,Y,Z) ->
cast(5171, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+-spec rasterPos3i(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
rasterPos3i(X,Y,Z) ->
cast(5172, <<X:?GLint,Y:?GLint,Z:?GLint>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+-spec rasterPos3s(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
rasterPos3s(X,Y,Z) ->
cast(5173, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos4d(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec rasterPos4d(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
rasterPos4d(X,Y,Z,W) ->
cast(5174, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos4f(X, Y, Z, W) -> ok when X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec rasterPos4f(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
rasterPos4f(X,Y,Z,W) ->
cast(5175, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos4i(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec rasterPos4i(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
rasterPos4i(X,Y,Z,W) ->
cast(5176, <<X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
%% @doc
%% See {@link rasterPos2d/2}
--spec rasterPos4s(X, Y, Z, W) -> ok when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec rasterPos4s(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
rasterPos4s(X,Y,Z,W) ->
cast(5177, <<X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
%% @equiv rasterPos2d(X,Y)
--spec rasterPos2dv(V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec rasterPos2dv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
rasterPos2dv({X,Y}) -> rasterPos2d(X,Y).
%% @equiv rasterPos2f(X,Y)
--spec rasterPos2fv(V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec rasterPos2fv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
rasterPos2fv({X,Y}) -> rasterPos2f(X,Y).
%% @equiv rasterPos2i(X,Y)
--spec rasterPos2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec rasterPos2iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
rasterPos2iv({X,Y}) -> rasterPos2i(X,Y).
%% @equiv rasterPos2s(X,Y)
--spec rasterPos2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec rasterPos2sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
rasterPos2sv({X,Y}) -> rasterPos2s(X,Y).
%% @equiv rasterPos3d(X,Y,Z)
--spec rasterPos3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec rasterPos3dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
rasterPos3dv({X,Y,Z}) -> rasterPos3d(X,Y,Z).
%% @equiv rasterPos3f(X,Y,Z)
--spec rasterPos3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec rasterPos3fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
rasterPos3fv({X,Y,Z}) -> rasterPos3f(X,Y,Z).
%% @equiv rasterPos3i(X,Y,Z)
--spec rasterPos3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec rasterPos3iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
rasterPos3iv({X,Y,Z}) -> rasterPos3i(X,Y,Z).
%% @equiv rasterPos3s(X,Y,Z)
--spec rasterPos3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec rasterPos3sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
rasterPos3sv({X,Y,Z}) -> rasterPos3s(X,Y,Z).
%% @equiv rasterPos4d(X,Y,Z,W)
--spec rasterPos4dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec rasterPos4dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
rasterPos4dv({X,Y,Z,W}) -> rasterPos4d(X,Y,Z,W).
%% @equiv rasterPos4f(X,Y,Z,W)
--spec rasterPos4fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec rasterPos4fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
rasterPos4fv({X,Y,Z,W}) -> rasterPos4f(X,Y,Z,W).
%% @equiv rasterPos4i(X,Y,Z,W)
--spec rasterPos4iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec rasterPos4iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
rasterPos4iv({X,Y,Z,W}) -> rasterPos4i(X,Y,Z,W).
%% @equiv rasterPos4s(X,Y,Z,W)
--spec rasterPos4sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec rasterPos4sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
rasterPos4sv({X,Y,Z,W}) -> rasterPos4s(X,Y,Z,W).
%% @doc Draw a rectangle
@@ -3828,49 +3828,49 @@ rasterPos4sv({X,Y,Z,W}) -> rasterPos4s(X,Y,Z,W).
%% the rectangle is constructed with a counterclockwise winding.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml">external</a> documentation.
--spec rectd(X1, Y1, X2, Y2) -> ok when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
+-spec rectd(X1, Y1, X2, Y2) -> 'ok' when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
rectd(X1,Y1,X2,Y2) ->
cast(5178, <<X1:?GLdouble,Y1:?GLdouble,X2:?GLdouble,Y2:?GLdouble>>).
%% @doc
%% See {@link rectd/4}
--spec rectf(X1, Y1, X2, Y2) -> ok when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
+-spec rectf(X1, Y1, X2, Y2) -> 'ok' when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
rectf(X1,Y1,X2,Y2) ->
cast(5179, <<X1:?GLfloat,Y1:?GLfloat,X2:?GLfloat,Y2:?GLfloat>>).
%% @doc
%% See {@link rectd/4}
--spec recti(X1, Y1, X2, Y2) -> ok when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
+-spec recti(X1, Y1, X2, Y2) -> 'ok' when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
recti(X1,Y1,X2,Y2) ->
cast(5180, <<X1:?GLint,Y1:?GLint,X2:?GLint,Y2:?GLint>>).
%% @doc
%% See {@link rectd/4}
--spec rects(X1, Y1, X2, Y2) -> ok when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
+-spec rects(X1, Y1, X2, Y2) -> 'ok' when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
rects(X1,Y1,X2,Y2) ->
cast(5181, <<X1:?GLshort,Y1:?GLshort,X2:?GLshort,Y2:?GLshort>>).
%% @doc
%% See {@link rectd/4}
--spec rectdv(V1, V2) -> ok when V1 :: {float(),float()},V2 :: {float(),float()}.
+-spec rectdv(V1, V2) -> 'ok' when V1 :: {float(),float()},V2 :: {float(),float()}.
rectdv({V1,V2},{V1,V2}) ->
cast(5182, <<V1:?GLdouble,V2:?GLdouble,V1:?GLdouble,V2:?GLdouble>>).
%% @doc
%% See {@link rectd/4}
--spec rectfv(V1, V2) -> ok when V1 :: {float(),float()},V2 :: {float(),float()}.
+-spec rectfv(V1, V2) -> 'ok' when V1 :: {float(),float()},V2 :: {float(),float()}.
rectfv({V1,V2},{V1,V2}) ->
cast(5183, <<V1:?GLfloat,V2:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
%% @doc
%% See {@link rectd/4}
--spec rectiv(V1, V2) -> ok when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
+-spec rectiv(V1, V2) -> 'ok' when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
rectiv({V1,V2},{V1,V2}) ->
cast(5184, <<V1:?GLint,V2:?GLint,V1:?GLint,V2:?GLint>>).
%% @doc
%% See {@link rectd/4}
--spec rectsv(V1, V2) -> ok when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
+-spec rectsv(V1, V2) -> 'ok' when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
rectsv({V1,V2},{V1,V2}) ->
cast(5185, <<V1:?GLshort,V2:?GLshort,V1:?GLshort,V2:?GLshort>>).
@@ -3898,7 +3898,7 @@ rectsv({V1,V2},{V1,V2}) ->
%% , or {@link gl:drawRangeElements/6} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexPointer.xml">external</a> documentation.
--spec vertexPointer(Size, Type, Stride, Ptr) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+-spec vertexPointer(Size, Type, Stride, Ptr) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
vertexPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5186, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
vertexPointer(Size,Type,Stride,Ptr) ->
@@ -3929,7 +3929,7 @@ vertexPointer(Size,Type,Stride,Ptr) ->
%% , or {@link gl:arrayElement/1} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNormalPointer.xml">external</a> documentation.
--spec normalPointer(Type, Stride, Ptr) -> ok when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+-spec normalPointer(Type, Stride, Ptr) -> 'ok' when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
normalPointer(Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5188, <<Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
normalPointer(Type,Stride,Ptr) ->
@@ -3961,7 +3961,7 @@ normalPointer(Type,Stride,Ptr) ->
%% , or {@link gl:arrayElement/1} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorPointer.xml">external</a> documentation.
--spec colorPointer(Size, Type, Stride, Ptr) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+-spec colorPointer(Size, Type, Stride, Ptr) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
colorPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5190, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
colorPointer(Size,Type,Stride,Ptr) ->
@@ -3991,7 +3991,7 @@ colorPointer(Size,Type,Stride,Ptr) ->
%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glIndexPointer.xml">external</a> documentation.
--spec indexPointer(Type, Stride, Ptr) -> ok when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+-spec indexPointer(Type, Stride, Ptr) -> 'ok' when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
indexPointer(Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5192, <<Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
indexPointer(Type,Stride,Ptr) ->
@@ -4025,7 +4025,7 @@ indexPointer(Type,Stride,Ptr) ->
%% or {@link gl:drawRangeElements/6} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexCoordPointer.xml">external</a> documentation.
--spec texCoordPointer(Size, Type, Stride, Ptr) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
+-spec texCoordPointer(Size, Type, Stride, Ptr) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
texCoordPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5194, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Ptr:?GLuint>>);
texCoordPointer(Size,Type,Stride,Ptr) ->
@@ -4054,7 +4054,7 @@ texCoordPointer(Size,Type,Stride,Ptr) ->
%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlagPointer.xml">external</a> documentation.
--spec edgeFlagPointer(Stride, Ptr) -> ok when Stride :: integer(),Ptr :: offset()|mem().
+-spec edgeFlagPointer(Stride, Ptr) -> 'ok' when Stride :: integer(),Ptr :: offset()|mem().
edgeFlagPointer(Stride,Ptr) when is_integer(Ptr) ->
cast(5196, <<Stride:?GLsizei,Ptr:?GLuint>>);
edgeFlagPointer(Stride,Ptr) ->
@@ -4082,7 +4082,7 @@ edgeFlagPointer(Stride,Ptr) ->
%% and a call that follows a change to array data may access original data.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glArrayElement.xml">external</a> documentation.
--spec arrayElement(I) -> ok when I :: integer().
+-spec arrayElement(I) -> 'ok' when I :: integer().
arrayElement(I) ->
cast(5198, <<I:?GLint>>).
@@ -4103,7 +4103,7 @@ arrayElement(I) ->
%% after ``gl:drawArrays'' returns. Attributes that aren't modified remain well defined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml">external</a> documentation.
--spec drawArrays(Mode, First, Count) -> ok when Mode :: enum(),First :: integer(),Count :: integer().
+-spec drawArrays(Mode, First, Count) -> 'ok' when Mode :: enum(),First :: integer(),Count :: integer().
drawArrays(Mode,First,Count) ->
cast(5199, <<Mode:?GLenum,First:?GLint,Count:?GLsizei>>).
@@ -4125,7 +4125,7 @@ drawArrays(Mode,First,Count) ->
%% values.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElements.xml">external</a> documentation.
--spec drawElements(Mode, Count, Type, Indices) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
+-spec drawElements(Mode, Count, Type, Indices) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
drawElements(Mode,Count,Type,Indices) when is_integer(Indices) ->
cast(5200, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint>>);
drawElements(Mode,Count,Type,Indices) ->
@@ -4153,7 +4153,7 @@ drawElements(Mode,Count,Type,Indices) ->
%% which follows is located at the first possible floating-point aligned address.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glInterleavedArrays.xml">external</a> documentation.
--spec interleavedArrays(Format, Stride, Pointer) -> ok when Format :: enum(),Stride :: integer(),Pointer :: offset()|mem().
+-spec interleavedArrays(Format, Stride, Pointer) -> 'ok' when Format :: enum(),Stride :: integer(),Pointer :: offset()|mem().
interleavedArrays(Format,Stride,Pointer) when is_integer(Pointer) ->
cast(5202, <<Format:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
interleavedArrays(Format,Stride,Pointer) ->
@@ -4187,7 +4187,7 @@ interleavedArrays(Format,Stride,Pointer) ->
%% and `?GL_SMOOTH', respectively.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml">external</a> documentation.
--spec shadeModel(Mode) -> ok when Mode :: enum().
+-spec shadeModel(Mode) -> 'ok' when Mode :: enum().
shadeModel(Mode) ->
cast(5204, <<Mode:?GLenum>>).
@@ -4281,26 +4281,26 @@ shadeModel(Mode) ->
%% attenuation factors are (1, 0, 0), resulting in no attenuation.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml">external</a> documentation.
--spec lightf(Light, Pname, Param) -> ok when Light :: enum(),Pname :: enum(),Param :: float().
+-spec lightf(Light, Pname, Param) -> 'ok' when Light :: enum(),Pname :: enum(),Param :: float().
lightf(Light,Pname,Param) ->
cast(5205, <<Light:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link lightf/3}
--spec lighti(Light, Pname, Param) -> ok when Light :: enum(),Pname :: enum(),Param :: integer().
+-spec lighti(Light, Pname, Param) -> 'ok' when Light :: enum(),Pname :: enum(),Param :: integer().
lighti(Light,Pname,Param) ->
cast(5206, <<Light:?GLenum,Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link lightf/3}
--spec lightfv(Light, Pname, Params) -> ok when Light :: enum(),Pname :: enum(),Params :: tuple().
+-spec lightfv(Light, Pname, Params) -> 'ok' when Light :: enum(),Pname :: enum(),Params :: tuple().
lightfv(Light,Pname,Params) ->
cast(5207, <<Light:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link lightf/3}
--spec lightiv(Light, Pname, Params) -> ok when Light :: enum(),Pname :: enum(),Params :: tuple().
+-spec lightiv(Light, Pname, Params) -> 'ok' when Light :: enum(),Pname :: enum(),Params :: tuple().
lightiv(Light,Pname,Params) ->
cast(5208, <<Light:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -4452,26 +4452,26 @@ getLightiv(Light,Pname) ->
%% as in the RGBA case, determine how much above ambient the resulting index is.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml">external</a> documentation.
--spec lightModelf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+-spec lightModelf(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
lightModelf(Pname,Param) ->
cast(5211, <<Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link lightModelf/2}
--spec lightModeli(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+-spec lightModeli(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
lightModeli(Pname,Param) ->
cast(5212, <<Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link lightModelf/2}
--spec lightModelfv(Pname, Params) -> ok when Pname :: enum(),Params :: tuple().
+-spec lightModelfv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
lightModelfv(Pname,Params) ->
cast(5213, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link lightModelf/2}
--spec lightModeliv(Pname, Params) -> ok when Pname :: enum(),Params :: tuple().
+-spec lightModeliv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
lightModeliv(Pname,Params) ->
cast(5214, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
@@ -4539,26 +4539,26 @@ lightModeliv(Pname,Params) ->
%% of color index lighting.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml">external</a> documentation.
--spec materialf(Face, Pname, Param) -> ok when Face :: enum(),Pname :: enum(),Param :: float().
+-spec materialf(Face, Pname, Param) -> 'ok' when Face :: enum(),Pname :: enum(),Param :: float().
materialf(Face,Pname,Param) ->
cast(5215, <<Face:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link materialf/3}
--spec materiali(Face, Pname, Param) -> ok when Face :: enum(),Pname :: enum(),Param :: integer().
+-spec materiali(Face, Pname, Param) -> 'ok' when Face :: enum(),Pname :: enum(),Param :: integer().
materiali(Face,Pname,Param) ->
cast(5216, <<Face:?GLenum,Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link materialf/3}
--spec materialfv(Face, Pname, Params) -> ok when Face :: enum(),Pname :: enum(),Params :: tuple().
+-spec materialfv(Face, Pname, Params) -> 'ok' when Face :: enum(),Pname :: enum(),Params :: tuple().
materialfv(Face,Pname,Params) ->
cast(5217, <<Face:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link materialf/3}
--spec materialiv(Face, Pname, Params) -> ok when Face :: enum(),Pname :: enum(),Params :: tuple().
+-spec materialiv(Face, Pname, Params) -> 'ok' when Face :: enum(),Pname :: enum(),Params :: tuple().
materialiv(Face,Pname,Params) ->
cast(5218, <<Face:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -4629,7 +4629,7 @@ getMaterialiv(Face,Pname) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml">external</a> documentation.
--spec colorMaterial(Face, Mode) -> ok when Face :: enum(),Mode :: enum().
+-spec colorMaterial(Face, Mode) -> 'ok' when Face :: enum(),Mode :: enum().
colorMaterial(Face,Mode) ->
cast(5221, <<Face:?GLenum,Mode:?GLenum>>).
@@ -4651,7 +4651,7 @@ colorMaterial(Face,Mode) ->
%% the resulting image about the current raster position.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelZoom.xml">external</a> documentation.
--spec pixelZoom(Xfactor, Yfactor) -> ok when Xfactor :: float(),Yfactor :: float().
+-spec pixelZoom(Xfactor, Yfactor) -> 'ok' when Xfactor :: float(),Yfactor :: float().
pixelZoom(Xfactor,Yfactor) ->
cast(5222, <<Xfactor:?GLfloat,Yfactor:?GLfloat>>).
@@ -4839,13 +4839,13 @@ pixelZoom(Xfactor,Yfactor) ->
%% Boolean parameters are set to false if `Param' is 0 and true otherwise.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelStore.xml">external</a> documentation.
--spec pixelStoref(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+-spec pixelStoref(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
pixelStoref(Pname,Param) ->
cast(5223, <<Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link pixelStoref/2}
--spec pixelStorei(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+-spec pixelStorei(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
pixelStorei(Pname,Param) ->
cast(5224, <<Pname:?GLenum,Param:?GLint>>).
@@ -4997,13 +4997,13 @@ pixelStorei(Pname,Param) ->
%% is converted to floating point before being assigned to real-valued parameters.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml">external</a> documentation.
--spec pixelTransferf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+-spec pixelTransferf(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
pixelTransferf(Pname,Param) ->
cast(5225, <<Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link pixelTransferf/2}
--spec pixelTransferi(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+-spec pixelTransferi(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
pixelTransferi(Pname,Param) ->
cast(5226, <<Pname:?GLenum,Param:?GLint>>).
@@ -5086,21 +5086,21 @@ pixelTransferi(Pname,Param) ->
%% <td> A </td><td> 1 </td><td> 0 </td></tr></tbody></table>
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml">external</a> documentation.
--spec pixelMapfv(Map, Mapsize, Values) -> ok when Map :: enum(),Mapsize :: integer(),Values :: binary().
+-spec pixelMapfv(Map, Mapsize, Values) -> 'ok' when Map :: enum(),Mapsize :: integer(),Values :: binary().
pixelMapfv(Map,Mapsize,Values) ->
send_bin(Values),
cast(5227, <<Map:?GLenum,Mapsize:?GLsizei>>).
%% @doc
%% See {@link pixelMapfv/3}
--spec pixelMapuiv(Map, Mapsize, Values) -> ok when Map :: enum(),Mapsize :: integer(),Values :: binary().
+-spec pixelMapuiv(Map, Mapsize, Values) -> 'ok' when Map :: enum(),Mapsize :: integer(),Values :: binary().
pixelMapuiv(Map,Mapsize,Values) ->
send_bin(Values),
cast(5228, <<Map:?GLenum,Mapsize:?GLsizei>>).
%% @doc
%% See {@link pixelMapfv/3}
--spec pixelMapusv(Map, Mapsize, Values) -> ok when Map :: enum(),Mapsize :: integer(),Values :: binary().
+-spec pixelMapusv(Map, Mapsize, Values) -> 'ok' when Map :: enum(),Mapsize :: integer(),Values :: binary().
pixelMapusv(Map,Mapsize,Values) ->
send_bin(Values),
cast(5229, <<Map:?GLenum,Mapsize:?GLsizei>>).
@@ -5129,21 +5129,21 @@ pixelMapusv(Map,Mapsize,Values) ->
%% symbolic constant.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml">external</a> documentation.
--spec getPixelMapfv(Map, Values) -> ok when Map :: enum(),Values :: mem().
+-spec getPixelMapfv(Map, Values) -> 'ok' when Map :: enum(),Values :: mem().
getPixelMapfv(Map,Values) ->
send_bin(Values),
call(5230, <<Map:?GLenum>>).
%% @doc
%% See {@link getPixelMapfv/2}
--spec getPixelMapuiv(Map, Values) -> ok when Map :: enum(),Values :: mem().
+-spec getPixelMapuiv(Map, Values) -> 'ok' when Map :: enum(),Values :: mem().
getPixelMapuiv(Map,Values) ->
send_bin(Values),
call(5231, <<Map:?GLenum>>).
%% @doc
%% See {@link getPixelMapfv/2}
--spec getPixelMapusv(Map, Values) -> ok when Map :: enum(),Values :: mem().
+-spec getPixelMapusv(Map, Values) -> 'ok' when Map :: enum(),Values :: mem().
getPixelMapusv(Map,Values) ->
send_bin(Values),
call(5232, <<Map:?GLenum>>).
@@ -5191,7 +5191,7 @@ getPixelMapusv(Map,Values) ->
%% or index.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBitmap.xml">external</a> documentation.
--spec bitmap(Width, Height, Xorig, Yorig, Xmove, Ymove, Bitmap) -> ok when Width :: integer(),Height :: integer(),Xorig :: float(),Yorig :: float(),Xmove :: float(),Ymove :: float(),Bitmap :: offset()|mem().
+-spec bitmap(Width, Height, Xorig, Yorig, Xmove, Ymove, Bitmap) -> 'ok' when Width :: integer(),Height :: integer(),Xorig :: float(),Yorig :: float(),Xmove :: float(),Ymove :: float(),Bitmap :: offset()|mem().
bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) when is_integer(Bitmap) ->
cast(5233, <<Width:?GLsizei,Height:?GLsizei,Xorig:?GLfloat,Yorig:?GLfloat,Xmove:?GLfloat,Ymove:?GLfloat,Bitmap:?GLuint>>);
bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) ->
@@ -5292,7 +5292,7 @@ bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) ->
%% data is written into memory. See {@link gl:pixelStoref/2} for a description.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml">external</a> documentation.
--spec readPixels(X, Y, Width, Height, Format, Type, Pixels) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
+-spec readPixels(X, Y, Width, Height, Format, Type, Pixels) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
readPixels(X,Y,Width,Height,Format,Type,Pixels) ->
send_bin(Pixels),
call(5235, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum>>).
@@ -5537,7 +5537,7 @@ readPixels(X,Y,Width,Height,Format,Type,Pixels) ->
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawPixels.xml">external</a> documentation.
--spec drawPixels(Width, Height, Format, Type, Pixels) -> ok when Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec drawPixels(Width, Height, Format, Type, Pixels) -> 'ok' when Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
drawPixels(Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5236, <<Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
drawPixels(Width,Height,Format,Type,Pixels) ->
@@ -5644,7 +5644,7 @@ drawPixels(Width,Height,Format,Type,Pixels) ->
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyPixels.xml">external</a> documentation.
--spec copyPixels(X, Y, Width, Height, Type) -> ok when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Type :: enum().
+-spec copyPixels(X, Y, Width, Height, Type) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Type :: enum().
copyPixels(X,Y,Width,Height,Type) ->
cast(5238, <<X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Type:?GLenum>>).
@@ -5707,7 +5707,7 @@ copyPixels(X,Y,Width,Height,Type) ->
%% `?GL_ALWAYS': Always passes.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml">external</a> documentation.
--spec stencilFunc(Func, Ref, Mask) -> ok when Func :: enum(),Ref :: integer(),Mask :: integer().
+-spec stencilFunc(Func, Ref, Mask) -> 'ok' when Func :: enum(),Ref :: integer(),Mask :: integer().
stencilFunc(Func,Ref,Mask) ->
cast(5239, <<Func:?GLenum,Ref:?GLint,Mask:?GLuint>>).
@@ -5725,7 +5725,7 @@ stencilFunc(Func,Ref,Mask) ->
%% to set front and back stencil writemasks to different values.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml">external</a> documentation.
--spec stencilMask(Mask) -> ok when Mask :: integer().
+-spec stencilMask(Mask) -> 'ok' when Mask :: integer().
stencilMask(Mask) ->
cast(5240, <<Mask:?GLuint>>).
@@ -5786,7 +5786,7 @@ stencilMask(Mask) ->
%% stencil action when the stencil test fails and passes, respectively.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml">external</a> documentation.
--spec stencilOp(Fail, Zfail, Zpass) -> ok when Fail :: enum(),Zfail :: enum(),Zpass :: enum().
+-spec stencilOp(Fail, Zfail, Zpass) -> 'ok' when Fail :: enum(),Zfail :: enum(),Zpass :: enum().
stencilOp(Fail,Zfail,Zpass) ->
cast(5241, <<Fail:?GLenum,Zfail:?GLenum,Zpass:?GLenum>>).
@@ -5797,7 +5797,7 @@ stencilOp(Fail,Zfail,Zpass) ->
%% buffer.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearStencil.xml">external</a> documentation.
--spec clearStencil(S) -> ok when S :: integer().
+-spec clearStencil(S) -> 'ok' when S :: integer().
clearStencil(S) ->
cast(5242, <<S:?GLint>>).
@@ -5876,39 +5876,39 @@ clearStencil(S) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml">external</a> documentation.
--spec texGend(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: float().
+-spec texGend(Coord, Pname, Param) -> 'ok' when Coord :: enum(),Pname :: enum(),Param :: float().
texGend(Coord,Pname,Param) ->
cast(5243, <<Coord:?GLenum,Pname:?GLenum,Param:?GLdouble>>).
%% @doc
%% See {@link texGend/3}
--spec texGenf(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: float().
+-spec texGenf(Coord, Pname, Param) -> 'ok' when Coord :: enum(),Pname :: enum(),Param :: float().
texGenf(Coord,Pname,Param) ->
cast(5244, <<Coord:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link texGend/3}
--spec texGeni(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: integer().
+-spec texGeni(Coord, Pname, Param) -> 'ok' when Coord :: enum(),Pname :: enum(),Param :: integer().
texGeni(Coord,Pname,Param) ->
cast(5245, <<Coord:?GLenum,Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link texGend/3}
--spec texGendv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: tuple().
+-spec texGendv(Coord, Pname, Params) -> 'ok' when Coord :: enum(),Pname :: enum(),Params :: tuple().
texGendv(Coord,Pname,Params) ->
cast(5246, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,0:32,
(<< <<C:?GLdouble>> ||C <- tuple_to_list(Params)>>)/binary>>).
%% @doc
%% See {@link texGend/3}
--spec texGenfv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: tuple().
+-spec texGenfv(Coord, Pname, Params) -> 'ok' when Coord :: enum(),Pname :: enum(),Params :: tuple().
texGenfv(Coord,Pname,Params) ->
cast(5247, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link texGend/3}
--spec texGeniv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: tuple().
+-spec texGeniv(Coord, Pname, Params) -> 'ok' when Coord :: enum(),Pname :: enum(),Params :: tuple().
texGeniv(Coord,Pname,Params) ->
cast(5248, <<Coord:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -5955,14 +5955,14 @@ getTexGeniv(Coord,Pname) ->
%% @doc glTexEnvf
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnvf.xml">external</a> documentation.
--spec texEnvf(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: float().
+-spec texEnvf(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: float().
texEnvf(Target,Pname,Param) ->
cast(5252, <<Target:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
%% @doc glTexEnvi
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnvi.xml">external</a> documentation.
--spec texEnvi(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: integer().
+-spec texEnvi(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: integer().
texEnvi(Target,Pname,Param) ->
cast(5253, <<Target:?GLenum,Pname:?GLenum,Param:?GLint>>).
@@ -6127,14 +6127,14 @@ texEnvi(Target,Pname,Param) ->
%% replacement. The default value is `?GL_FALSE'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml">external</a> documentation.
--spec texEnvfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec texEnvfv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texEnvfv(Target,Pname,Params) ->
cast(5254, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link texEnvfv/3}
--spec texEnviv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec texEnviv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texEnviv(Target,Pname,Params) ->
cast(5255, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -6447,26 +6447,26 @@ getTexEnviv(Target,Pname) ->
%% to `?GL_REPEAT'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml">external</a> documentation.
--spec texParameterf(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: float().
+-spec texParameterf(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: float().
texParameterf(Target,Pname,Param) ->
cast(5258, <<Target:?GLenum,Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link texParameterf/3}
--spec texParameteri(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: integer().
+-spec texParameteri(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: integer().
texParameteri(Target,Pname,Param) ->
cast(5259, <<Target:?GLenum,Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link texParameterf/3}
--spec texParameterfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec texParameterfv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texParameterfv(Target,Pname,Params) ->
cast(5260, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link texParameterf/3}
--spec texParameteriv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec texParameteriv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texParameteriv(Target,Pname,Params) ->
cast(5261, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -6743,7 +6743,7 @@ getTexLevelParameteriv(Target,Level,Pname) ->
%% comparison.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage1D.xml">external</a> documentation.
--spec texImage1D(Target, Level, InternalFormat, Width, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec texImage1D(Target, Level, InternalFormat, Width, Border, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5266, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) ->
@@ -6865,7 +6865,7 @@ texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) ->
%% comparison.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml">external</a> documentation.
--spec texImage2D(Target, Level, InternalFormat, Width, Height, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec texImage2D(Target, Level, InternalFormat, Width, Height, Border, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5268, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) ->
@@ -6910,7 +6910,7 @@ texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) -
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetTexImage.xml">external</a> documentation.
--spec getTexImage(Target, Level, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
+-spec getTexImage(Target, Level, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
getTexImage(Target,Level,Format,Type,Pixels) ->
send_bin(Pixels),
call(5270, <<Target:?GLenum,Level:?GLint,Format:?GLenum,Type:?GLenum>>).
@@ -6943,7 +6943,7 @@ genTextures(N) ->
%% textures.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTextures.xml">external</a> documentation.
--spec deleteTextures(Textures) -> ok when Textures :: [integer()].
+-spec deleteTextures(Textures) -> 'ok' when Textures :: [integer()].
deleteTextures(Textures) ->
cast(5272, <<(length(Textures)):?GLuint,
(<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>).
@@ -6995,7 +6995,7 @@ deleteTextures(Textures) ->
%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} or another similar function.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindTexture.xml">external</a> documentation.
--spec bindTexture(Target, Texture) -> ok when Target :: enum(),Texture :: integer().
+-spec bindTexture(Target, Texture) -> 'ok' when Target :: enum(),Texture :: integer().
bindTexture(Target,Texture) ->
cast(5273, <<Target:?GLenum,Texture:?GLuint>>).
@@ -7024,7 +7024,7 @@ bindTexture(Target,Texture) ->
%% priority of a default texture.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPrioritizeTextures.xml">external</a> documentation.
--spec prioritizeTextures(Textures, Priorities) -> ok when Textures :: [integer()],Priorities :: [clamp()].
+-spec prioritizeTextures(Textures, Priorities) -> 'ok' when Textures :: [integer()],Priorities :: [clamp()].
prioritizeTextures(Textures,Priorities) ->
cast(5274, <<(length(Textures)):?GLuint,
(<< <<C:?GLuint>> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32),(length(Priorities)):?GLuint,
@@ -7072,7 +7072,7 @@ isTexture(Texture) ->
%% @doc glTexSubImage
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage.xml">external</a> documentation.
--spec texSubImage1D(Target, Level, Xoffset, Width, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec texSubImage1D(Target, Level, Xoffset, Width, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5277, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) ->
@@ -7082,7 +7082,7 @@ texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) ->
%% @doc glTexSubImage
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage.xml">external</a> documentation.
--spec texSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec texSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5279, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) ->
@@ -7118,7 +7118,7 @@ texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) ->
%% can be used to accomplish the conversion.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage1D.xml">external</a> documentation.
--spec copyTexImage1D(Target, Level, Internalformat, X, Y, Width, Border) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Border :: integer().
+-spec copyTexImage1D(Target, Level, Internalformat, X, Y, Width, Border) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Border :: integer().
copyTexImage1D(Target,Level,Internalformat,X,Y,Width,Border) ->
cast(5281, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Border:?GLint>>).
@@ -7149,7 +7149,7 @@ copyTexImage1D(Target,Level,Internalformat,X,Y,Width,Border) ->
%% can be used to accomplish the conversion.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml">external</a> documentation.
--spec copyTexImage2D(Target, Level, Internalformat, X, Y, Width, Height, Border) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Border :: integer().
+-spec copyTexImage2D(Target, Level, Internalformat, X, Y, Width, Height, Border) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Border :: integer().
copyTexImage2D(Target,Level,Internalformat,X,Y,Width,Height,Border) ->
cast(5282, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei,Border:?GLint>>).
@@ -7178,7 +7178,7 @@ copyTexImage2D(Target,Level,Internalformat,X,Y,Width,Height,Border) ->
%% of the specified texture array or to texel values outside the specified subregion.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage1D.xml">external</a> documentation.
--spec copyTexSubImage1D(Target, Level, Xoffset, X, Y, Width) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer().
+-spec copyTexSubImage1D(Target, Level, Xoffset, X, Y, Width) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer().
copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) ->
cast(5283, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei>>).
@@ -7211,14 +7211,14 @@ copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage2D.xml">external</a> documentation.
--spec copyTexSubImage2D(Target, Level, Xoffset, Yoffset, X, Y, Width, Height) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+-spec copyTexSubImage2D(Target, Level, Xoffset, Yoffset, X, Y, Width, Height) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
copyTexSubImage2D(Target,Level,Xoffset,Yoffset,X,Y,Width,Height) ->
cast(5284, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
%% @doc glMap
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map1d(Target, U1, U2, Stride, Order, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
+-spec map1d(Target, U1, U2, Stride, Order, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
map1d(Target,U1,U2,Stride,Order,Points) ->
send_bin(Points),
cast(5285, <<Target:?GLenum,0:32,U1:?GLdouble,U2:?GLdouble,Stride:?GLint,Order:?GLint>>).
@@ -7226,7 +7226,7 @@ map1d(Target,U1,U2,Stride,Order,Points) ->
%% @doc glMap
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map1f(Target, U1, U2, Stride, Order, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
+-spec map1f(Target, U1, U2, Stride, Order, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
map1f(Target,U1,U2,Stride,Order,Points) ->
send_bin(Points),
cast(5286, <<Target:?GLenum,U1:?GLfloat,U2:?GLfloat,Stride:?GLint,Order:?GLint>>).
@@ -7234,7 +7234,7 @@ map1f(Target,U1,U2,Stride,Order,Points) ->
%% @doc glMap
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map2d(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
+-spec map2d(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
send_bin(Points),
cast(5287, <<Target:?GLenum,0:32,U1:?GLdouble,U2:?GLdouble,Ustride:?GLint,Uorder:?GLint,V1:?GLdouble,V2:?GLdouble,Vstride:?GLint,Vorder:?GLint>>).
@@ -7242,7 +7242,7 @@ map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
%% @doc glMap
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMap.xml">external</a> documentation.
--spec map2f(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> ok when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
+-spec map2f(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
send_bin(Points),
cast(5288, <<Target:?GLenum,U1:?GLfloat,U2:?GLfloat,Ustride:?GLint,Uorder:?GLint,V1:?GLfloat,V2:?GLfloat,Vstride:?GLint,Vorder:?GLint>>).
@@ -7278,21 +7278,21 @@ map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
%% to the nearest integer values.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml">external</a> documentation.
--spec getMapdv(Target, Query, V) -> ok when Target :: enum(),Query :: enum(),V :: mem().
+-spec getMapdv(Target, Query, V) -> 'ok' when Target :: enum(),Query :: enum(),V :: mem().
getMapdv(Target,Query,V) ->
send_bin(V),
call(5289, <<Target:?GLenum,Query:?GLenum>>).
%% @doc
%% See {@link getMapdv/3}
--spec getMapfv(Target, Query, V) -> ok when Target :: enum(),Query :: enum(),V :: mem().
+-spec getMapfv(Target, Query, V) -> 'ok' when Target :: enum(),Query :: enum(),V :: mem().
getMapfv(Target,Query,V) ->
send_bin(V),
call(5290, <<Target:?GLenum,Query:?GLenum>>).
%% @doc
%% See {@link getMapdv/3}
--spec getMapiv(Target, Query, V) -> ok when Target :: enum(),Query :: enum(),V :: mem().
+-spec getMapiv(Target, Query, V) -> 'ok' when Target :: enum(),Query :: enum(),V :: mem().
getMapiv(Target,Query,V) ->
send_bin(V),
call(5291, <<Target:?GLenum,Query:?GLenum>>).
@@ -7343,42 +7343,42 @@ getMapiv(Target,Query,V) ->
%% a normal map is enabled, no normal is generated for ``gl:evalCoord2'' commands.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml">external</a> documentation.
--spec evalCoord1d(U) -> ok when U :: float().
+-spec evalCoord1d(U) -> 'ok' when U :: float().
evalCoord1d(U) ->
cast(5292, <<U:?GLdouble>>).
%% @doc
%% See {@link evalCoord1d/1}
--spec evalCoord1f(U) -> ok when U :: float().
+-spec evalCoord1f(U) -> 'ok' when U :: float().
evalCoord1f(U) ->
cast(5293, <<U:?GLfloat>>).
%% @equiv evalCoord1d(U)
--spec evalCoord1dv(U) -> ok when U :: {U :: float()}.
+-spec evalCoord1dv(U) -> 'ok' when U :: {U :: float()}.
evalCoord1dv({U}) -> evalCoord1d(U).
%% @equiv evalCoord1f(U)
--spec evalCoord1fv(U) -> ok when U :: {U :: float()}.
+-spec evalCoord1fv(U) -> 'ok' when U :: {U :: float()}.
evalCoord1fv({U}) -> evalCoord1f(U).
%% @doc
%% See {@link evalCoord1d/1}
--spec evalCoord2d(U, V) -> ok when U :: float(),V :: float().
+-spec evalCoord2d(U, V) -> 'ok' when U :: float(),V :: float().
evalCoord2d(U,V) ->
cast(5294, <<U:?GLdouble,V:?GLdouble>>).
%% @doc
%% See {@link evalCoord1d/1}
--spec evalCoord2f(U, V) -> ok when U :: float(),V :: float().
+-spec evalCoord2f(U, V) -> 'ok' when U :: float(),V :: float().
evalCoord2f(U,V) ->
cast(5295, <<U:?GLfloat,V:?GLfloat>>).
%% @equiv evalCoord2d(U,V)
--spec evalCoord2dv(U) -> ok when U :: {U :: float(),V :: float()}.
+-spec evalCoord2dv(U) -> 'ok' when U :: {U :: float(),V :: float()}.
evalCoord2dv({U,V}) -> evalCoord2d(U,V).
%% @equiv evalCoord2f(U,V)
--spec evalCoord2fv(U) -> ok when U :: {U :: float(),V :: float()}.
+-spec evalCoord2fv(U) -> 'ok' when U :: {U :: float(),V :: float()}.
evalCoord2fv({U,V}) -> evalCoord2f(U,V).
%% @doc Define a one- or two-dimensional mesh
@@ -7413,25 +7413,25 @@ evalCoord2fv({U,V}) -> evalCoord2f(U,V).
%% and {@link gl:evalPoint1/1} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml">external</a> documentation.
--spec mapGrid1d(Un, U1, U2) -> ok when Un :: integer(),U1 :: float(),U2 :: float().
+-spec mapGrid1d(Un, U1, U2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float().
mapGrid1d(Un,U1,U2) ->
cast(5296, <<Un:?GLint,0:32,U1:?GLdouble,U2:?GLdouble>>).
%% @doc
%% See {@link mapGrid1d/3}
--spec mapGrid1f(Un, U1, U2) -> ok when Un :: integer(),U1 :: float(),U2 :: float().
+-spec mapGrid1f(Un, U1, U2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float().
mapGrid1f(Un,U1,U2) ->
cast(5297, <<Un:?GLint,U1:?GLfloat,U2:?GLfloat>>).
%% @doc
%% See {@link mapGrid1d/3}
--spec mapGrid2d(Un, U1, U2, Vn, V1, V2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
+-spec mapGrid2d(Un, U1, U2, Vn, V1, V2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
mapGrid2d(Un,U1,U2,Vn,V1,V2) ->
cast(5298, <<Un:?GLint,0:32,U1:?GLdouble,U2:?GLdouble,Vn:?GLint,0:32,V1:?GLdouble,V2:?GLdouble>>).
%% @doc
%% See {@link mapGrid1d/3}
--spec mapGrid2f(Un, U1, U2, Vn, V1, V2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
+-spec mapGrid2f(Un, U1, U2, Vn, V1, V2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
mapGrid2f(Un,U1,U2,Vn,V1,V2) ->
cast(5299, <<Un:?GLint,U1:?GLfloat,U2:?GLfloat,Vn:?GLint,V1:?GLfloat,V2:?GLfloat>>).
@@ -7460,13 +7460,13 @@ mapGrid2f(Un,U1,U2,Vn,V1,V2) ->
%% if j=m, then the value computed from j.&amp;Delta; v+v 1 is exactly v 2.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalPoint.xml">external</a> documentation.
--spec evalPoint1(I) -> ok when I :: integer().
+-spec evalPoint1(I) -> 'ok' when I :: integer().
evalPoint1(I) ->
cast(5300, <<I:?GLint>>).
%% @doc
%% See {@link evalPoint1/1}
--spec evalPoint2(I, J) -> ok when I :: integer(),J :: integer().
+-spec evalPoint2(I, J) -> 'ok' when I :: integer(),J :: integer().
evalPoint2(I,J) ->
cast(5301, <<I:?GLint,J:?GLint>>).
@@ -7525,13 +7525,13 @@ evalPoint2(I,J) ->
%% computed from j.&amp;Delta; v+v 1 is exactly v 2.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEvalMesh.xml">external</a> documentation.
--spec evalMesh1(Mode, I1, I2) -> ok when Mode :: enum(),I1 :: integer(),I2 :: integer().
+-spec evalMesh1(Mode, I1, I2) -> 'ok' when Mode :: enum(),I1 :: integer(),I2 :: integer().
evalMesh1(Mode,I1,I2) ->
cast(5302, <<Mode:?GLenum,I1:?GLint,I2:?GLint>>).
%% @doc
%% See {@link evalMesh1/3}
--spec evalMesh2(Mode, I1, I2, J1, J2) -> ok when Mode :: enum(),I1 :: integer(),I2 :: integer(),J1 :: integer(),J2 :: integer().
+-spec evalMesh2(Mode, I1, I2, J1, J2) -> 'ok' when Mode :: enum(),I1 :: integer(),I2 :: integer(),J1 :: integer(),J2 :: integer().
evalMesh2(Mode,I1,I2,J1,J2) ->
cast(5303, <<Mode:?GLenum,I1:?GLint,I2:?GLint,J1:?GLint,J2:?GLint>>).
@@ -7601,26 +7601,26 @@ evalMesh2(Mode,I1,I2,J1,J2) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml">external</a> documentation.
--spec fogf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+-spec fogf(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
fogf(Pname,Param) ->
cast(5304, <<Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link fogf/2}
--spec fogi(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+-spec fogi(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
fogi(Pname,Param) ->
cast(5305, <<Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link fogf/2}
--spec fogfv(Pname, Params) -> ok when Pname :: enum(),Params :: tuple().
+-spec fogfv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
fogfv(Pname,Params) ->
cast(5306, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link fogf/2}
--spec fogiv(Pname, Params) -> ok when Pname :: enum(),Params :: tuple().
+-spec fogiv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
fogiv(Pname,Params) ->
cast(5307, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
@@ -7733,7 +7733,7 @@ fogiv(Pname,Params) ->
%% by the texture matrix.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFeedbackBuffer.xml">external</a> documentation.
--spec feedbackBuffer(Size, Type, Buffer) -> ok when Size :: integer(),Type :: enum(),Buffer :: mem().
+-spec feedbackBuffer(Size, Type, Buffer) -> 'ok' when Size :: integer(),Type :: enum(),Buffer :: mem().
feedbackBuffer(Size,Type,Buffer) ->
send_bin(Buffer),
call(5308, <<Size:?GLsizei,Type:?GLenum>>).
@@ -7752,7 +7752,7 @@ feedbackBuffer(Size,Type,Buffer) ->
%% commands with respect to the specification of graphics primitives is maintained.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPassThrough.xml">external</a> documentation.
--spec passThrough(Token) -> ok when Token :: float().
+-spec passThrough(Token) -> 'ok' when Token :: float().
passThrough(Token) ->
cast(5309, <<Token:?GLfloat>>).
@@ -7797,7 +7797,7 @@ passThrough(Token) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml">external</a> documentation.
--spec selectBuffer(Size, Buffer) -> ok when Size :: integer(),Buffer :: mem().
+-spec selectBuffer(Size, Buffer) -> 'ok' when Size :: integer(),Buffer :: mem().
selectBuffer(Size,Buffer) ->
send_bin(Buffer),
call(5310, <<Size:?GLsizei>>).
@@ -7812,7 +7812,7 @@ selectBuffer(Size,Buffer) ->
%% while the render mode is not `?GL_SELECT' are ignored.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glInitNames.xml">external</a> documentation.
--spec initNames() -> ok.
+-spec initNames() -> 'ok'.
initNames() ->
cast(5311, <<>>).
@@ -7828,7 +7828,7 @@ initNames() ->
%% while the render mode is not `?GL_SELECT' are ignored.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadName.xml">external</a> documentation.
--spec loadName(Name) -> ok when Name :: integer().
+-spec loadName(Name) -> 'ok' when Name :: integer().
loadName(Name) ->
cast(5312, <<Name:?GLuint>>).
@@ -7852,13 +7852,13 @@ loadName(Name) ->
%% or {@link gl:pushName/1} while the render mode is not `?GL_SELECT' are ignored.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPushName.xml">external</a> documentation.
--spec pushName(Name) -> ok when Name :: integer().
+-spec pushName(Name) -> 'ok' when Name :: integer().
pushName(Name) ->
cast(5313, <<Name:?GLuint>>).
%% @doc
%% See {@link pushName/1}
--spec popName() -> ok.
+-spec popName() -> 'ok'.
popName() ->
cast(5314, <<>>).
@@ -7870,7 +7870,7 @@ popName() ->
%% is set to (0, 0, 0, 0).
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendColor.xml">external</a> documentation.
--spec blendColor(Red, Green, Blue, Alpha) -> ok when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
+-spec blendColor(Red, Green, Blue, Alpha) -> 'ok' when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
blendColor(Red,Green,Blue,Alpha) ->
cast(5315, <<Red:?GLclampf,Green:?GLclampf,Blue:?GLclampf,Alpha:?GLclampf>>).
@@ -7911,7 +7911,7 @@ blendColor(Red,Green,Blue,Alpha) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml">external</a> documentation.
--spec blendEquation(Mode) -> ok when Mode :: enum().
+-spec blendEquation(Mode) -> 'ok' when Mode :: enum().
blendEquation(Mode) ->
cast(5316, <<Mode:?GLenum>>).
@@ -7940,7 +7940,7 @@ blendEquation(Mode) ->
%% their previous values.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElements.xml">external</a> documentation.
--spec drawRangeElements(Mode, Start, End, Count, Type, Indices) -> ok when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
+-spec drawRangeElements(Mode, Start, End, Count, Type, Indices) -> 'ok' when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
drawRangeElements(Mode,Start,End,Count,Type,Indices) when is_integer(Indices) ->
cast(5317, <<Mode:?GLenum,Start:?GLuint,End:?GLuint,Count:?GLsizei,Type:?GLenum,Indices:?GLuint>>);
drawRangeElements(Mode,Start,End,Count,Type,Indices) ->
@@ -8048,7 +8048,7 @@ drawRangeElements(Mode,Start,End,Count,Type,Indices) ->
%% uses the R, G, and B values. A four-component image uses all of the RGBA components.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3D.xml">external</a> documentation.
--spec texImage3D(Target, Level, InternalFormat, Width, Height, Depth, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec texImage3D(Target, Level, InternalFormat, Width, Height, Depth, Border, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5319, <<Target:?GLenum,Level:?GLint,InternalFormat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pixels) ->
@@ -8058,7 +8058,7 @@ texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pix
%% @doc glTexSubImage
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexSubImage.xml">external</a> documentation.
--spec texSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
+-spec texSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5321, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,Type:?GLenum,Pixels:?GLuint>>);
texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) ->
@@ -8095,7 +8095,7 @@ texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Typ
%% the specified subregion.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage3D.xml">external</a> documentation.
--spec copyTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, X, Y, Width, Height) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+-spec copyTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, X, Y, Width, Height) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
copyTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,X,Y,Width,Height) ->
cast(5323, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
@@ -8195,7 +8195,7 @@ copyTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,X,Y,Width,Height) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTable.xml">external</a> documentation.
--spec colorTable(Target, Internalformat, Width, Format, Type, Table) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Table :: offset()|mem().
+-spec colorTable(Target, Internalformat, Width, Format, Type, Table) -> 'ok' when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Table :: offset()|mem().
colorTable(Target,Internalformat,Width,Format,Type,Table) when is_integer(Table) ->
cast(5324, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Table:?GLuint>>);
colorTable(Target,Internalformat,Width,Format,Type,Table) ->
@@ -8220,13 +8220,13 @@ colorTable(Target,Internalformat,Width,Format,Type,Table) ->
%% The color tables themselves are specified by calling {@link gl:colorTable/6} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorTableParameter.xml">external</a> documentation.
--spec colorTableParameterfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float(),float(),float(),float()}.
+-spec colorTableParameterfv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: {float(),float(),float(),float()}.
colorTableParameterfv(Target,Pname,{P1,P2,P3,P4}) ->
cast(5326, <<Target:?GLenum,Pname:?GLenum,P1:?GLfloat,P2:?GLfloat,P3:?GLfloat,P4:?GLfloat>>).
%% @doc
%% See {@link colorTableParameterfv/3}
--spec colorTableParameteriv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer(),integer(),integer(),integer()}.
+-spec colorTableParameteriv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: {integer(),integer(),integer(),integer()}.
colorTableParameteriv(Target,Pname,{P1,P2,P3,P4}) ->
cast(5327, <<Target:?GLenum,Pname:?GLenum,P1:?GLint,P2:?GLint,P3:?GLint,P4:?GLint>>).
@@ -8270,7 +8270,7 @@ colorTableParameteriv(Target,Pname,{P1,P2,P3,P4}) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyColorTable.xml">external</a> documentation.
--spec copyColorTable(Target, Internalformat, X, Y, Width) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer().
+-spec copyColorTable(Target, Internalformat, X, Y, Width) -> 'ok' when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer().
copyColorTable(Target,Internalformat,X,Y,Width) ->
cast(5328, <<Target:?GLenum,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei>>).
@@ -8295,7 +8295,7 @@ copyColorTable(Target,Internalformat,X,Y,Width) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetColorTable.xml">external</a> documentation.
--spec getColorTable(Target, Format, Type, Table) -> ok when Target :: enum(),Format :: enum(),Type :: enum(),Table :: mem().
+-spec getColorTable(Target, Format, Type, Table) -> 'ok' when Target :: enum(),Format :: enum(),Type :: enum(),Table :: mem().
getColorTable(Target,Format,Type,Table) ->
send_bin(Table),
call(5329, <<Target:?GLenum,Format:?GLenum,Type:?GLenum>>).
@@ -8358,7 +8358,7 @@ getColorTableParameteriv(Target,Pname) ->
%% is treated as a byte offset into the buffer object's data store.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorSubTable.xml">external</a> documentation.
--spec colorSubTable(Target, Start, Count, Format, Type, Data) -> ok when Target :: enum(),Start :: integer(),Count :: integer(),Format :: enum(),Type :: enum(),Data :: offset()|mem().
+-spec colorSubTable(Target, Start, Count, Format, Type, Data) -> 'ok' when Target :: enum(),Start :: integer(),Count :: integer(),Format :: enum(),Type :: enum(),Data :: offset()|mem().
colorSubTable(Target,Start,Count,Format,Type,Data) when is_integer(Data) ->
cast(5332, <<Target:?GLenum,Start:?GLsizei,Count:?GLsizei,Format:?GLenum,Type:?GLenum,Data:?GLuint>>);
colorSubTable(Target,Start,Count,Format,Type,Data) ->
@@ -8375,7 +8375,7 @@ colorSubTable(Target,Start,Count,Format,Type,Data) ->
%% has no effect.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyColorSubTable.xml">external</a> documentation.
--spec copyColorSubTable(Target, Start, X, Y, Width) -> ok when Target :: enum(),Start :: integer(),X :: integer(),Y :: integer(),Width :: integer().
+-spec copyColorSubTable(Target, Start, X, Y, Width) -> 'ok' when Target :: enum(),Start :: integer(),X :: integer(),Y :: integer(),Width :: integer().
copyColorSubTable(Target,Start,X,Y,Width) ->
cast(5334, <<Target:?GLenum,Start:?GLsizei,X:?GLint,Y:?GLint,Width:?GLsizei>>).
@@ -8428,7 +8428,7 @@ copyColorSubTable(Target,Start,X,Y,Width) ->
%% set by {@link gl:pixelTransferf/2} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionFilter1D.xml">external</a> documentation.
--spec convolutionFilter1D(Target, Internalformat, Width, Format, Type, Image) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem().
+-spec convolutionFilter1D(Target, Internalformat, Width, Format, Type, Image) -> 'ok' when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem().
convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) when is_integer(Image) ->
cast(5335, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Format:?GLenum,Type:?GLenum,Image:?GLuint>>);
convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) ->
@@ -8485,7 +8485,7 @@ convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) ->
%% set by {@link gl:pixelTransferf/2} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionFilter2D.xml">external</a> documentation.
--spec convolutionFilter2D(Target, Internalformat, Width, Height, Format, Type, Image) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem().
+-spec convolutionFilter2D(Target, Internalformat, Width, Height, Format, Type, Image) -> 'ok' when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem().
convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) when is_integer(Image) ->
cast(5337, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Image:?GLuint>>);
convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) ->
@@ -8526,24 +8526,24 @@ convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) ->
%% image were replicated.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glConvolutionParameter.xml">external</a> documentation.
--spec convolutionParameterf(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec convolutionParameterf(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
convolutionParameterf(Target,Pname,Params) ->
cast(5339, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @equiv convolutionParameterf(Target,Pname,Params)
--spec convolutionParameterfv(Target :: enum(),Pname :: enum(),Params) -> ok when Params :: {Params :: tuple()}.
+-spec convolutionParameterfv(Target :: enum(),Pname :: enum(),Params) -> 'ok' when Params :: {Params :: tuple()}.
convolutionParameterfv(Target,Pname,{Params}) -> convolutionParameterf(Target,Pname,Params).
%% @doc
%% See {@link convolutionParameterf/3}
--spec convolutionParameteri(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec convolutionParameteri(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
convolutionParameteri(Target,Pname,Params) ->
cast(5340, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @equiv convolutionParameteri(Target,Pname,Params)
--spec convolutionParameteriv(Target :: enum(),Pname :: enum(),Params) -> ok when Params :: {Params :: tuple()}.
+-spec convolutionParameteriv(Target :: enum(),Pname :: enum(),Params) -> 'ok' when Params :: {Params :: tuple()}.
convolutionParameteriv(Target,Pname,{Params}) -> convolutionParameteri(Target,Pname,Params).
%% @doc Copy pixels into a one-dimensional convolution filter
@@ -8595,7 +8595,7 @@ convolutionParameteriv(Target,Pname,{Params}) -> convolutionParameteri(Target,P
%% set by {@link gl:pixelTransferf/2} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyConvolutionFilter1D.xml">external</a> documentation.
--spec copyConvolutionFilter1D(Target, Internalformat, X, Y, Width) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer().
+-spec copyConvolutionFilter1D(Target, Internalformat, X, Y, Width) -> 'ok' when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer().
copyConvolutionFilter1D(Target,Internalformat,X,Y,Width) ->
cast(5341, <<Target:?GLenum,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei>>).
@@ -8649,7 +8649,7 @@ copyConvolutionFilter1D(Target,Internalformat,X,Y,Width) ->
%% set by {@link gl:pixelTransferf/2} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyConvolutionFilter2D.xml">external</a> documentation.
--spec copyConvolutionFilter2D(Target, Internalformat, X, Y, Width, Height) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
+-spec copyConvolutionFilter2D(Target, Internalformat, X, Y, Width, Height) -> 'ok' when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
copyConvolutionFilter2D(Target,Internalformat,X,Y,Width,Height) ->
cast(5342, <<Target:?GLenum,Internalformat:?GLenum,X:?GLint,Y:?GLint,Width:?GLsizei,Height:?GLsizei>>).
@@ -8675,7 +8675,7 @@ copyConvolutionFilter2D(Target,Internalformat,X,Y,Width,Height) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetConvolutionFilter.xml">external</a> documentation.
--spec getConvolutionFilter(Target, Format, Type, Image) -> ok when Target :: enum(),Format :: enum(),Type :: enum(),Image :: mem().
+-spec getConvolutionFilter(Target, Format, Type, Image) -> 'ok' when Target :: enum(),Format :: enum(),Type :: enum(),Image :: mem().
getConvolutionFilter(Target,Format,Type,Image) ->
send_bin(Image),
call(5343, <<Target:?GLenum,Format:?GLenum,Type:?GLenum>>).
@@ -8775,7 +8775,7 @@ getConvolutionParameteriv(Target,Pname) ->
%% set by {@link gl:pixelTransferf/2} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSeparableFilter2D.xml">external</a> documentation.
--spec separableFilter2D(Target, Internalformat, Width, Height, Format, Type, Row, Column) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Row :: offset()|mem(),Column :: offset()|mem().
+-spec separableFilter2D(Target, Internalformat, Width, Height, Format, Type, Row, Column) -> 'ok' when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Row :: offset()|mem(),Column :: offset()|mem().
separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) when is_integer(Row), is_integer(Column) ->
cast(5346, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,Type:?GLenum,Row:?GLuint,Column:?GLuint>>);
separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) ->
@@ -8804,7 +8804,7 @@ separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetHistogram.xml">external</a> documentation.
--spec getHistogram(Target, Reset, Format, Type, Values) -> ok when Target :: enum(),Reset :: 0|1,Format :: enum(),Type :: enum(),Values :: mem().
+-spec getHistogram(Target, Reset, Format, Type, Values) -> 'ok' when Target :: enum(),Reset :: 0|1,Format :: enum(),Type :: enum(),Values :: mem().
getHistogram(Target,Reset,Format,Type,Values) ->
send_bin(Values),
call(5348, <<Target:?GLenum,Reset:?GLboolean,0:24,Format:?GLenum,Type:?GLenum>>).
@@ -8868,7 +8868,7 @@ getHistogramParameteriv(Target,Pname) ->
%% are not modified, even if `Reset' is `?GL_TRUE'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetMinmax.xml">external</a> documentation.
--spec getMinmax(Target, Reset, Format, Types, Values) -> ok when Target :: enum(),Reset :: 0|1,Format :: enum(),Types :: enum(),Values :: mem().
+-spec getMinmax(Target, Reset, Format, Types, Values) -> 'ok' when Target :: enum(),Reset :: 0|1,Format :: enum(),Types :: enum(),Values :: mem().
getMinmax(Target,Reset,Format,Types,Values) ->
send_bin(Values),
call(5351, <<Target:?GLenum,Reset:?GLboolean,0:24,Format:?GLenum,Types:?GLenum>>).
@@ -8926,7 +8926,7 @@ getMinmaxParameteriv(Target,Pname) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glHistogram.xml">external</a> documentation.
--spec histogram(Target, Width, Internalformat, Sink) -> ok when Target :: enum(),Width :: integer(),Internalformat :: enum(),Sink :: 0|1.
+-spec histogram(Target, Width, Internalformat, Sink) -> 'ok' when Target :: enum(),Width :: integer(),Internalformat :: enum(),Sink :: 0|1.
histogram(Target,Width,Internalformat,Sink) ->
cast(5354, <<Target:?GLenum,Width:?GLsizei,Internalformat:?GLenum,Sink:?GLboolean>>).
@@ -8955,7 +8955,7 @@ histogram(Target,Width,Internalformat,Sink) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMinmax.xml">external</a> documentation.
--spec minmax(Target, Internalformat, Sink) -> ok when Target :: enum(),Internalformat :: enum(),Sink :: 0|1.
+-spec minmax(Target, Internalformat, Sink) -> 'ok' when Target :: enum(),Internalformat :: enum(),Sink :: 0|1.
minmax(Target,Internalformat,Sink) ->
cast(5355, <<Target:?GLenum,Internalformat:?GLenum,Sink:?GLboolean>>).
@@ -8964,7 +8964,7 @@ minmax(Target,Internalformat,Sink) ->
%% ``gl:resetHistogram'' resets all the elements of the current histogram table to zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResetHistogram.xml">external</a> documentation.
--spec resetHistogram(Target) -> ok when Target :: enum().
+-spec resetHistogram(Target) -> 'ok' when Target :: enum().
resetHistogram(Target) ->
cast(5356, <<Target:?GLenum>>).
@@ -8975,7 +8975,7 @@ resetHistogram(Target) ->
%% ``minimum'' element receives the maximum possible component values.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResetMinmax.xml">external</a> documentation.
--spec resetMinmax(Target) -> ok when Target :: enum().
+-spec resetMinmax(Target) -> 'ok' when Target :: enum().
resetMinmax(Target) ->
cast(5357, <<Target:?GLenum>>).
@@ -8986,7 +8986,7 @@ resetMinmax(Target) ->
%% but must be at least 80.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml">external</a> documentation.
--spec activeTexture(Texture) -> ok when Texture :: enum().
+-spec activeTexture(Texture) -> 'ok' when Texture :: enum().
activeTexture(Texture) ->
cast(5358, <<Texture:?GLenum>>).
@@ -9012,7 +9012,7 @@ activeTexture(Texture) ->
%% on each sample.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSampleCoverage.xml">external</a> documentation.
--spec sampleCoverage(Value, Invert) -> ok when Value :: clamp(),Invert :: 0|1.
+-spec sampleCoverage(Value, Invert) -> 'ok' when Value :: clamp(),Invert :: 0|1.
sampleCoverage(Value,Invert) ->
cast(5359, <<Value:?GLclampf,Invert:?GLboolean>>).
@@ -9070,7 +9070,7 @@ sampleCoverage(Value,Invert) ->
%% b s×|width b/w|×|height b/h|×|depth b/d|
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage3D.xml">external</a> documentation.
--spec compressedTexImage3D(Target, Level, Internalformat, Width, Height, Depth, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
+-spec compressedTexImage3D(Target, Level, Internalformat, Width, Height, Depth, Border, ImageSize, Data) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) when is_integer(Data) ->
cast(5360, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Border:?GLint,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) ->
@@ -9132,7 +9132,7 @@ compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Image
%% b s×|width b/w|×|height b/h|
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml">external</a> documentation.
--spec compressedTexImage2D(Target, Level, Internalformat, Width, Height, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
+-spec compressedTexImage2D(Target, Level, Internalformat, Width, Height, Border, ImageSize, Data) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) when is_integer(Data) ->
cast(5362, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Border:?GLint,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) ->
@@ -9189,7 +9189,7 @@ compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,D
%% b s×|width b/w|
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage1D.xml">external</a> documentation.
--spec compressedTexImage1D(Target, Level, Internalformat, Width, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
+-spec compressedTexImage1D(Target, Level, Internalformat, Width, Border, ImageSize, Data) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) when is_integer(Data) ->
cast(5364, <<Target:?GLenum,Level:?GLint,Internalformat:?GLenum,Width:?GLsizei,Border:?GLint,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) ->
@@ -9219,7 +9219,7 @@ compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) ->
%% as a byte offset into the buffer object's data store.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage3D.xml">external</a> documentation.
--spec compressedTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
+-spec compressedTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, ImageSize, Data) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) when is_integer(Data) ->
cast(5366, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Zoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Format:?GLenum,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) ->
@@ -9248,7 +9248,7 @@ compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,
%% as a byte offset into the buffer object's data store.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage2D.xml">external</a> documentation.
--spec compressedTexSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
+-spec compressedTexSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, ImageSize, Data) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) when is_integer(Data) ->
cast(5368, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Yoffset:?GLint,Width:?GLsizei,Height:?GLsizei,Format:?GLenum,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) ->
@@ -9277,7 +9277,7 @@ compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSi
%% as a byte offset into the buffer object's data store.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexSubImage1D.xml">external</a> documentation.
--spec compressedTexSubImage1D(Target, Level, Xoffset, Width, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
+-spec compressedTexSubImage1D(Target, Level, Xoffset, Width, Format, ImageSize, Data) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem().
compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) when is_integer(Data) ->
cast(5370, <<Target:?GLenum,Level:?GLint,Xoffset:?GLint,Width:?GLsizei,Format:?GLenum,ImageSize:?GLsizei,Data:?GLuint>>);
compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) ->
@@ -9307,7 +9307,7 @@ compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) ->
%% loading routine used for loading `Target' textures.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetCompressedTexImage.xml">external</a> documentation.
--spec getCompressedTexImage(Target, Lod, Img) -> ok when Target :: enum(),Lod :: integer(),Img :: mem().
+-spec getCompressedTexImage(Target, Lod, Img) -> 'ok' when Target :: enum(),Lod :: integer(),Img :: mem().
getCompressedTexImage(Target,Lod,Img) ->
send_bin(Img),
call(5372, <<Target:?GLenum,Lod:?GLint>>).
@@ -9320,7 +9320,7 @@ getCompressedTexImage(Target,Lod,Img) ->
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClientActiveTexture.xml">external</a> documentation.
--spec clientActiveTexture(Texture) -> ok when Texture :: enum().
+-spec clientActiveTexture(Texture) -> 'ok' when Texture :: enum().
clientActiveTexture(Texture) ->
cast(5373, <<Texture:?GLenum>>).
@@ -9338,162 +9338,162 @@ clientActiveTexture(Texture) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiTexCoord.xml">external</a> documentation.
--spec multiTexCoord1d(Target, S) -> ok when Target :: enum(),S :: float().
+-spec multiTexCoord1d(Target, S) -> 'ok' when Target :: enum(),S :: float().
multiTexCoord1d(Target,S) ->
cast(5374, <<Target:?GLenum,0:32,S:?GLdouble>>).
%% @equiv multiTexCoord1d(Target,S)
--spec multiTexCoord1dv(Target :: enum(),V) -> ok when V :: {S :: float()}.
+-spec multiTexCoord1dv(Target :: enum(),V) -> 'ok' when V :: {S :: float()}.
multiTexCoord1dv(Target,{S}) -> multiTexCoord1d(Target,S).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord1f(Target, S) -> ok when Target :: enum(),S :: float().
+-spec multiTexCoord1f(Target, S) -> 'ok' when Target :: enum(),S :: float().
multiTexCoord1f(Target,S) ->
cast(5375, <<Target:?GLenum,S:?GLfloat>>).
%% @equiv multiTexCoord1f(Target,S)
--spec multiTexCoord1fv(Target :: enum(),V) -> ok when V :: {S :: float()}.
+-spec multiTexCoord1fv(Target :: enum(),V) -> 'ok' when V :: {S :: float()}.
multiTexCoord1fv(Target,{S}) -> multiTexCoord1f(Target,S).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord1i(Target, S) -> ok when Target :: enum(),S :: integer().
+-spec multiTexCoord1i(Target, S) -> 'ok' when Target :: enum(),S :: integer().
multiTexCoord1i(Target,S) ->
cast(5376, <<Target:?GLenum,S:?GLint>>).
%% @equiv multiTexCoord1i(Target,S)
--spec multiTexCoord1iv(Target :: enum(),V) -> ok when V :: {S :: integer()}.
+-spec multiTexCoord1iv(Target :: enum(),V) -> 'ok' when V :: {S :: integer()}.
multiTexCoord1iv(Target,{S}) -> multiTexCoord1i(Target,S).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord1s(Target, S) -> ok when Target :: enum(),S :: integer().
+-spec multiTexCoord1s(Target, S) -> 'ok' when Target :: enum(),S :: integer().
multiTexCoord1s(Target,S) ->
cast(5377, <<Target:?GLenum,S:?GLshort>>).
%% @equiv multiTexCoord1s(Target,S)
--spec multiTexCoord1sv(Target :: enum(),V) -> ok when V :: {S :: integer()}.
+-spec multiTexCoord1sv(Target :: enum(),V) -> 'ok' when V :: {S :: integer()}.
multiTexCoord1sv(Target,{S}) -> multiTexCoord1s(Target,S).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord2d(Target, S, T) -> ok when Target :: enum(),S :: float(),T :: float().
+-spec multiTexCoord2d(Target, S, T) -> 'ok' when Target :: enum(),S :: float(),T :: float().
multiTexCoord2d(Target,S,T) ->
cast(5378, <<Target:?GLenum,0:32,S:?GLdouble,T:?GLdouble>>).
%% @equiv multiTexCoord2d(Target,S,T)
--spec multiTexCoord2dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float()}.
+-spec multiTexCoord2dv(Target :: enum(),V) -> 'ok' when V :: {S :: float(),T :: float()}.
multiTexCoord2dv(Target,{S,T}) -> multiTexCoord2d(Target,S,T).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord2f(Target, S, T) -> ok when Target :: enum(),S :: float(),T :: float().
+-spec multiTexCoord2f(Target, S, T) -> 'ok' when Target :: enum(),S :: float(),T :: float().
multiTexCoord2f(Target,S,T) ->
cast(5379, <<Target:?GLenum,S:?GLfloat,T:?GLfloat>>).
%% @equiv multiTexCoord2f(Target,S,T)
--spec multiTexCoord2fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float()}.
+-spec multiTexCoord2fv(Target :: enum(),V) -> 'ok' when V :: {S :: float(),T :: float()}.
multiTexCoord2fv(Target,{S,T}) -> multiTexCoord2f(Target,S,T).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord2i(Target, S, T) -> ok when Target :: enum(),S :: integer(),T :: integer().
+-spec multiTexCoord2i(Target, S, T) -> 'ok' when Target :: enum(),S :: integer(),T :: integer().
multiTexCoord2i(Target,S,T) ->
cast(5380, <<Target:?GLenum,S:?GLint,T:?GLint>>).
%% @equiv multiTexCoord2i(Target,S,T)
--spec multiTexCoord2iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer()}.
+-spec multiTexCoord2iv(Target :: enum(),V) -> 'ok' when V :: {S :: integer(),T :: integer()}.
multiTexCoord2iv(Target,{S,T}) -> multiTexCoord2i(Target,S,T).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord2s(Target, S, T) -> ok when Target :: enum(),S :: integer(),T :: integer().
+-spec multiTexCoord2s(Target, S, T) -> 'ok' when Target :: enum(),S :: integer(),T :: integer().
multiTexCoord2s(Target,S,T) ->
cast(5381, <<Target:?GLenum,S:?GLshort,T:?GLshort>>).
%% @equiv multiTexCoord2s(Target,S,T)
--spec multiTexCoord2sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer()}.
+-spec multiTexCoord2sv(Target :: enum(),V) -> 'ok' when V :: {S :: integer(),T :: integer()}.
multiTexCoord2sv(Target,{S,T}) -> multiTexCoord2s(Target,S,T).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord3d(Target, S, T, R) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float().
+-spec multiTexCoord3d(Target, S, T, R) -> 'ok' when Target :: enum(),S :: float(),T :: float(),R :: float().
multiTexCoord3d(Target,S,T,R) ->
cast(5382, <<Target:?GLenum,0:32,S:?GLdouble,T:?GLdouble,R:?GLdouble>>).
%% @equiv multiTexCoord3d(Target,S,T,R)
--spec multiTexCoord3dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
+-spec multiTexCoord3dv(Target :: enum(),V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float()}.
multiTexCoord3dv(Target,{S,T,R}) -> multiTexCoord3d(Target,S,T,R).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord3f(Target, S, T, R) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float().
+-spec multiTexCoord3f(Target, S, T, R) -> 'ok' when Target :: enum(),S :: float(),T :: float(),R :: float().
multiTexCoord3f(Target,S,T,R) ->
cast(5383, <<Target:?GLenum,S:?GLfloat,T:?GLfloat,R:?GLfloat>>).
%% @equiv multiTexCoord3f(Target,S,T,R)
--spec multiTexCoord3fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float()}.
+-spec multiTexCoord3fv(Target :: enum(),V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float()}.
multiTexCoord3fv(Target,{S,T,R}) -> multiTexCoord3f(Target,S,T,R).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord3i(Target, S, T, R) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer().
+-spec multiTexCoord3i(Target, S, T, R) -> 'ok' when Target :: enum(),S :: integer(),T :: integer(),R :: integer().
multiTexCoord3i(Target,S,T,R) ->
cast(5384, <<Target:?GLenum,S:?GLint,T:?GLint,R:?GLint>>).
%% @equiv multiTexCoord3i(Target,S,T,R)
--spec multiTexCoord3iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
+-spec multiTexCoord3iv(Target :: enum(),V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer()}.
multiTexCoord3iv(Target,{S,T,R}) -> multiTexCoord3i(Target,S,T,R).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord3s(Target, S, T, R) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer().
+-spec multiTexCoord3s(Target, S, T, R) -> 'ok' when Target :: enum(),S :: integer(),T :: integer(),R :: integer().
multiTexCoord3s(Target,S,T,R) ->
cast(5385, <<Target:?GLenum,S:?GLshort,T:?GLshort,R:?GLshort>>).
%% @equiv multiTexCoord3s(Target,S,T,R)
--spec multiTexCoord3sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}.
+-spec multiTexCoord3sv(Target :: enum(),V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer()}.
multiTexCoord3sv(Target,{S,T,R}) -> multiTexCoord3s(Target,S,T,R).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord4d(Target, S, T, R, Q) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float().
+-spec multiTexCoord4d(Target, S, T, R, Q) -> 'ok' when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float().
multiTexCoord4d(Target,S,T,R,Q) ->
cast(5386, <<Target:?GLenum,0:32,S:?GLdouble,T:?GLdouble,R:?GLdouble,Q:?GLdouble>>).
%% @equiv multiTexCoord4d(Target,S,T,R,Q)
--spec multiTexCoord4dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
+-spec multiTexCoord4dv(Target :: enum(),V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
multiTexCoord4dv(Target,{S,T,R,Q}) -> multiTexCoord4d(Target,S,T,R,Q).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord4f(Target, S, T, R, Q) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float().
+-spec multiTexCoord4f(Target, S, T, R, Q) -> 'ok' when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float().
multiTexCoord4f(Target,S,T,R,Q) ->
cast(5387, <<Target:?GLenum,S:?GLfloat,T:?GLfloat,R:?GLfloat,Q:?GLfloat>>).
%% @equiv multiTexCoord4f(Target,S,T,R,Q)
--spec multiTexCoord4fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
+-spec multiTexCoord4fv(Target :: enum(),V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
multiTexCoord4fv(Target,{S,T,R,Q}) -> multiTexCoord4f(Target,S,T,R,Q).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord4i(Target, S, T, R, Q) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer().
+-spec multiTexCoord4i(Target, S, T, R, Q) -> 'ok' when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer().
multiTexCoord4i(Target,S,T,R,Q) ->
cast(5388, <<Target:?GLenum,S:?GLint,T:?GLint,R:?GLint,Q:?GLint>>).
%% @equiv multiTexCoord4i(Target,S,T,R,Q)
--spec multiTexCoord4iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
+-spec multiTexCoord4iv(Target :: enum(),V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
multiTexCoord4iv(Target,{S,T,R,Q}) -> multiTexCoord4i(Target,S,T,R,Q).
%% @doc
%% See {@link multiTexCoord1d/2}
--spec multiTexCoord4s(Target, S, T, R, Q) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer().
+-spec multiTexCoord4s(Target, S, T, R, Q) -> 'ok' when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer().
multiTexCoord4s(Target,S,T,R,Q) ->
cast(5389, <<Target:?GLenum,S:?GLshort,T:?GLshort,R:?GLshort,Q:?GLshort>>).
%% @equiv multiTexCoord4s(Target,S,T,R,Q)
--spec multiTexCoord4sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
+-spec multiTexCoord4sv(Target :: enum(),V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
multiTexCoord4sv(Target,{S,T,R,Q}) -> multiTexCoord4s(Target,S,T,R,Q).
%% @doc Replace the current matrix with the specified row-major ordered matrix
@@ -9515,7 +9515,7 @@ multiTexCoord4sv(Target,{S,T,R,Q}) -> multiTexCoord4s(Target,S,T,R,Q).
%% with M T, where T represents the transpose.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrix.xml">external</a> documentation.
--spec loadTransposeMatrixf(M) -> ok when M :: matrix().
+-spec loadTransposeMatrixf(M) -> 'ok' when M :: matrix().
loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5390, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -9523,7 +9523,7 @@ loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc
%% See {@link loadTransposeMatrixf/1}
--spec loadTransposeMatrixd(M) -> ok when M :: matrix().
+-spec loadTransposeMatrixd(M) -> 'ok' when M :: matrix().
loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5391, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -9538,7 +9538,7 @@ loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% It is either the projection matrix, modelview matrix, or the texture matrix.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrix.xml">external</a> documentation.
--spec multTransposeMatrixf(M) -> ok when M :: matrix().
+-spec multTransposeMatrixf(M) -> 'ok' when M :: matrix().
multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5392, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -9546,7 +9546,7 @@ multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc
%% See {@link multTransposeMatrixf/1}
--spec multTransposeMatrixd(M) -> ok when M :: matrix().
+-spec multTransposeMatrixd(M) -> 'ok' when M :: matrix().
multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5393, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -9625,7 +9625,7 @@ multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFuncSeparate.xml">external</a> documentation.
--spec blendFuncSeparate(SfactorRGB, DfactorRGB, SfactorAlpha, DfactorAlpha) -> ok when SfactorRGB :: enum(),DfactorRGB :: enum(),SfactorAlpha :: enum(),DfactorAlpha :: enum().
+-spec blendFuncSeparate(SfactorRGB, DfactorRGB, SfactorAlpha, DfactorAlpha) -> 'ok' when SfactorRGB :: enum(),DfactorRGB :: enum(),SfactorAlpha :: enum(),DfactorAlpha :: enum().
blendFuncSeparate(SfactorRGB,DfactorRGB,SfactorAlpha,DfactorAlpha) ->
cast(5394, <<SfactorRGB:?GLenum,DfactorRGB:?GLenum,SfactorAlpha:?GLenum,DfactorAlpha:?GLenum>>).
@@ -9650,7 +9650,7 @@ blendFuncSeparate(SfactorRGB,DfactorRGB,SfactorAlpha,DfactorAlpha) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultiDrawArrays.xml">external</a> documentation.
--spec multiDrawArrays(Mode, First, Count) -> ok when Mode :: enum(),First :: [integer()],Count :: [integer()].
+-spec multiDrawArrays(Mode, First, Count) -> 'ok' when Mode :: enum(),First :: [integer()],Count :: [integer()].
multiDrawArrays(Mode,First,Count) ->
cast(5395, <<Mode:?GLenum,(length(First)):?GLuint,
(<< <<C:?GLint>> || C <- First>>)/binary,0:(((length(First)) rem 2)*32),(length(Count)):?GLuint,
@@ -9669,26 +9669,26 @@ multiDrawArrays(Mode,First,Count) ->
%% The default value is `?GL_UPPER_LEFT'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPointParameter.xml">external</a> documentation.
--spec pointParameterf(Pname, Param) -> ok when Pname :: enum(),Param :: float().
+-spec pointParameterf(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
pointParameterf(Pname,Param) ->
cast(5396, <<Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link pointParameterf/2}
--spec pointParameterfv(Pname, Params) -> ok when Pname :: enum(),Params :: tuple().
+-spec pointParameterfv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
pointParameterfv(Pname,Params) ->
cast(5397, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link pointParameterf/2}
--spec pointParameteri(Pname, Param) -> ok when Pname :: enum(),Param :: integer().
+-spec pointParameteri(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
pointParameteri(Pname,Param) ->
cast(5398, <<Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link pointParameterf/2}
--spec pointParameteriv(Pname, Params) -> ok when Pname :: enum(),Params :: tuple().
+-spec pointParameteriv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
pointParameteriv(Pname,Params) ->
cast(5399, <<Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
@@ -9700,22 +9700,22 @@ pointParameteriv(Pname,Params) ->
%% the fog color (see {@link gl:fogf/2} ).
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoord.xml">external</a> documentation.
--spec fogCoordf(Coord) -> ok when Coord :: float().
+-spec fogCoordf(Coord) -> 'ok' when Coord :: float().
fogCoordf(Coord) ->
cast(5400, <<Coord:?GLfloat>>).
%% @equiv fogCoordf(Coord)
--spec fogCoordfv(Coord) -> ok when Coord :: {Coord :: float()}.
+-spec fogCoordfv(Coord) -> 'ok' when Coord :: {Coord :: float()}.
fogCoordfv({Coord}) -> fogCoordf(Coord).
%% @doc
%% See {@link fogCoordf/1}
--spec fogCoordd(Coord) -> ok when Coord :: float().
+-spec fogCoordd(Coord) -> 'ok' when Coord :: float().
fogCoordd(Coord) ->
cast(5401, <<Coord:?GLdouble>>).
%% @equiv fogCoordd(Coord)
--spec fogCoorddv(Coord) -> ok when Coord :: {Coord :: float()}.
+-spec fogCoorddv(Coord) -> 'ok' when Coord :: {Coord :: float()}.
fogCoorddv({Coord}) -> fogCoordd(Coord).
%% @doc Define an array of fog coordinates
@@ -9741,7 +9741,7 @@ fogCoorddv({Coord}) -> fogCoordd(Coord).
%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFogCoordPointer.xml">external</a> documentation.
--spec fogCoordPointer(Type, Stride, Pointer) -> ok when Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
+-spec fogCoordPointer(Type, Stride, Pointer) -> 'ok' when Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
fogCoordPointer(Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5402, <<Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
fogCoordPointer(Type,Stride,Pointer) ->
@@ -9778,82 +9778,82 @@ fogCoordPointer(Type,Stride,Pointer) ->
%% are interpolated or written into a color buffer.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColor.xml">external</a> documentation.
--spec secondaryColor3b(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec secondaryColor3b(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3b(Red,Green,Blue) ->
cast(5404, <<Red:?GLbyte,Green:?GLbyte,Blue:?GLbyte>>).
%% @equiv secondaryColor3b(Red,Green,Blue)
--spec secondaryColor3bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec secondaryColor3bv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3bv({Red,Green,Blue}) -> secondaryColor3b(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3d(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
+-spec secondaryColor3d(Red, Green, Blue) -> 'ok' when Red :: float(),Green :: float(),Blue :: float().
secondaryColor3d(Red,Green,Blue) ->
cast(5405, <<Red:?GLdouble,Green:?GLdouble,Blue:?GLdouble>>).
%% @equiv secondaryColor3d(Red,Green,Blue)
--spec secondaryColor3dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
+-spec secondaryColor3dv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float()}.
secondaryColor3dv({Red,Green,Blue}) -> secondaryColor3d(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3f(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float().
+-spec secondaryColor3f(Red, Green, Blue) -> 'ok' when Red :: float(),Green :: float(),Blue :: float().
secondaryColor3f(Red,Green,Blue) ->
cast(5406, <<Red:?GLfloat,Green:?GLfloat,Blue:?GLfloat>>).
%% @equiv secondaryColor3f(Red,Green,Blue)
--spec secondaryColor3fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}.
+-spec secondaryColor3fv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float()}.
secondaryColor3fv({Red,Green,Blue}) -> secondaryColor3f(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3i(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec secondaryColor3i(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3i(Red,Green,Blue) ->
cast(5407, <<Red:?GLint,Green:?GLint,Blue:?GLint>>).
%% @equiv secondaryColor3i(Red,Green,Blue)
--spec secondaryColor3iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec secondaryColor3iv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3iv({Red,Green,Blue}) -> secondaryColor3i(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3s(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec secondaryColor3s(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3s(Red,Green,Blue) ->
cast(5408, <<Red:?GLshort,Green:?GLshort,Blue:?GLshort>>).
%% @equiv secondaryColor3s(Red,Green,Blue)
--spec secondaryColor3sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec secondaryColor3sv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3sv({Red,Green,Blue}) -> secondaryColor3s(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3ub(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec secondaryColor3ub(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3ub(Red,Green,Blue) ->
cast(5409, <<Red:?GLubyte,Green:?GLubyte,Blue:?GLubyte>>).
%% @equiv secondaryColor3ub(Red,Green,Blue)
--spec secondaryColor3ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec secondaryColor3ubv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3ubv({Red,Green,Blue}) -> secondaryColor3ub(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3ui(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec secondaryColor3ui(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3ui(Red,Green,Blue) ->
cast(5410, <<Red:?GLuint,Green:?GLuint,Blue:?GLuint>>).
%% @equiv secondaryColor3ui(Red,Green,Blue)
--spec secondaryColor3uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec secondaryColor3uiv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3uiv({Red,Green,Blue}) -> secondaryColor3ui(Red,Green,Blue).
%% @doc
%% See {@link secondaryColor3b/3}
--spec secondaryColor3us(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer().
+-spec secondaryColor3us(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
secondaryColor3us(Red,Green,Blue) ->
cast(5411, <<Red:?GLushort,Green:?GLushort,Blue:?GLushort>>).
%% @equiv secondaryColor3us(Red,Green,Blue)
--spec secondaryColor3usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
+-spec secondaryColor3usv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
secondaryColor3usv({Red,Green,Blue}) -> secondaryColor3us(Red,Green,Blue).
%% @doc Define an array of secondary colors
@@ -9881,7 +9881,7 @@ secondaryColor3usv({Red,Green,Blue}) -> secondaryColor3us(Red,Green,Blue).
%% is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSecondaryColorPointer.xml">external</a> documentation.
--spec secondaryColorPointer(Size, Type, Stride, Pointer) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
+-spec secondaryColorPointer(Size, Type, Stride, Pointer) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
secondaryColorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5412, <<Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
secondaryColorPointer(Size,Type,Stride,Pointer) ->
@@ -9927,82 +9927,82 @@ secondaryColorPointer(Size,Type,Stride,Pointer) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWindowPos.xml">external</a> documentation.
--spec windowPos2d(X, Y) -> ok when X :: float(),Y :: float().
+-spec windowPos2d(X, Y) -> 'ok' when X :: float(),Y :: float().
windowPos2d(X,Y) ->
cast(5414, <<X:?GLdouble,Y:?GLdouble>>).
%% @equiv windowPos2d(X,Y)
--spec windowPos2dv(V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec windowPos2dv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
windowPos2dv({X,Y}) -> windowPos2d(X,Y).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos2f(X, Y) -> ok when X :: float(),Y :: float().
+-spec windowPos2f(X, Y) -> 'ok' when X :: float(),Y :: float().
windowPos2f(X,Y) ->
cast(5415, <<X:?GLfloat,Y:?GLfloat>>).
%% @equiv windowPos2f(X,Y)
--spec windowPos2fv(V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec windowPos2fv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
windowPos2fv({X,Y}) -> windowPos2f(X,Y).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos2i(X, Y) -> ok when X :: integer(),Y :: integer().
+-spec windowPos2i(X, Y) -> 'ok' when X :: integer(),Y :: integer().
windowPos2i(X,Y) ->
cast(5416, <<X:?GLint,Y:?GLint>>).
%% @equiv windowPos2i(X,Y)
--spec windowPos2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec windowPos2iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
windowPos2iv({X,Y}) -> windowPos2i(X,Y).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos2s(X, Y) -> ok when X :: integer(),Y :: integer().
+-spec windowPos2s(X, Y) -> 'ok' when X :: integer(),Y :: integer().
windowPos2s(X,Y) ->
cast(5417, <<X:?GLshort,Y:?GLshort>>).
%% @equiv windowPos2s(X,Y)
--spec windowPos2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec windowPos2sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
windowPos2sv({X,Y}) -> windowPos2s(X,Y).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec windowPos3d(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
windowPos3d(X,Y,Z) ->
cast(5418, <<X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @equiv windowPos3d(X,Y,Z)
--spec windowPos3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec windowPos3dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
windowPos3dv({X,Y,Z}) -> windowPos3d(X,Y,Z).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float().
+-spec windowPos3f(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
windowPos3f(X,Y,Z) ->
cast(5419, <<X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
%% @equiv windowPos3f(X,Y,Z)
--spec windowPos3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec windowPos3fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
windowPos3fv({X,Y,Z}) -> windowPos3f(X,Y,Z).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+-spec windowPos3i(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
windowPos3i(X,Y,Z) ->
cast(5420, <<X:?GLint,Y:?GLint,Z:?GLint>>).
%% @equiv windowPos3i(X,Y,Z)
--spec windowPos3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec windowPos3iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
windowPos3iv({X,Y,Z}) -> windowPos3i(X,Y,Z).
%% @doc
%% See {@link windowPos2d/2}
--spec windowPos3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer().
+-spec windowPos3s(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
windowPos3s(X,Y,Z) ->
cast(5421, <<X:?GLshort,Y:?GLshort,Z:?GLshort>>).
%% @equiv windowPos3s(X,Y,Z)
--spec windowPos3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec windowPos3sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
windowPos3sv({X,Y,Z}) -> windowPos3s(X,Y,Z).
%% @doc Generate query object names
@@ -10032,7 +10032,7 @@ genQueries(N) ->
%% query objects.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteQueries.xml">external</a> documentation.
--spec deleteQueries(Ids) -> ok when Ids :: [integer()].
+-spec deleteQueries(Ids) -> 'ok' when Ids :: [integer()].
deleteQueries(Ids) ->
cast(5423, <<(length(Ids)):?GLuint,
(<< <<C:?GLuint>> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>).
@@ -10114,13 +10114,13 @@ isQuery(Id) ->
%% is not yet complete.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQuery.xml">external</a> documentation.
--spec beginQuery(Target, Id) -> ok when Target :: enum(),Id :: integer().
+-spec beginQuery(Target, Id) -> 'ok' when Target :: enum(),Id :: integer().
beginQuery(Target,Id) ->
cast(5425, <<Target:?GLenum,Id:?GLuint>>).
%% @doc
%% See {@link beginQuery/2}
--spec endQuery(Target) -> ok when Target :: enum().
+-spec endQuery(Target) -> 'ok' when Target :: enum().
endQuery(Target) ->
cast(5426, <<Target:?GLenum>>).
@@ -10236,7 +10236,7 @@ getQueryObjectuiv(Id,Pname) ->
%% buffer object based on its initial binding target.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBuffer.xml">external</a> documentation.
--spec bindBuffer(Target, Buffer) -> ok when Target :: enum(),Buffer :: integer().
+-spec bindBuffer(Target, Buffer) -> 'ok' when Target :: enum(),Buffer :: integer().
bindBuffer(Target,Buffer) ->
cast(5430, <<Target:?GLenum,Buffer:?GLuint>>).
@@ -10251,7 +10251,7 @@ bindBuffer(Target,Buffer) ->
%% buffer objects.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteBuffers.xml">external</a> documentation.
--spec deleteBuffers(Buffers) -> ok when Buffers :: [integer()].
+-spec deleteBuffers(Buffers) -> 'ok' when Buffers :: [integer()].
deleteBuffers(Buffers) ->
cast(5431, <<(length(Buffers)):?GLuint,
(<< <<C:?GLuint>> || C <- Buffers>>)/binary,0:(((1+length(Buffers)) rem 2)*32)>>).
@@ -10323,7 +10323,7 @@ isBuffer(Buffer) ->
%% source for GL drawing and image specification commands.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBufferData.xml">external</a> documentation.
--spec bufferData(Target, Size, Data, Usage) -> ok when Target :: enum(),Size :: integer(),Data :: offset()|mem(),Usage :: enum().
+-spec bufferData(Target, Size, Data, Usage) -> 'ok' when Target :: enum(),Size :: integer(),Data :: offset()|mem(),Usage :: enum().
bufferData(Target,Size,Data,Usage) when is_integer(Data) ->
cast(5434, <<Target:?GLenum,0:32,Size:?GLsizeiptr,Data:?GLuint,Usage:?GLenum>>);
bufferData(Target,Size,Data,Usage) ->
@@ -10339,7 +10339,7 @@ bufferData(Target,Size,Data,Usage) ->
%% the buffer object's data store.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBufferSubData.xml">external</a> documentation.
--spec bufferSubData(Target, Offset, Size, Data) -> ok when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: offset()|mem().
+-spec bufferSubData(Target, Offset, Size, Data) -> 'ok' when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: offset()|mem().
bufferSubData(Target,Offset,Size,Data) when is_integer(Data) ->
cast(5436, <<Target:?GLenum,0:32,Offset:?GLintptr,Size:?GLsizeiptr,Data:?GLuint>>);
bufferSubData(Target,Offset,Size,Data) ->
@@ -10355,7 +10355,7 @@ bufferSubData(Target,Offset,Size,Data) ->
%% together define a range beyond the bounds of the buffer object's data store.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetBufferSubData.xml">external</a> documentation.
--spec getBufferSubData(Target, Offset, Size, Data) -> ok when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: mem().
+-spec getBufferSubData(Target, Offset, Size, Data) -> 'ok' when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: mem().
getBufferSubData(Target,Offset,Size,Data) ->
send_bin(Data),
call(5438, <<Target:?GLenum,0:32,Offset:?GLintptr,Size:?GLsizeiptr>>).
@@ -10422,7 +10422,7 @@ getBufferParameteriv(Target,Pname) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquationSeparate.xml">external</a> documentation.
--spec blendEquationSeparate(ModeRGB, ModeAlpha) -> ok when ModeRGB :: enum(),ModeAlpha :: enum().
+-spec blendEquationSeparate(ModeRGB, ModeAlpha) -> 'ok' when ModeRGB :: enum(),ModeAlpha :: enum().
blendEquationSeparate(ModeRGB,ModeAlpha) ->
cast(5440, <<ModeRGB:?GLenum,ModeAlpha:?GLenum>>).
@@ -10462,7 +10462,7 @@ blendEquationSeparate(ModeRGB,ModeAlpha) ->
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffers.xml">external</a> documentation.
--spec drawBuffers(Bufs) -> ok when Bufs :: [enum()].
+-spec drawBuffers(Bufs) -> 'ok' when Bufs :: [enum()].
drawBuffers(Bufs) ->
cast(5441, <<(length(Bufs)):?GLuint,
(<< <<C:?GLenum>> || C <- Bufs>>)/binary,0:(((1+length(Bufs)) rem 2)*32)>>).
@@ -10524,7 +10524,7 @@ drawBuffers(Bufs) ->
%% specify stencil action when the stencil test fails and passes, respectively.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilOpSeparate.xml">external</a> documentation.
--spec stencilOpSeparate(Face, Sfail, Dpfail, Dppass) -> ok when Face :: enum(),Sfail :: enum(),Dpfail :: enum(),Dppass :: enum().
+-spec stencilOpSeparate(Face, Sfail, Dpfail, Dppass) -> 'ok' when Face :: enum(),Sfail :: enum(),Dpfail :: enum(),Dppass :: enum().
stencilOpSeparate(Face,Sfail,Dpfail,Dppass) ->
cast(5442, <<Face:?GLenum,Sfail:?GLenum,Dpfail:?GLenum,Dppass:?GLenum>>).
@@ -10587,7 +10587,7 @@ stencilOpSeparate(Face,Sfail,Dpfail,Dppass) ->
%% `?GL_ALWAYS': Always passes.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuncSeparate.xml">external</a> documentation.
--spec stencilFuncSeparate(Face, Func, Ref, Mask) -> ok when Face :: enum(),Func :: enum(),Ref :: integer(),Mask :: integer().
+-spec stencilFuncSeparate(Face, Func, Ref, Mask) -> 'ok' when Face :: enum(),Func :: enum(),Ref :: integer(),Mask :: integer().
stencilFuncSeparate(Face,Func,Ref,Mask) ->
cast(5443, <<Face:?GLenum,Func:?GLenum,Ref:?GLint,Mask:?GLuint>>).
@@ -10605,7 +10605,7 @@ stencilFuncSeparate(Face,Func,Ref,Mask) ->
%% were called with `Face' set to `?GL_FRONT_AND_BACK'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilMaskSeparate.xml">external</a> documentation.
--spec stencilMaskSeparate(Face, Mask) -> ok when Face :: enum(),Mask :: integer().
+-spec stencilMaskSeparate(Face, Mask) -> 'ok' when Face :: enum(),Mask :: integer().
stencilMaskSeparate(Face,Mask) ->
cast(5444, <<Face:?GLenum,Mask:?GLuint>>).
@@ -10629,7 +10629,7 @@ stencilMaskSeparate(Face,Mask) ->
%% all program objects to which it is attached.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAttachShader.xml">external</a> documentation.
--spec attachShader(Program, Shader) -> ok when Program :: integer(),Shader :: integer().
+-spec attachShader(Program, Shader) -> 'ok' when Program :: integer(),Shader :: integer().
attachShader(Program,Shader) ->
cast(5445, <<Program:?GLuint,Shader:?GLuint>>).
@@ -10666,7 +10666,7 @@ attachShader(Program,Shader) ->
%% effect until the next time the program object is linked.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindAttribLocation.xml">external</a> documentation.
--spec bindAttribLocation(Program, Index, Name) -> ok when Program :: integer(),Index :: integer(),Name :: string().
+-spec bindAttribLocation(Program, Index, Name) -> 'ok' when Program :: integer(),Index :: integer(),Name :: string().
bindAttribLocation(Program,Index,Name) ->
cast(5446, <<Program:?GLuint,Index:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
@@ -10686,7 +10686,7 @@ bindAttribLocation(Program,Index,Name) ->
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShader.xml">external</a> documentation.
--spec compileShader(Shader) -> ok when Shader :: integer().
+-spec compileShader(Shader) -> 'ok' when Shader :: integer().
compileShader(Shader) ->
cast(5447, <<Shader:?GLuint>>).
@@ -10753,7 +10753,7 @@ createShader(Type) ->
%% with arguments `Program' and `?GL_DELETE_STATUS'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgram.xml">external</a> documentation.
--spec deleteProgram(Program) -> ok when Program :: integer().
+-spec deleteProgram(Program) -> 'ok' when Program :: integer().
deleteProgram(Program) ->
cast(5450, <<Program:?GLuint>>).
@@ -10772,7 +10772,7 @@ deleteProgram(Program) ->
%% with arguments `Shader' and `?GL_DELETE_STATUS'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteShader.xml">external</a> documentation.
--spec deleteShader(Shader) -> ok when Shader :: integer().
+-spec deleteShader(Shader) -> 'ok' when Shader :: integer().
deleteShader(Shader) ->
cast(5451, <<Shader:?GLuint>>).
@@ -10787,7 +10787,7 @@ deleteShader(Shader) ->
%% detached.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDetachShader.xml">external</a> documentation.
--spec detachShader(Program, Shader) -> ok when Program :: integer(),Shader :: integer().
+-spec detachShader(Program, Shader) -> 'ok' when Program :: integer(),Shader :: integer().
detachShader(Program,Shader) ->
cast(5452, <<Program:?GLuint,Shader:?GLuint>>).
@@ -10802,13 +10802,13 @@ detachShader(Program,Shader) ->
%% , or {@link gl:multiDrawArrays/3} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnableVertexAttribArray.xml">external</a> documentation.
--spec disableVertexAttribArray(Index) -> ok when Index :: integer().
+-spec disableVertexAttribArray(Index) -> 'ok' when Index :: integer().
disableVertexAttribArray(Index) ->
cast(5453, <<Index:?GLuint>>).
%% @doc
%% See {@link disableVertexAttribArray/1}
--spec enableVertexAttribArray(Index) -> ok when Index :: integer().
+-spec enableVertexAttribArray(Index) -> 'ok' when Index :: integer().
enableVertexAttribArray(Index) ->
cast(5454, <<Index:?GLuint>>).
@@ -11515,7 +11515,7 @@ isShader(Shader) ->
%% log or the program that is part of the program object.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLinkProgram.xml">external</a> documentation.
--spec linkProgram(Program) -> ok when Program :: integer().
+-spec linkProgram(Program) -> 'ok' when Program :: integer().
linkProgram(Program) ->
cast(5472, <<Program:?GLuint>>).
@@ -11533,7 +11533,7 @@ linkProgram(Program) ->
%% scanned or parsed at this time; they are simply copied into the specified shader object.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderSource.xml">external</a> documentation.
--spec shaderSource(Shader, String) -> ok when Shader :: integer(),String :: iolist().
+-spec shaderSource(Shader, String) -> 'ok' when Shader :: integer(),String :: iolist().
shaderSource(Shader,String) ->
StringTemp = list_to_binary([[Str|[0]] || Str <- String ]),
cast(5473, <<Shader:?GLuint,(length(String)):?GLuint,(size(StringTemp)):?GLuint,(StringTemp)/binary,0:((8-((size(StringTemp)+0) rem 8)) rem 8)>>).
@@ -11575,7 +11575,7 @@ shaderSource(Shader,String) ->
%% the results of fragment shader execution will be undefined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgram.xml">external</a> documentation.
--spec useProgram(Program) -> ok when Program :: integer().
+-spec useProgram(Program) -> 'ok' when Program :: integer().
useProgram(Program) ->
cast(5474, <<Program:?GLuint>>).
@@ -11643,125 +11643,125 @@ useProgram(Program) ->
%% a single matrix, and a count greater than 1 can be used to modify an array of matrices.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml">external</a> documentation.
--spec uniform1f(Location, V0) -> ok when Location :: integer(),V0 :: float().
+-spec uniform1f(Location, V0) -> 'ok' when Location :: integer(),V0 :: float().
uniform1f(Location,V0) ->
cast(5475, <<Location:?GLint,V0:?GLfloat>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2f(Location, V0, V1) -> ok when Location :: integer(),V0 :: float(),V1 :: float().
+-spec uniform2f(Location, V0, V1) -> 'ok' when Location :: integer(),V0 :: float(),V1 :: float().
uniform2f(Location,V0,V1) ->
cast(5476, <<Location:?GLint,V0:?GLfloat,V1:?GLfloat>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3f(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
+-spec uniform3f(Location, V0, V1, V2) -> 'ok' when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
uniform3f(Location,V0,V1,V2) ->
cast(5477, <<Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4f(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
+-spec uniform4f(Location, V0, V1, V2, V3) -> 'ok' when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
uniform4f(Location,V0,V1,V2,V3) ->
cast(5478, <<Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform1i(Location, V0) -> ok when Location :: integer(),V0 :: integer().
+-spec uniform1i(Location, V0) -> 'ok' when Location :: integer(),V0 :: integer().
uniform1i(Location,V0) ->
cast(5479, <<Location:?GLint,V0:?GLint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2i(Location, V0, V1) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer().
+-spec uniform2i(Location, V0, V1) -> 'ok' when Location :: integer(),V0 :: integer(),V1 :: integer().
uniform2i(Location,V0,V1) ->
cast(5480, <<Location:?GLint,V0:?GLint,V1:?GLint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3i(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
+-spec uniform3i(Location, V0, V1, V2) -> 'ok' when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
uniform3i(Location,V0,V1,V2) ->
cast(5481, <<Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4i(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
+-spec uniform4i(Location, V0, V1, V2, V3) -> 'ok' when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
uniform4i(Location,V0,V1,V2,V3) ->
cast(5482, <<Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint,V3:?GLint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform1fv(Location, Value) -> ok when Location :: integer(),Value :: [float()].
+-spec uniform1fv(Location, Value) -> 'ok' when Location :: integer(),Value :: [float()].
uniform1fv(Location,Value) ->
cast(5483, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLfloat>> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float()}].
+-spec uniform2fv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{float(),float()}].
uniform2fv(Location,Value) ->
cast(5484, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float()}].
+-spec uniform3fv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{float(),float(),float()}].
uniform3fv(Location,Value) ->
cast(5485, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float(),float()}].
+-spec uniform4fv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{float(),float(),float(),float()}].
uniform4fv(Location,Value) ->
cast(5486, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform1iv(Location, Value) -> ok when Location :: integer(),Value :: [integer()].
+-spec uniform1iv(Location, Value) -> 'ok' when Location :: integer(),Value :: [integer()].
uniform1iv(Location,Value) ->
cast(5487, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLint>> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer()}].
+-spec uniform2iv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{integer(),integer()}].
uniform2iv(Location,Value) ->
cast(5488, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer()}].
+-spec uniform3iv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{integer(),integer(),integer()}].
uniform3iv(Location,Value) ->
cast(5489, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
+-spec uniform4iv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
uniform4iv(Location,Value) ->
cast(5490, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
+-spec uniformMatrix2fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
uniformMatrix2fv(Location,Transpose,Value) ->
cast(5491, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix3fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3fv(Location,Transpose,Value) ->
cast(5492, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix4fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4fv(Location,Transpose,Value) ->
cast(5493, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat,V13:?GLfloat,V14:?GLfloat,V15:?GLfloat,V16:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
@@ -11789,7 +11789,7 @@ uniformMatrix4fv(Location,Transpose,Value) ->
%% information strings.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgram.xml">external</a> documentation.
--spec validateProgram(Program) -> ok when Program :: integer().
+-spec validateProgram(Program) -> 'ok' when Program :: integer().
validateProgram(Program) ->
cast(5494, <<Program:?GLuint>>).
@@ -11864,191 +11864,191 @@ validateProgram(Program) ->
%% attribute.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttrib.xml">external</a> documentation.
--spec vertexAttrib1d(Index, X) -> ok when Index :: integer(),X :: float().
+-spec vertexAttrib1d(Index, X) -> 'ok' when Index :: integer(),X :: float().
vertexAttrib1d(Index,X) ->
cast(5495, <<Index:?GLuint,0:32,X:?GLdouble>>).
%% @equiv vertexAttrib1d(Index,X)
--spec vertexAttrib1dv(Index :: integer(),V) -> ok when V :: {X :: float()}.
+-spec vertexAttrib1dv(Index :: integer(),V) -> 'ok' when V :: {X :: float()}.
vertexAttrib1dv(Index,{X}) -> vertexAttrib1d(Index,X).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib1f(Index, X) -> ok when Index :: integer(),X :: float().
+-spec vertexAttrib1f(Index, X) -> 'ok' when Index :: integer(),X :: float().
vertexAttrib1f(Index,X) ->
cast(5496, <<Index:?GLuint,X:?GLfloat>>).
%% @equiv vertexAttrib1f(Index,X)
--spec vertexAttrib1fv(Index :: integer(),V) -> ok when V :: {X :: float()}.
+-spec vertexAttrib1fv(Index :: integer(),V) -> 'ok' when V :: {X :: float()}.
vertexAttrib1fv(Index,{X}) -> vertexAttrib1f(Index,X).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib1s(Index, X) -> ok when Index :: integer(),X :: integer().
+-spec vertexAttrib1s(Index, X) -> 'ok' when Index :: integer(),X :: integer().
vertexAttrib1s(Index,X) ->
cast(5497, <<Index:?GLuint,X:?GLshort>>).
%% @equiv vertexAttrib1s(Index,X)
--spec vertexAttrib1sv(Index :: integer(),V) -> ok when V :: {X :: integer()}.
+-spec vertexAttrib1sv(Index :: integer(),V) -> 'ok' when V :: {X :: integer()}.
vertexAttrib1sv(Index,{X}) -> vertexAttrib1s(Index,X).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib2d(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float().
+-spec vertexAttrib2d(Index, X, Y) -> 'ok' when Index :: integer(),X :: float(),Y :: float().
vertexAttrib2d(Index,X,Y) ->
cast(5498, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble>>).
%% @equiv vertexAttrib2d(Index,X,Y)
--spec vertexAttrib2dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec vertexAttrib2dv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertexAttrib2dv(Index,{X,Y}) -> vertexAttrib2d(Index,X,Y).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib2f(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float().
+-spec vertexAttrib2f(Index, X, Y) -> 'ok' when Index :: integer(),X :: float(),Y :: float().
vertexAttrib2f(Index,X,Y) ->
cast(5499, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat>>).
%% @equiv vertexAttrib2f(Index,X,Y)
--spec vertexAttrib2fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec vertexAttrib2fv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertexAttrib2fv(Index,{X,Y}) -> vertexAttrib2f(Index,X,Y).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib2s(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer().
+-spec vertexAttrib2s(Index, X, Y) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer().
vertexAttrib2s(Index,X,Y) ->
cast(5500, <<Index:?GLuint,X:?GLshort,Y:?GLshort>>).
%% @equiv vertexAttrib2s(Index,X,Y)
--spec vertexAttrib2sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec vertexAttrib2sv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertexAttrib2sv(Index,{X,Y}) -> vertexAttrib2s(Index,X,Y).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib3d(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float().
+-spec vertexAttrib3d(Index, X, Y, Z) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),Z :: float().
vertexAttrib3d(Index,X,Y,Z) ->
cast(5501, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @equiv vertexAttrib3d(Index,X,Y,Z)
--spec vertexAttrib3dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec vertexAttrib3dv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertexAttrib3dv(Index,{X,Y,Z}) -> vertexAttrib3d(Index,X,Y,Z).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib3f(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float().
+-spec vertexAttrib3f(Index, X, Y, Z) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),Z :: float().
vertexAttrib3f(Index,X,Y,Z) ->
cast(5502, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat>>).
%% @equiv vertexAttrib3f(Index,X,Y,Z)
--spec vertexAttrib3fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec vertexAttrib3fv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertexAttrib3fv(Index,{X,Y,Z}) -> vertexAttrib3f(Index,X,Y,Z).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib3s(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
+-spec vertexAttrib3s(Index, X, Y, Z) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
vertexAttrib3s(Index,X,Y,Z) ->
cast(5503, <<Index:?GLuint,X:?GLshort,Y:?GLshort,Z:?GLshort>>).
%% @equiv vertexAttrib3s(Index,X,Y,Z)
--spec vertexAttrib3sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec vertexAttrib3sv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertexAttrib3sv(Index,{X,Y,Z}) -> vertexAttrib3s(Index,X,Y,Z).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4Nbv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4Nbv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nbv(Index,{V1,V2,V3,V4}) ->
cast(5504, <<Index:?GLuint,V1:?GLbyte,V2:?GLbyte,V3:?GLbyte,V4:?GLbyte>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4Niv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4Niv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Niv(Index,{V1,V2,V3,V4}) ->
cast(5505, <<Index:?GLuint,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4Nsv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4Nsv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nsv(Index,{V1,V2,V3,V4}) ->
cast(5506, <<Index:?GLuint,V1:?GLshort,V2:?GLshort,V3:?GLshort,V4:?GLshort>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4Nub(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec vertexAttrib4Nub(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttrib4Nub(Index,X,Y,Z,W) ->
cast(5507, <<Index:?GLuint,X:?GLubyte,Y:?GLubyte,Z:?GLubyte,W:?GLubyte>>).
%% @equiv vertexAttrib4Nub(Index,X,Y,Z,W)
--spec vertexAttrib4Nubv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec vertexAttrib4Nubv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttrib4Nubv(Index,{X,Y,Z,W}) -> vertexAttrib4Nub(Index,X,Y,Z,W).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4Nuiv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4Nuiv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nuiv(Index,{V1,V2,V3,V4}) ->
cast(5508, <<Index:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4Nusv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4Nusv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4Nusv(Index,{V1,V2,V3,V4}) ->
cast(5509, <<Index:?GLuint,V1:?GLushort,V2:?GLushort,V3:?GLushort,V4:?GLushort>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4bv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4bv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4bv(Index,{V1,V2,V3,V4}) ->
cast(5510, <<Index:?GLuint,V1:?GLbyte,V2:?GLbyte,V3:?GLbyte,V4:?GLbyte>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4d(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec vertexAttrib4d(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
vertexAttrib4d(Index,X,Y,Z,W) ->
cast(5511, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @equiv vertexAttrib4d(Index,X,Y,Z,W)
--spec vertexAttrib4dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec vertexAttrib4dv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertexAttrib4dv(Index,{X,Y,Z,W}) -> vertexAttrib4d(Index,X,Y,Z,W).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4f(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec vertexAttrib4f(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
vertexAttrib4f(Index,X,Y,Z,W) ->
cast(5512, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
%% @equiv vertexAttrib4f(Index,X,Y,Z,W)
--spec vertexAttrib4fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec vertexAttrib4fv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertexAttrib4fv(Index,{X,Y,Z,W}) -> vertexAttrib4f(Index,X,Y,Z,W).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4iv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4iv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4iv(Index,{V1,V2,V3,V4}) ->
cast(5513, <<Index:?GLuint,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4s(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec vertexAttrib4s(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttrib4s(Index,X,Y,Z,W) ->
cast(5514, <<Index:?GLuint,X:?GLshort,Y:?GLshort,Z:?GLshort,W:?GLshort>>).
%% @equiv vertexAttrib4s(Index,X,Y,Z,W)
--spec vertexAttrib4sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec vertexAttrib4sv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttrib4sv(Index,{X,Y,Z,W}) -> vertexAttrib4s(Index,X,Y,Z,W).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4ubv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4ubv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4ubv(Index,{V1,V2,V3,V4}) ->
cast(5515, <<Index:?GLuint,V1:?GLubyte,V2:?GLubyte,V3:?GLubyte,V4:?GLubyte>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4uiv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4uiv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4uiv(Index,{V1,V2,V3,V4}) ->
cast(5516, <<Index:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttrib4usv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttrib4usv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttrib4usv(Index,{V1,V2,V3,V4}) ->
cast(5517, <<Index:?GLuint,V1:?GLushort,V2:?GLushort,V3:?GLushort,V4:?GLushort>>).
@@ -12092,7 +12092,7 @@ vertexAttrib4usv(Index,{V1,V2,V3,V4}) ->
%% , see `glMultiDrawElements', or {@link gl:drawRangeElements/6} is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml">external</a> documentation.
--spec vertexAttribPointer(Index, Size, Type, Normalized, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Normalized :: 0|1,Stride :: integer(),Pointer :: offset()|mem().
+-spec vertexAttribPointer(Index, Size, Type, Normalized, Stride, Pointer) -> 'ok' when Index :: integer(),Size :: integer(),Type :: enum(),Normalized :: 0|1,Stride :: integer(),Pointer :: offset()|mem().
vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) when is_integer(Pointer) ->
cast(5518, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Normalized:?GLboolean,0:24,Stride:?GLsizei,Pointer:?GLuint>>);
vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) ->
@@ -12101,42 +12101,42 @@ vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) ->
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix2x3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix2x3fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix2x3fv(Location,Transpose,Value) ->
cast(5520, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix3x2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix3x2fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix3x2fv(Location,Transpose,Value) ->
cast(5521, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix2x4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix2x4fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix2x4fv(Location,Transpose,Value) ->
cast(5522, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix4x2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix4x2fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x2fv(Location,Transpose,Value) ->
cast(5523, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix3x4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix3x4fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3x4fv(Location,Transpose,Value) ->
cast(5524, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix4x3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix4x3fv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x3fv(Location,Transpose,Value) ->
cast(5525, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
@@ -12144,7 +12144,7 @@ uniformMatrix4x3fv(Location,Transpose,Value) ->
%% @doc glColorMaski
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glColorMaski.xml">external</a> documentation.
--spec colorMaski(Index, R, G, B, A) -> ok when Index :: integer(),R :: 0|1,G :: 0|1,B :: 0|1,A :: 0|1.
+-spec colorMaski(Index, R, G, B, A) -> 'ok' when Index :: integer(),R :: 0|1,G :: 0|1,B :: 0|1,A :: 0|1.
colorMaski(Index,R,G,B,A) ->
cast(5526, <<Index:?GLuint,R:?GLboolean,G:?GLboolean,B:?GLboolean,A:?GLboolean>>).
@@ -12162,14 +12162,14 @@ getIntegeri_v(Target,Index) ->
%% @doc
%% See {@link enable/1}
--spec enablei(Target, Index) -> ok when Target :: enum(),Index :: integer().
+-spec enablei(Target, Index) -> 'ok' when Target :: enum(),Index :: integer().
enablei(Target,Index) ->
cast(5529, <<Target:?GLenum,Index:?GLuint>>).
%% @doc glEnablei
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glEnablei.xml">external</a> documentation.
--spec disablei(Target, Index) -> ok when Target :: enum(),Index :: integer().
+-spec disablei(Target, Index) -> 'ok' when Target :: enum(),Index :: integer().
disablei(Target,Index) ->
cast(5530, <<Target:?GLenum,Index:?GLuint>>).
@@ -12204,13 +12204,13 @@ isEnabledi(Target,Index) ->
%% </td></tr></tbody></table>
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginTransformFeedback.xml">external</a> documentation.
--spec beginTransformFeedback(PrimitiveMode) -> ok when PrimitiveMode :: enum().
+-spec beginTransformFeedback(PrimitiveMode) -> 'ok' when PrimitiveMode :: enum().
beginTransformFeedback(PrimitiveMode) ->
cast(5532, <<PrimitiveMode:?GLenum>>).
%% @doc
%% See {@link beginTransformFeedback/1}
--spec endTransformFeedback() -> ok.
+-spec endTransformFeedback() -> 'ok'.
endTransformFeedback() ->
cast(5533, <<>>).
@@ -12229,7 +12229,7 @@ endTransformFeedback() ->
%% while used as an indexed target.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBufferRange.xml">external</a> documentation.
--spec bindBufferRange(Target, Index, Buffer, Offset, Size) -> ok when Target :: enum(),Index :: integer(),Buffer :: integer(),Offset :: integer(),Size :: integer().
+-spec bindBufferRange(Target, Index, Buffer, Offset, Size) -> 'ok' when Target :: enum(),Index :: integer(),Buffer :: integer(),Offset :: integer(),Size :: integer().
bindBufferRange(Target,Index,Buffer,Offset,Size) ->
cast(5534, <<Target:?GLenum,Index:?GLuint,Buffer:?GLuint,0:32,Offset:?GLintptr,Size:?GLsizeiptr>>).
@@ -12244,7 +12244,7 @@ bindBufferRange(Target,Index,Buffer,Offset,Size) ->
%% binding point specified by `Target' .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindBufferBase.xml">external</a> documentation.
--spec bindBufferBase(Target, Index, Buffer) -> ok when Target :: enum(),Index :: integer(),Buffer :: integer().
+-spec bindBufferBase(Target, Index, Buffer) -> 'ok' when Target :: enum(),Index :: integer(),Buffer :: integer().
bindBufferBase(Target,Index,Buffer) ->
cast(5535, <<Target:?GLenum,Index:?GLuint,Buffer:?GLuint>>).
@@ -12282,7 +12282,7 @@ bindBufferBase(Target,Index,Buffer) ->
%% and the buffer mode is `?GL_INTERLEAVED_ATTRIBS'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTransformFeedbackVaryings.xml">external</a> documentation.
--spec transformFeedbackVaryings(Program, Varyings, BufferMode) -> ok when Program :: integer(),Varyings :: iolist(),BufferMode :: enum().
+-spec transformFeedbackVaryings(Program, Varyings, BufferMode) -> 'ok' when Program :: integer(),Varyings :: iolist(),BufferMode :: enum().
transformFeedbackVaryings(Program,Varyings,BufferMode) ->
VaryingsTemp = list_to_binary([[Str|[0]] || Str <- Varyings ]),
cast(5536, <<Program:?GLuint,(length(Varyings)):?GLuint,(size(VaryingsTemp)):?GLuint,(VaryingsTemp)/binary,0:((8-((size(VaryingsTemp)+0) rem 8)) rem 8),BufferMode:?GLenum>>).
@@ -12331,7 +12331,7 @@ getTransformFeedbackVarying(Program,Index,BufSize) ->
%% only if the selected read buffer has fixed point components and disabled otherwise.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClampColor.xml">external</a> documentation.
--spec clampColor(Target, Clamp) -> ok when Target :: enum(),Clamp :: enum().
+-spec clampColor(Target, Clamp) -> 'ok' when Target :: enum(),Clamp :: enum().
clampColor(Target,Clamp) ->
cast(5538, <<Target:?GLenum,Clamp:?GLenum>>).
@@ -12363,20 +12363,20 @@ clampColor(Target,Clamp) ->
%% waiting for the query to complete.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginConditionalRender.xml">external</a> documentation.
--spec beginConditionalRender(Id, Mode) -> ok when Id :: integer(),Mode :: enum().
+-spec beginConditionalRender(Id, Mode) -> 'ok' when Id :: integer(),Mode :: enum().
beginConditionalRender(Id,Mode) ->
cast(5539, <<Id:?GLuint,Mode:?GLenum>>).
%% @doc
%% See {@link beginConditionalRender/2}
--spec endConditionalRender() -> ok.
+-spec endConditionalRender() -> 'ok'.
endConditionalRender() ->
cast(5540, <<>>).
%% @doc glVertexAttribIPointer
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribIPointer.xml">external</a> documentation.
--spec vertexAttribIPointer(Index, Size, Type, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
+-spec vertexAttribIPointer(Index, Size, Type, Stride, Pointer) -> 'ok' when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
vertexAttribIPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5541, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
vertexAttribIPointer(Index,Size,Type,Stride,Pointer) ->
@@ -12398,105 +12398,105 @@ getVertexAttribIuiv(Index,Pname) ->
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI1i(Index, X) -> ok when Index :: integer(),X :: integer().
+-spec vertexAttribI1i(Index, X) -> 'ok' when Index :: integer(),X :: integer().
vertexAttribI1i(Index,X) ->
cast(5545, <<Index:?GLuint,X:?GLint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI2i(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer().
+-spec vertexAttribI2i(Index, X, Y) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer().
vertexAttribI2i(Index,X,Y) ->
cast(5546, <<Index:?GLuint,X:?GLint,Y:?GLint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI3i(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
+-spec vertexAttribI3i(Index, X, Y, Z) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
vertexAttribI3i(Index,X,Y,Z) ->
cast(5547, <<Index:?GLuint,X:?GLint,Y:?GLint,Z:?GLint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI4i(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec vertexAttribI4i(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttribI4i(Index,X,Y,Z,W) ->
cast(5548, <<Index:?GLuint,X:?GLint,Y:?GLint,Z:?GLint,W:?GLint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI1ui(Index, X) -> ok when Index :: integer(),X :: integer().
+-spec vertexAttribI1ui(Index, X) -> 'ok' when Index :: integer(),X :: integer().
vertexAttribI1ui(Index,X) ->
cast(5549, <<Index:?GLuint,X:?GLuint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI2ui(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer().
+-spec vertexAttribI2ui(Index, X, Y) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer().
vertexAttribI2ui(Index,X,Y) ->
cast(5550, <<Index:?GLuint,X:?GLuint,Y:?GLuint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI3ui(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
+-spec vertexAttribI3ui(Index, X, Y, Z) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer().
vertexAttribI3ui(Index,X,Y,Z) ->
cast(5551, <<Index:?GLuint,X:?GLuint,Y:?GLuint,Z:?GLuint>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI4ui(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
+-spec vertexAttribI4ui(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertexAttribI4ui(Index,X,Y,Z,W) ->
cast(5552, <<Index:?GLuint,X:?GLuint,Y:?GLuint,Z:?GLuint,W:?GLuint>>).
%% @equiv vertexAttribI1i(Index,X)
--spec vertexAttribI1iv(Index :: integer(),V) -> ok when V :: {X :: integer()}.
+-spec vertexAttribI1iv(Index :: integer(),V) -> 'ok' when V :: {X :: integer()}.
vertexAttribI1iv(Index,{X}) -> vertexAttribI1i(Index,X).
%% @equiv vertexAttribI2i(Index,X,Y)
--spec vertexAttribI2iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec vertexAttribI2iv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertexAttribI2iv(Index,{X,Y}) -> vertexAttribI2i(Index,X,Y).
%% @equiv vertexAttribI3i(Index,X,Y,Z)
--spec vertexAttribI3iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec vertexAttribI3iv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertexAttribI3iv(Index,{X,Y,Z}) -> vertexAttribI3i(Index,X,Y,Z).
%% @equiv vertexAttribI4i(Index,X,Y,Z,W)
--spec vertexAttribI4iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec vertexAttribI4iv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttribI4iv(Index,{X,Y,Z,W}) -> vertexAttribI4i(Index,X,Y,Z,W).
%% @equiv vertexAttribI1ui(Index,X)
--spec vertexAttribI1uiv(Index :: integer(),V) -> ok when V :: {X :: integer()}.
+-spec vertexAttribI1uiv(Index :: integer(),V) -> 'ok' when V :: {X :: integer()}.
vertexAttribI1uiv(Index,{X}) -> vertexAttribI1ui(Index,X).
%% @equiv vertexAttribI2ui(Index,X,Y)
--spec vertexAttribI2uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}.
+-spec vertexAttribI2uiv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertexAttribI2uiv(Index,{X,Y}) -> vertexAttribI2ui(Index,X,Y).
%% @equiv vertexAttribI3ui(Index,X,Y,Z)
--spec vertexAttribI3uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
+-spec vertexAttribI3uiv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertexAttribI3uiv(Index,{X,Y,Z}) -> vertexAttribI3ui(Index,X,Y,Z).
%% @equiv vertexAttribI4ui(Index,X,Y,Z,W)
--spec vertexAttribI4uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
+-spec vertexAttribI4uiv(Index :: integer(),V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertexAttribI4uiv(Index,{X,Y,Z,W}) -> vertexAttribI4ui(Index,X,Y,Z,W).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI4bv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttribI4bv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4bv(Index,{V1,V2,V3,V4}) ->
cast(5553, <<Index:?GLuint,V1:?GLbyte,V2:?GLbyte,V3:?GLbyte,V4:?GLbyte>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI4sv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttribI4sv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4sv(Index,{V1,V2,V3,V4}) ->
cast(5554, <<Index:?GLuint,V1:?GLshort,V2:?GLshort,V3:?GLshort,V4:?GLshort>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI4ubv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttribI4ubv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4ubv(Index,{V1,V2,V3,V4}) ->
cast(5555, <<Index:?GLuint,V1:?GLubyte,V2:?GLubyte,V3:?GLubyte,V4:?GLubyte>>).
%% @doc
%% See {@link vertexAttrib1d/2}
--spec vertexAttribI4usv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec vertexAttribI4usv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
vertexAttribI4usv(Index,{V1,V2,V3,V4}) ->
cast(5556, <<Index:?GLuint,V1:?GLushort,V2:?GLushort,V3:?GLushort,V4:?GLushort>>).
@@ -12529,7 +12529,7 @@ getUniformuiv(Program,Location) ->
%% More than one varying out variable is bound to the same color number.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFragDataLocation.xml">external</a> documentation.
--spec bindFragDataLocation(Program, Color, Name) -> ok when Program :: integer(),Color :: integer(),Name :: string().
+-spec bindFragDataLocation(Program, Color, Name) -> 'ok' when Program :: integer(),Color :: integer(),Name :: string().
bindFragDataLocation(Program,Color,Name) ->
cast(5558, <<Program:?GLuint,Color:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
@@ -12548,59 +12548,59 @@ getFragDataLocation(Program,Name) ->
%% @doc
%% See {@link uniform1f/2}
--spec uniform1ui(Location, V0) -> ok when Location :: integer(),V0 :: integer().
+-spec uniform1ui(Location, V0) -> 'ok' when Location :: integer(),V0 :: integer().
uniform1ui(Location,V0) ->
cast(5560, <<Location:?GLint,V0:?GLuint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2ui(Location, V0, V1) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer().
+-spec uniform2ui(Location, V0, V1) -> 'ok' when Location :: integer(),V0 :: integer(),V1 :: integer().
uniform2ui(Location,V0,V1) ->
cast(5561, <<Location:?GLint,V0:?GLuint,V1:?GLuint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3ui(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
+-spec uniform3ui(Location, V0, V1, V2) -> 'ok' when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
uniform3ui(Location,V0,V1,V2) ->
cast(5562, <<Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4ui(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
+-spec uniform4ui(Location, V0, V1, V2, V3) -> 'ok' when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
uniform4ui(Location,V0,V1,V2,V3) ->
cast(5563, <<Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform1uiv(Location, Value) -> ok when Location :: integer(),Value :: [integer()].
+-spec uniform1uiv(Location, Value) -> 'ok' when Location :: integer(),Value :: [integer()].
uniform1uiv(Location,Value) ->
cast(5564, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLuint>> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer()}].
+-spec uniform2uiv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{integer(),integer()}].
uniform2uiv(Location,Value) ->
cast(5565, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer()}].
+-spec uniform3uiv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{integer(),integer(),integer()}].
uniform3uiv(Location,Value) ->
cast(5566, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
+-spec uniform4uiv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
uniform4uiv(Location,Value) ->
cast(5567, <<Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link texParameterf/3}
--spec texParameterIiv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec texParameterIiv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texParameterIiv(Target,Pname,Params) ->
cast(5568, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -12608,7 +12608,7 @@ texParameterIiv(Target,Pname,Params) ->
%% @doc glTexParameterI
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameterI.xml">external</a> documentation.
--spec texParameterIuiv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: tuple().
+-spec texParameterIuiv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texParameterIuiv(Target,Pname,Params) ->
cast(5569, <<Target:?GLenum,Pname:?GLenum,(size(Params)):?GLuint,
(<< <<C:?GLuint>> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
@@ -12655,21 +12655,21 @@ getTexParameterIuiv(Target,Pname) ->
%% and the buffer being cleared is defined. However, this is not an error.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBuffer.xml">external</a> documentation.
--spec clearBufferiv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: tuple().
+-spec clearBufferiv(Buffer, Drawbuffer, Value) -> 'ok' when Buffer :: enum(),Drawbuffer :: integer(),Value :: tuple().
clearBufferiv(Buffer,Drawbuffer,Value) ->
cast(5572, <<Buffer:?GLenum,Drawbuffer:?GLint,(size(Value)):?GLuint,
(<< <<C:?GLint>> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>).
%% @doc
%% See {@link clearBufferiv/3}
--spec clearBufferuiv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: tuple().
+-spec clearBufferuiv(Buffer, Drawbuffer, Value) -> 'ok' when Buffer :: enum(),Drawbuffer :: integer(),Value :: tuple().
clearBufferuiv(Buffer,Drawbuffer,Value) ->
cast(5573, <<Buffer:?GLenum,Drawbuffer:?GLint,(size(Value)):?GLuint,
(<< <<C:?GLuint>> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>).
%% @doc
%% See {@link clearBufferiv/3}
--spec clearBufferfv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: tuple().
+-spec clearBufferfv(Buffer, Drawbuffer, Value) -> 'ok' when Buffer :: enum(),Drawbuffer :: integer(),Value :: tuple().
clearBufferfv(Buffer,Drawbuffer,Value) ->
cast(5574, <<Buffer:?GLenum,Drawbuffer:?GLint,(size(Value)):?GLuint,
(<< <<C:?GLfloat>> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>).
@@ -12677,7 +12677,7 @@ clearBufferfv(Buffer,Drawbuffer,Value) ->
%% @doc glClearBufferfi
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearBufferfi.xml">external</a> documentation.
--spec clearBufferfi(Buffer, Drawbuffer, Depth, Stencil) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Depth :: float(),Stencil :: integer().
+-spec clearBufferfi(Buffer, Drawbuffer, Depth, Stencil) -> 'ok' when Buffer :: enum(),Drawbuffer :: integer(),Depth :: float(),Stencil :: integer().
clearBufferfi(Buffer,Drawbuffer,Depth,Stencil) ->
cast(5575, <<Buffer:?GLenum,Drawbuffer:?GLint,Depth:?GLfloat,Stencil:?GLint>>).
@@ -12690,14 +12690,14 @@ getStringi(Name,Index) ->
%% @doc glDrawArraysInstance
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysInstance.xml">external</a> documentation.
--spec drawArraysInstanced(Mode, First, Count, Primcount) -> ok when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer().
+-spec drawArraysInstanced(Mode, First, Count, Primcount) -> 'ok' when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer().
drawArraysInstanced(Mode,First,Count,Primcount) ->
cast(5577, <<Mode:?GLenum,First:?GLint,Count:?GLsizei,Primcount:?GLsizei>>).
%% @doc glDrawElementsInstance
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstance.xml">external</a> documentation.
--spec drawElementsInstanced(Mode, Count, Type, Indices, Primcount) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer().
+-spec drawElementsInstanced(Mode, Count, Type, Indices, Primcount) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer().
drawElementsInstanced(Mode,Count,Type,Indices,Primcount) when is_integer(Indices) ->
cast(5578, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei>>);
drawElementsInstanced(Mode,Count,Type,Indices,Primcount) ->
@@ -12768,7 +12768,7 @@ drawElementsInstanced(Mode,Count,Type,Indices,Primcount) ->
%% or greater than or equal to the clamped number of texels in the texel array.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexBuffer.xml">external</a> documentation.
--spec texBuffer(Target, Internalformat, Buffer) -> ok when Target :: enum(),Internalformat :: enum(),Buffer :: integer().
+-spec texBuffer(Target, Internalformat, Buffer) -> 'ok' when Target :: enum(),Internalformat :: enum(),Buffer :: integer().
texBuffer(Target,Internalformat,Buffer) ->
cast(5580, <<Target:?GLenum,Internalformat:?GLenum,Buffer:?GLuint>>).
@@ -12790,7 +12790,7 @@ texBuffer(Target,Internalformat,Buffer) ->
%% occurs before the basevertex offset is added to the array index.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPrimitiveRestartIndex.xml">external</a> documentation.
--spec primitiveRestartIndex(Index) -> ok when Index :: integer().
+-spec primitiveRestartIndex(Index) -> 'ok' when Index :: integer().
primitiveRestartIndex(Index) ->
cast(5581, <<Index:?GLuint>>).
@@ -12860,7 +12860,7 @@ getBufferParameteri64v(Target,Pname) ->
%% is not zero, then `Textarget' must be `?GL_TEXTURE_3D'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferTexture.xml">external</a> documentation.
--spec framebufferTexture(Target, Attachment, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer().
+-spec framebufferTexture(Target, Attachment, Texture, Level) -> 'ok' when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer().
framebufferTexture(Target,Attachment,Texture,Level) ->
cast(5584, <<Target:?GLenum,Attachment:?GLenum,Texture:?GLuint,Level:?GLint>>).
@@ -12876,7 +12876,7 @@ framebufferTexture(Target,Attachment,Texture,Level) ->
%% `Index' must be less than the value of `?GL_MAX_VERTEX_ATTRIBUTES'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribDivisor.xml">external</a> documentation.
--spec vertexAttribDivisor(Index, Divisor) -> ok when Index :: integer(),Divisor :: integer().
+-spec vertexAttribDivisor(Index, Divisor) -> 'ok' when Index :: integer(),Divisor :: integer().
vertexAttribDivisor(Index,Divisor) ->
cast(5585, <<Index:?GLuint,Divisor:?GLuint>>).
@@ -12897,39 +12897,39 @@ vertexAttribDivisor(Index,Divisor) ->
%% that subset of the fragment's samples is implementation dependent.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMinSampleShading.xml">external</a> documentation.
--spec minSampleShading(Value) -> ok when Value :: clamp().
+-spec minSampleShading(Value) -> 'ok' when Value :: clamp().
minSampleShading(Value) ->
cast(5586, <<Value:?GLclampf>>).
%% @doc
%% See {@link blendEquation/1}
--spec blendEquationi(Buf, Mode) -> ok when Buf :: integer(),Mode :: enum().
+-spec blendEquationi(Buf, Mode) -> 'ok' when Buf :: integer(),Mode :: enum().
blendEquationi(Buf,Mode) ->
cast(5587, <<Buf:?GLuint,Mode:?GLenum>>).
%% @doc
%% See {@link blendEquationSeparate/2}
--spec blendEquationSeparatei(Buf, ModeRGB, ModeAlpha) -> ok when Buf :: integer(),ModeRGB :: enum(),ModeAlpha :: enum().
+-spec blendEquationSeparatei(Buf, ModeRGB, ModeAlpha) -> 'ok' when Buf :: integer(),ModeRGB :: enum(),ModeAlpha :: enum().
blendEquationSeparatei(Buf,ModeRGB,ModeAlpha) ->
cast(5588, <<Buf:?GLuint,ModeRGB:?GLenum,ModeAlpha:?GLenum>>).
%% @doc glBlendFunci
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunci.xml">external</a> documentation.
--spec blendFunci(Buf, Src, Dst) -> ok when Buf :: integer(),Src :: enum(),Dst :: enum().
+-spec blendFunci(Buf, Src, Dst) -> 'ok' when Buf :: integer(),Src :: enum(),Dst :: enum().
blendFunci(Buf,Src,Dst) ->
cast(5589, <<Buf:?GLuint,Src:?GLenum,Dst:?GLenum>>).
%% @doc
%% See {@link blendFuncSeparate/4}
--spec blendFuncSeparatei(Buf, SrcRGB, DstRGB, SrcAlpha, DstAlpha) -> ok when Buf :: integer(),SrcRGB :: enum(),DstRGB :: enum(),SrcAlpha :: enum(),DstAlpha :: enum().
+-spec blendFuncSeparatei(Buf, SrcRGB, DstRGB, SrcAlpha, DstAlpha) -> 'ok' when Buf :: integer(),SrcRGB :: enum(),DstRGB :: enum(),SrcAlpha :: enum(),DstAlpha :: enum().
blendFuncSeparatei(Buf,SrcRGB,DstRGB,SrcAlpha,DstAlpha) ->
cast(5590, <<Buf:?GLuint,SrcRGB:?GLenum,DstRGB:?GLenum,SrcAlpha:?GLenum,DstAlpha:?GLenum>>).
%% @doc glLoadTransposeMatrixARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrixARB.xml">external</a> documentation.
--spec loadTransposeMatrixfARB(M) -> ok when M :: matrix().
+-spec loadTransposeMatrixfARB(M) -> 'ok' when M :: matrix().
loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5591, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -12938,7 +12938,7 @@ loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc glLoadTransposeMatrixARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLoadTransposeMatrixARB.xml">external</a> documentation.
--spec loadTransposeMatrixdARB(M) -> ok when M :: matrix().
+-spec loadTransposeMatrixdARB(M) -> 'ok' when M :: matrix().
loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5592, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -12947,7 +12947,7 @@ loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc glMultTransposeMatrixARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrixARB.xml">external</a> documentation.
--spec multTransposeMatrixfARB(M) -> ok when M :: matrix().
+-spec multTransposeMatrixfARB(M) -> 'ok' when M :: matrix().
multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5593, <<M1:?GLfloat,M2:?GLfloat,M3:?GLfloat,M4:?GLfloat,M5:?GLfloat,M6:?GLfloat,M7:?GLfloat,M8:?GLfloat,M9:?GLfloat,M10:?GLfloat,M11:?GLfloat,M12:?GLfloat,M13:?GLfloat,M14:?GLfloat,M15:?GLfloat,M16:?GLfloat>>);
multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -12956,7 +12956,7 @@ multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc glMultTransposeMatrixARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMultTransposeMatrixARB.xml">external</a> documentation.
--spec multTransposeMatrixdARB(M) -> ok when M :: matrix().
+-spec multTransposeMatrixdARB(M) -> 'ok' when M :: matrix().
multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5594, <<M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble>>);
multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
@@ -12965,7 +12965,7 @@ multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightbvARB(Weights) -> ok when Weights :: [integer()].
+-spec weightbvARB(Weights) -> 'ok' when Weights :: [integer()].
weightbvARB(Weights) ->
cast(5595, <<(length(Weights)):?GLuint,
(<< <<C:?GLbyte>> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>).
@@ -12973,7 +12973,7 @@ weightbvARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightsvARB(Weights) -> ok when Weights :: [integer()].
+-spec weightsvARB(Weights) -> 'ok' when Weights :: [integer()].
weightsvARB(Weights) ->
cast(5596, <<(length(Weights)):?GLuint,
(<< <<C:?GLshort>> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>).
@@ -12981,7 +12981,7 @@ weightsvARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightivARB(Weights) -> ok when Weights :: [integer()].
+-spec weightivARB(Weights) -> 'ok' when Weights :: [integer()].
weightivARB(Weights) ->
cast(5597, <<(length(Weights)):?GLuint,
(<< <<C:?GLint>> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>).
@@ -12989,7 +12989,7 @@ weightivARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightfvARB(Weights) -> ok when Weights :: [float()].
+-spec weightfvARB(Weights) -> 'ok' when Weights :: [float()].
weightfvARB(Weights) ->
cast(5598, <<(length(Weights)):?GLuint,
(<< <<C:?GLfloat>> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>).
@@ -12997,7 +12997,7 @@ weightfvARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightdvARB(Weights) -> ok when Weights :: [float()].
+-spec weightdvARB(Weights) -> 'ok' when Weights :: [float()].
weightdvARB(Weights) ->
cast(5599, <<(length(Weights)):?GLuint,0:32,
(<< <<C:?GLdouble>> || C <- Weights>>)/binary>>).
@@ -13005,7 +13005,7 @@ weightdvARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightubvARB(Weights) -> ok when Weights :: [integer()].
+-spec weightubvARB(Weights) -> 'ok' when Weights :: [integer()].
weightubvARB(Weights) ->
cast(5600, <<(length(Weights)):?GLuint,
(<< <<C:?GLubyte>> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>).
@@ -13013,7 +13013,7 @@ weightubvARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightusvARB(Weights) -> ok when Weights :: [integer()].
+-spec weightusvARB(Weights) -> 'ok' when Weights :: [integer()].
weightusvARB(Weights) ->
cast(5601, <<(length(Weights)):?GLuint,
(<< <<C:?GLushort>> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>).
@@ -13021,7 +13021,7 @@ weightusvARB(Weights) ->
%% @doc glWeightARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWeightARB.xml">external</a> documentation.
--spec weightuivARB(Weights) -> ok when Weights :: [integer()].
+-spec weightuivARB(Weights) -> 'ok' when Weights :: [integer()].
weightuivARB(Weights) ->
cast(5602, <<(length(Weights)):?GLuint,
(<< <<C:?GLuint>> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>).
@@ -13029,21 +13029,21 @@ weightuivARB(Weights) ->
%% @doc glVertexBlenARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexBlenARB.xml">external</a> documentation.
--spec vertexBlendARB(Count) -> ok when Count :: integer().
+-spec vertexBlendARB(Count) -> 'ok' when Count :: integer().
vertexBlendARB(Count) ->
cast(5603, <<Count:?GLint>>).
%% @doc glCurrentPaletteMatrixARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCurrentPaletteMatrixARB.xml">external</a> documentation.
--spec currentPaletteMatrixARB(Index) -> ok when Index :: integer().
+-spec currentPaletteMatrixARB(Index) -> 'ok' when Index :: integer().
currentPaletteMatrixARB(Index) ->
cast(5604, <<Index:?GLint>>).
%% @doc glMatrixIndexARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
--spec matrixIndexubvARB(Indices) -> ok when Indices :: [integer()].
+-spec matrixIndexubvARB(Indices) -> 'ok' when Indices :: [integer()].
matrixIndexubvARB(Indices) ->
cast(5605, <<(length(Indices)):?GLuint,
(<< <<C:?GLubyte>> || C <- Indices>>)/binary,0:((8-((length(Indices)+ 4) rem 8)) rem 8)>>).
@@ -13051,7 +13051,7 @@ matrixIndexubvARB(Indices) ->
%% @doc glMatrixIndexARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
--spec matrixIndexusvARB(Indices) -> ok when Indices :: [integer()].
+-spec matrixIndexusvARB(Indices) -> 'ok' when Indices :: [integer()].
matrixIndexusvARB(Indices) ->
cast(5606, <<(length(Indices)):?GLuint,
(<< <<C:?GLushort>> || C <- Indices>>)/binary,0:((8-((length(Indices)*2+ 4) rem 8)) rem 8)>>).
@@ -13059,7 +13059,7 @@ matrixIndexusvARB(Indices) ->
%% @doc glMatrixIndexARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixIndexARB.xml">external</a> documentation.
--spec matrixIndexuivARB(Indices) -> ok when Indices :: [integer()].
+-spec matrixIndexuivARB(Indices) -> 'ok' when Indices :: [integer()].
matrixIndexuivARB(Indices) ->
cast(5607, <<(length(Indices)):?GLuint,
(<< <<C:?GLuint>> || C <- Indices>>)/binary,0:(((1+length(Indices)) rem 2)*32)>>).
@@ -13067,21 +13067,21 @@ matrixIndexuivARB(Indices) ->
%% @doc glProgramStringARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramStringARB.xml">external</a> documentation.
--spec programStringARB(Target, Format, String) -> ok when Target :: enum(),Format :: enum(),String :: string().
+-spec programStringARB(Target, Format, String) -> 'ok' when Target :: enum(),Format :: enum(),String :: string().
programStringARB(Target,Format,String) ->
cast(5608, <<Target:?GLenum,Format:?GLenum,(list_to_binary([String|[0]]))/binary,0:((8-((length(String)+ 1) rem 8)) rem 8)>>).
%% @doc glBindProgramARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindProgramARB.xml">external</a> documentation.
--spec bindProgramARB(Target, Program) -> ok when Target :: enum(),Program :: integer().
+-spec bindProgramARB(Target, Program) -> 'ok' when Target :: enum(),Program :: integer().
bindProgramARB(Target,Program) ->
cast(5609, <<Target:?GLenum,Program:?GLuint>>).
%% @doc glDeleteProgramsARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgramsARB.xml">external</a> documentation.
--spec deleteProgramsARB(Programs) -> ok when Programs :: [integer()].
+-spec deleteProgramsARB(Programs) -> 'ok' when Programs :: [integer()].
deleteProgramsARB(Programs) ->
cast(5610, <<(length(Programs)):?GLuint,
(<< <<C:?GLuint>> || C <- Programs>>)/binary,0:(((1+length(Programs)) rem 2)*32)>>).
@@ -13096,56 +13096,56 @@ genProgramsARB(N) ->
%% @doc glProgramEnvParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4dARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec programEnvParameter4dARB(Target, Index, X, Y, Z, W) -> 'ok' when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programEnvParameter4dARB(Target,Index,X,Y,Z,W) ->
cast(5612, <<Target:?GLenum,Index:?GLuint,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @doc glProgramEnvParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4dvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
+-spec programEnvParameter4dvARB(Target, Index, Params) -> 'ok' when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programEnvParameter4dvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5613, <<Target:?GLenum,Index:?GLuint,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble>>).
%% @doc glProgramEnvParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4fARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec programEnvParameter4fARB(Target, Index, X, Y, Z, W) -> 'ok' when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programEnvParameter4fARB(Target,Index,X,Y,Z,W) ->
cast(5614, <<Target:?GLenum,Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
%% @doc glProgramEnvParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramEnvParameterARB.xml">external</a> documentation.
--spec programEnvParameter4fvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
+-spec programEnvParameter4fvARB(Target, Index, Params) -> 'ok' when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programEnvParameter4fvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5615, <<Target:?GLenum,Index:?GLuint,P1:?GLfloat,P2:?GLfloat,P3:?GLfloat,P4:?GLfloat>>).
%% @doc glProgramLocalParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4dARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec programLocalParameter4dARB(Target, Index, X, Y, Z, W) -> 'ok' when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programLocalParameter4dARB(Target,Index,X,Y,Z,W) ->
cast(5616, <<Target:?GLenum,Index:?GLuint,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @doc glProgramLocalParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4dvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
+-spec programLocalParameter4dvARB(Target, Index, Params) -> 'ok' when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programLocalParameter4dvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5617, <<Target:?GLenum,Index:?GLuint,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble>>).
%% @doc glProgramLocalParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4fARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec programLocalParameter4fARB(Target, Index, X, Y, Z, W) -> 'ok' when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
programLocalParameter4fARB(Target,Index,X,Y,Z,W) ->
cast(5618, <<Target:?GLenum,Index:?GLuint,X:?GLfloat,Y:?GLfloat,Z:?GLfloat,W:?GLfloat>>).
%% @doc glProgramLocalParameterARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramLocalParameterARB.xml">external</a> documentation.
--spec programLocalParameter4fvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
+-spec programLocalParameter4fvARB(Target, Index, Params) -> 'ok' when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}.
programLocalParameter4fvARB(Target,Index,{P1,P2,P3,P4}) ->
cast(5619, <<Target:?GLenum,Index:?GLuint,P1:?GLfloat,P2:?GLfloat,P3:?GLfloat,P4:?GLfloat>>).
@@ -13180,7 +13180,7 @@ getProgramLocalParameterfvARB(Target,Index) ->
%% @doc glGetProgramStringARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetProgramStringARB.xml">external</a> documentation.
--spec getProgramStringARB(Target, Pname, String) -> ok when Target :: enum(),Pname :: enum(),String :: mem().
+-spec getProgramStringARB(Target, Pname, String) -> 'ok' when Target :: enum(),Pname :: enum(),String :: mem().
getProgramStringARB(Target,Pname,String) ->
send_bin(String),
call(5624, <<Target:?GLenum,Pname:?GLenum>>).
@@ -13195,7 +13195,7 @@ getBufferParameterivARB(Target,Pname) ->
%% @doc glDeleteObjectARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteObjectARB.xml">external</a> documentation.
--spec deleteObjectARB(Obj) -> ok when Obj :: integer().
+-spec deleteObjectARB(Obj) -> 'ok' when Obj :: integer().
deleteObjectARB(Obj) ->
cast(5626, <<Obj:?GLhandleARB>>).
@@ -13209,7 +13209,7 @@ getHandleARB(Pname) ->
%% @doc glDetachObjectARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDetachObjectARB.xml">external</a> documentation.
--spec detachObjectARB(ContainerObj, AttachedObj) -> ok when ContainerObj :: integer(),AttachedObj :: integer().
+-spec detachObjectARB(ContainerObj, AttachedObj) -> 'ok' when ContainerObj :: integer(),AttachedObj :: integer().
detachObjectARB(ContainerObj,AttachedObj) ->
cast(5628, <<ContainerObj:?GLhandleARB,AttachedObj:?GLhandleARB>>).
@@ -13223,7 +13223,7 @@ createShaderObjectARB(ShaderType) ->
%% @doc glShaderSourceARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderSourceARB.xml">external</a> documentation.
--spec shaderSourceARB(ShaderObj, String) -> ok when ShaderObj :: integer(),String :: iolist().
+-spec shaderSourceARB(ShaderObj, String) -> 'ok' when ShaderObj :: integer(),String :: iolist().
shaderSourceARB(ShaderObj,String) ->
StringTemp = list_to_binary([[Str|[0]] || Str <- String ]),
cast(5630, <<ShaderObj:?GLhandleARB,(length(String)):?GLuint,(size(StringTemp)):?GLuint,(StringTemp)/binary,0:((8-((size(StringTemp)+4) rem 8)) rem 8)>>).
@@ -13231,7 +13231,7 @@ shaderSourceARB(ShaderObj,String) ->
%% @doc glCompileShaderARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShaderARB.xml">external</a> documentation.
--spec compileShaderARB(ShaderObj) -> ok when ShaderObj :: integer().
+-spec compileShaderARB(ShaderObj) -> 'ok' when ShaderObj :: integer().
compileShaderARB(ShaderObj) ->
cast(5631, <<ShaderObj:?GLhandleARB>>).
@@ -13245,28 +13245,28 @@ createProgramObjectARB() ->
%% @doc glAttachObjectARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glAttachObjectARB.xml">external</a> documentation.
--spec attachObjectARB(ContainerObj, Obj) -> ok when ContainerObj :: integer(),Obj :: integer().
+-spec attachObjectARB(ContainerObj, Obj) -> 'ok' when ContainerObj :: integer(),Obj :: integer().
attachObjectARB(ContainerObj,Obj) ->
cast(5633, <<ContainerObj:?GLhandleARB,Obj:?GLhandleARB>>).
%% @doc glLinkProgramARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glLinkProgramARB.xml">external</a> documentation.
--spec linkProgramARB(ProgramObj) -> ok when ProgramObj :: integer().
+-spec linkProgramARB(ProgramObj) -> 'ok' when ProgramObj :: integer().
linkProgramARB(ProgramObj) ->
cast(5634, <<ProgramObj:?GLhandleARB>>).
%% @doc glUseProgramObjectARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgramObjectARB.xml">external</a> documentation.
--spec useProgramObjectARB(ProgramObj) -> ok when ProgramObj :: integer().
+-spec useProgramObjectARB(ProgramObj) -> 'ok' when ProgramObj :: integer().
useProgramObjectARB(ProgramObj) ->
cast(5635, <<ProgramObj:?GLhandleARB>>).
%% @doc glValidateProgramARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgramARB.xml">external</a> documentation.
--spec validateProgramARB(ProgramObj) -> ok when ProgramObj :: integer().
+-spec validateProgramARB(ProgramObj) -> 'ok' when ProgramObj :: integer().
validateProgramARB(ProgramObj) ->
cast(5636, <<ProgramObj:?GLhandleARB>>).
@@ -13336,7 +13336,7 @@ getShaderSourceARB(Obj,MaxLength) ->
%% @doc glBindAttribLocationARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindAttribLocationARB.xml">external</a> documentation.
--spec bindAttribLocationARB(ProgramObj, Index, Name) -> ok when ProgramObj :: integer(),Index :: integer(),Name :: string().
+-spec bindAttribLocationARB(ProgramObj, Index, Name) -> 'ok' when ProgramObj :: integer(),Index :: integer(),Name :: string().
bindAttribLocationARB(ProgramObj,Index,Name) ->
cast(5646, <<ProgramObj:?GLhandleARB,Index:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
@@ -13378,7 +13378,7 @@ isRenderbuffer(Renderbuffer) ->
%% object to `Target' .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindRenderbuffer.xml">external</a> documentation.
--spec bindRenderbuffer(Target, Renderbuffer) -> ok when Target :: enum(),Renderbuffer :: integer().
+-spec bindRenderbuffer(Target, Renderbuffer) -> 'ok' when Target :: enum(),Renderbuffer :: integer().
bindRenderbuffer(Target,Renderbuffer) ->
cast(5650, <<Target:?GLenum,Renderbuffer:?GLuint>>).
@@ -13400,7 +13400,7 @@ bindRenderbuffer(Target,Renderbuffer) ->
%% renderbuffer image is specifically `not' detached from any non-bound framebuffers.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteRenderbuffers.xml">external</a> documentation.
--spec deleteRenderbuffers(Renderbuffers) -> ok when Renderbuffers :: [integer()].
+-spec deleteRenderbuffers(Renderbuffers) -> 'ok' when Renderbuffers :: [integer()].
deleteRenderbuffers(Renderbuffers) ->
cast(5651, <<(length(Renderbuffers)):?GLuint,
(<< <<C:?GLuint>> || C <- Renderbuffers>>)/binary,0:(((1+length(Renderbuffers)) rem 2)*32)>>).
@@ -13440,7 +13440,7 @@ genRenderbuffers(N) ->
%% undefined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderbufferStorage.xml">external</a> documentation.
--spec renderbufferStorage(Target, Internalformat, Width, Height) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer().
+-spec renderbufferStorage(Target, Internalformat, Width, Height) -> 'ok' when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer().
renderbufferStorage(Target,Internalformat,Width,Height) ->
cast(5653, <<Target:?GLenum,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei>>).
@@ -13500,7 +13500,7 @@ isFramebuffer(Framebuffer) ->
%% object to `Target' .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFramebuffer.xml">external</a> documentation.
--spec bindFramebuffer(Target, Framebuffer) -> ok when Target :: enum(),Framebuffer :: integer().
+-spec bindFramebuffer(Target, Framebuffer) -> 'ok' when Target :: enum(),Framebuffer :: integer().
bindFramebuffer(Target,Framebuffer) ->
cast(5656, <<Target:?GLenum,Framebuffer:?GLuint>>).
@@ -13515,7 +13515,7 @@ bindFramebuffer(Target,Framebuffer) ->
%% had been executed with the corresponding `Target' and `Framebuffer' zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteFramebuffers.xml">external</a> documentation.
--spec deleteFramebuffers(Framebuffers) -> ok when Framebuffers :: [integer()].
+-spec deleteFramebuffers(Framebuffers) -> 'ok' when Framebuffers :: [integer()].
deleteFramebuffers(Framebuffers) ->
cast(5657, <<(length(Framebuffers)):?GLuint,
(<< <<C:?GLuint>> || C <- Framebuffers>>)/binary,0:(((1+length(Framebuffers)) rem 2)*32)>>).
@@ -13591,19 +13591,19 @@ checkFramebufferStatus(Target) ->
%% @doc
%% See {@link framebufferTexture/4}
--spec framebufferTexture1D(Target, Attachment, Textarget, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer().
+-spec framebufferTexture1D(Target, Attachment, Textarget, Texture, Level) -> 'ok' when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer().
framebufferTexture1D(Target,Attachment,Textarget,Texture,Level) ->
cast(5660, <<Target:?GLenum,Attachment:?GLenum,Textarget:?GLenum,Texture:?GLuint,Level:?GLint>>).
%% @doc
%% See {@link framebufferTexture/4}
--spec framebufferTexture2D(Target, Attachment, Textarget, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer().
+-spec framebufferTexture2D(Target, Attachment, Textarget, Texture, Level) -> 'ok' when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer().
framebufferTexture2D(Target,Attachment,Textarget,Texture,Level) ->
cast(5661, <<Target:?GLenum,Attachment:?GLenum,Textarget:?GLenum,Texture:?GLuint,Level:?GLint>>).
%% @doc
%% See {@link framebufferTexture/4}
--spec framebufferTexture3D(Target, Attachment, Textarget, Texture, Level, Zoffset) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer(),Zoffset :: integer().
+-spec framebufferTexture3D(Target, Attachment, Textarget, Texture, Level, Zoffset) -> 'ok' when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer(),Zoffset :: integer().
framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) ->
cast(5662, <<Target:?GLenum,Attachment:?GLenum,Textarget:?GLenum,Texture:?GLuint,Level:?GLint,Zoffset:?GLint>>).
@@ -13635,7 +13635,7 @@ framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) ->
%% .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFramebufferRenderbuffer.xml">external</a> documentation.
--spec framebufferRenderbuffer(Target, Attachment, Renderbuffertarget, Renderbuffer) -> ok when Target :: enum(),Attachment :: enum(),Renderbuffertarget :: enum(),Renderbuffer :: integer().
+-spec framebufferRenderbuffer(Target, Attachment, Renderbuffertarget, Renderbuffer) -> 'ok' when Target :: enum(),Attachment :: enum(),Renderbuffertarget :: enum(),Renderbuffer :: integer().
framebufferRenderbuffer(Target,Attachment,Renderbuffertarget,Renderbuffer) ->
cast(5663, <<Target:?GLenum,Attachment:?GLenum,Renderbuffertarget:?GLenum,Renderbuffer:?GLuint>>).
@@ -13751,7 +13751,7 @@ getFramebufferAttachmentParameteriv(Target,Attachment,Pname) ->
%% independently.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGenerateMipmap.xml">external</a> documentation.
--spec generateMipmap(Target) -> ok when Target :: enum().
+-spec generateMipmap(Target) -> 'ok' when Target :: enum().
generateMipmap(Target) ->
cast(5665, <<Target:?GLenum>>).
@@ -13793,7 +13793,7 @@ generateMipmap(Target) ->
%% buffers are the same, the result of the operation is undefined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlitFramebuffer.xml">external</a> documentation.
--spec blitFramebuffer(SrcX0, SrcY0, SrcX1, SrcY1, DstX0, DstY0, DstX1, DstY1, Mask, Filter) -> ok when SrcX0 :: integer(),SrcY0 :: integer(),SrcX1 :: integer(),SrcY1 :: integer(),DstX0 :: integer(),DstY0 :: integer(),DstX1 :: integer(),DstY1 :: integer(),Mask :: integer(),Filter :: enum().
+-spec blitFramebuffer(SrcX0, SrcY0, SrcX1, SrcY1, DstX0, DstY0, DstX1, DstY1, Mask, Filter) -> 'ok' when SrcX0 :: integer(),SrcY0 :: integer(),SrcX1 :: integer(),SrcY1 :: integer(),DstX0 :: integer(),DstY0 :: integer(),DstX1 :: integer(),DstY1 :: integer(),Mask :: integer(),Filter :: enum().
blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) ->
cast(5666, <<SrcX0:?GLint,SrcY0:?GLint,SrcX1:?GLint,SrcY1:?GLint,DstX0:?GLint,DstY0:?GLint,DstX1:?GLint,DstY1:?GLint,Mask:?GLbitfield,Filter:?GLenum>>).
@@ -13817,19 +13817,19 @@ blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) ->
%% are undefined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glRenderbufferStorageMultisample.xml">external</a> documentation.
--spec renderbufferStorageMultisample(Target, Samples, Internalformat, Width, Height) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer().
+-spec renderbufferStorageMultisample(Target, Samples, Internalformat, Width, Height) -> 'ok' when Target :: enum(),Samples :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer().
renderbufferStorageMultisample(Target,Samples,Internalformat,Width,Height) ->
cast(5667, <<Target:?GLenum,Samples:?GLsizei,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei>>).
%% @doc
%% See {@link framebufferTexture/4}
--spec framebufferTextureLayer(Target, Attachment, Texture, Level, Layer) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Layer :: integer().
+-spec framebufferTextureLayer(Target, Attachment, Texture, Level, Layer) -> 'ok' when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Layer :: integer().
framebufferTextureLayer(Target,Attachment,Texture,Level,Layer) ->
cast(5668, <<Target:?GLenum,Attachment:?GLenum,Texture:?GLuint,Level:?GLint,Layer:?GLint>>).
%% @doc
%% See {@link framebufferTexture/4}
--spec framebufferTextureFaceARB(Target, Attachment, Texture, Level, Face) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Face :: enum().
+-spec framebufferTextureFaceARB(Target, Attachment, Texture, Level, Face) -> 'ok' when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Face :: enum().
framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) ->
cast(5669, <<Target:?GLenum,Attachment:?GLenum,Texture:?GLuint,Level:?GLint,Face:?GLenum>>).
@@ -13843,7 +13843,7 @@ framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) ->
%% to indicate distinct subranges of the mapping which require flushing.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glFlushMappedBufferRange.xml">external</a> documentation.
--spec flushMappedBufferRange(Target, Offset, Length) -> ok when Target :: enum(),Offset :: integer(),Length :: integer().
+-spec flushMappedBufferRange(Target, Offset, Length) -> 'ok' when Target :: enum(),Offset :: integer(),Length :: integer().
flushMappedBufferRange(Target,Offset,Length) ->
cast(5670, <<Target:?GLenum,0:32,Offset:?GLintptr,Length:?GLsizeiptr>>).
@@ -13858,7 +13858,7 @@ flushMappedBufferRange(Target,Offset,Length) ->
%% array object, and any previous vertex array object binding is broken.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindVertexArray.xml">external</a> documentation.
--spec bindVertexArray(Array) -> ok when Array :: integer().
+-spec bindVertexArray(Array) -> 'ok' when Array :: integer().
bindVertexArray(Array) ->
cast(5671, <<Array:?GLuint>>).
@@ -13871,7 +13871,7 @@ bindVertexArray(Array) ->
%% current. Unused names in `Arrays' are silently ignored, as is the value zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteVertexArrays.xml">external</a> documentation.
--spec deleteVertexArrays(Arrays) -> ok when Arrays :: [integer()].
+-spec deleteVertexArrays(Arrays) -> 'ok' when Arrays :: [integer()].
deleteVertexArrays(Arrays) ->
cast(5672, <<(length(Arrays)):?GLuint,
(<< <<C:?GLuint>> || C <- Arrays>>)/binary,0:(((1+length(Arrays)) rem 2)*32)>>).
@@ -14045,7 +14045,7 @@ getUniformBlockIndex(Program,UniformBlockName) ->
%% vertex, geometry, or fragment programming stages of program, respectively, is returned.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetActiveUniformBlock.xml">external</a> documentation.
--spec getActiveUniformBlockiv(Program, UniformBlockIndex, Pname, Params) -> ok when Program :: integer(),UniformBlockIndex :: integer(),Pname :: enum(),Params :: mem().
+-spec getActiveUniformBlockiv(Program, UniformBlockIndex, Pname, Params) -> 'ok' when Program :: integer(),UniformBlockIndex :: integer(),Pname :: enum(),Params :: mem().
getActiveUniformBlockiv(Program,UniformBlockIndex,Pname,Params) ->
send_bin(Params),
call(5679, <<Program:?GLuint,UniformBlockIndex:?GLuint,Pname:?GLenum>>).
@@ -14095,7 +14095,7 @@ getActiveUniformBlockName(Program,UniformBlockIndex,BufSize) ->
%% assigned to each of its active uniform blocks is reset to zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformBlockBinding.xml">external</a> documentation.
--spec uniformBlockBinding(Program, UniformBlockIndex, UniformBlockBinding) -> ok when Program :: integer(),UniformBlockIndex :: integer(),UniformBlockBinding :: integer().
+-spec uniformBlockBinding(Program, UniformBlockIndex, UniformBlockBinding) -> 'ok' when Program :: integer(),UniformBlockIndex :: integer(),UniformBlockBinding :: integer().
uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) ->
cast(5681, <<Program:?GLuint,UniformBlockIndex:?GLuint,UniformBlockBinding:?GLuint>>).
@@ -14121,7 +14121,7 @@ uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) ->
%% , `Writeoffset' and `Size' must not overlap.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCopyBufferSubData.xml">external</a> documentation.
--spec copyBufferSubData(ReadTarget, WriteTarget, ReadOffset, WriteOffset, Size) -> ok when ReadTarget :: enum(),WriteTarget :: enum(),ReadOffset :: integer(),WriteOffset :: integer(),Size :: integer().
+-spec copyBufferSubData(ReadTarget, WriteTarget, ReadOffset, WriteOffset, Size) -> 'ok' when ReadTarget :: enum(),WriteTarget :: enum(),ReadOffset :: integer(),WriteOffset :: integer(),Size :: integer().
copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) ->
cast(5682, <<ReadTarget:?GLenum,WriteTarget:?GLenum,ReadOffset:?GLintptr,WriteOffset:?GLintptr,Size:?GLsizeiptr>>).
@@ -14135,7 +14135,7 @@ copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) ->
%% operation is undefined if the sum would be negative.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsBaseVertex.xml">external</a> documentation.
--spec drawElementsBaseVertex(Mode, Count, Type, Indices, Basevertex) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer().
+-spec drawElementsBaseVertex(Mode, Count, Type, Indices, Basevertex) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer().
drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) when is_integer(Indices) ->
cast(5683, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Basevertex:?GLint>>);
drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) ->
@@ -14157,7 +14157,7 @@ drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) ->
%% if the sum would be negative.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElementsBaseVertex.xml">external</a> documentation.
--spec drawRangeElementsBaseVertex(Mode, Start, End, Count, Type, Indices, Basevertex) -> ok when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer().
+-spec drawRangeElementsBaseVertex(Mode, Start, End, Count, Type, Indices, Basevertex) -> 'ok' when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer().
drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) when is_integer(Indices) ->
cast(5685, <<Mode:?GLenum,Start:?GLuint,End:?GLuint,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Basevertex:?GLint>>);
drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) ->
@@ -14174,7 +14174,7 @@ drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) ->
%% conditions). The operation is undefined if the sum would be negative.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseVertex.xml">external</a> documentation.
--spec drawElementsInstancedBaseVertex(Mode, Count, Type, Indices, Primcount, Basevertex) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer().
+-spec drawElementsInstancedBaseVertex(Mode, Count, Type, Indices, Primcount, Basevertex) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer().
drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) when is_integer(Indices) ->
cast(5687, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei,Basevertex:?GLint>>);
drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) ->
@@ -14211,7 +14211,7 @@ drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) ->
%% by using the flat qualifier when declaring the output.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProvokingVertex.xml">external</a> documentation.
--spec provokingVertex(Mode) -> ok when Mode :: enum().
+-spec provokingVertex(Mode) -> 'ok' when Mode :: enum().
provokingVertex(Mode) ->
cast(5689, <<Mode:?GLenum>>).
@@ -14263,7 +14263,7 @@ isSync(Sync) ->
%% ``gl:deleteSync'' will silently ignore a `Sync' value of zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteSync.xml">external</a> documentation.
--spec deleteSync(Sync) -> ok when Sync :: integer().
+-spec deleteSync(Sync) -> 'ok' when Sync :: integer().
deleteSync(Sync) ->
cast(5692, <<Sync:?GLsync>>).
@@ -14311,7 +14311,7 @@ clientWaitSync(Sync,Flags,Timeout) ->
%% If an error occurs, ``gl:waitSync'' does not cause the GL server to block.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glWaitSync.xml">external</a> documentation.
--spec waitSync(Sync, Flags, Timeout) -> ok when Sync :: integer(),Flags :: integer(),Timeout :: integer().
+-spec waitSync(Sync, Flags, Timeout) -> 'ok' when Sync :: integer(),Flags :: integer(),Timeout :: integer().
waitSync(Sync,Flags,Timeout) ->
cast(5694, <<Sync:?GLsync,Flags:?GLbitfield,0:32,Timeout:?GLuint64>>).
@@ -14380,7 +14380,7 @@ getSynciv(Sync,Pname,BufSize) ->
%% on the multisample texture targets.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2DMultisample.xml">external</a> documentation.
--spec texImage2DMultisample(Target, Samples, Internalformat, Width, Height, Fixedsamplelocations) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Fixedsamplelocations :: 0|1.
+-spec texImage2DMultisample(Target, Samples, Internalformat, Width, Height, Fixedsamplelocations) -> 'ok' when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Fixedsamplelocations :: 0|1.
texImage2DMultisample(Target,Samples,Internalformat,Width,Height,Fixedsamplelocations) ->
cast(5697, <<Target:?GLenum,Samples:?GLsizei,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Fixedsamplelocations:?GLboolean>>).
@@ -14408,7 +14408,7 @@ texImage2DMultisample(Target,Samples,Internalformat,Width,Height,Fixedsampleloca
%% on the multisample texture targets.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3DMultisample.xml">external</a> documentation.
--spec texImage3DMultisample(Target, Samples, Internalformat, Width, Height, Depth, Fixedsamplelocations) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Fixedsamplelocations :: 0|1.
+-spec texImage3DMultisample(Target, Samples, Internalformat, Width, Height, Depth, Fixedsamplelocations) -> 'ok' when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Fixedsamplelocations :: 0|1.
texImage3DMultisample(Target,Samples,Internalformat,Width,Height,Depth,Fixedsamplelocations) ->
cast(5698, <<Target:?GLenum,Samples:?GLsizei,Internalformat:?GLint,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei,Fixedsamplelocations:?GLboolean>>).
@@ -14441,28 +14441,28 @@ getMultisamplefv(Pname,Index) ->
%% to sample 32 x `M' + `B'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSampleMaski.xml">external</a> documentation.
--spec sampleMaski(Index, Mask) -> ok when Index :: integer(),Mask :: integer().
+-spec sampleMaski(Index, Mask) -> 'ok' when Index :: integer(),Mask :: integer().
sampleMaski(Index,Mask) ->
cast(5700, <<Index:?GLuint,Mask:?GLbitfield>>).
%% @doc glNamedStringARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glNamedStringARB.xml">external</a> documentation.
--spec namedStringARB(Type, Name, String) -> ok when Type :: enum(),Name :: string(),String :: string().
+-spec namedStringARB(Type, Name, String) -> 'ok' when Type :: enum(),Name :: string(),String :: string().
namedStringARB(Type,Name,String) ->
cast(5701, <<Type:?GLenum,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8),(list_to_binary([String|[0]]))/binary,0:((8-((length(String)+ 1) rem 8)) rem 8)>>).
%% @doc glDeleteNamedStringARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteNamedStringARB.xml">external</a> documentation.
--spec deleteNamedStringARB(Name) -> ok when Name :: string().
+-spec deleteNamedStringARB(Name) -> 'ok' when Name :: string().
deleteNamedStringARB(Name) ->
cast(5702, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>).
%% @doc glCompileShaderIncludeARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glCompileShaderIncludeARB.xml">external</a> documentation.
--spec compileShaderIncludeARB(Shader, Path) -> ok when Shader :: integer(),Path :: iolist().
+-spec compileShaderIncludeARB(Shader, Path) -> 'ok' when Shader :: integer(),Path :: iolist().
compileShaderIncludeARB(Shader,Path) ->
PathTemp = list_to_binary([[Str|[0]] || Str <- Path ]),
cast(5703, <<Shader:?GLuint,(length(Path)):?GLuint,(size(PathTemp)):?GLuint,(PathTemp)/binary,0:((8-((size(PathTemp)+0) rem 8)) rem 8)>>).
@@ -14491,7 +14491,7 @@ getNamedStringivARB(Name,Pname) ->
%% @doc glBindFragDataLocationIndexe
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindFragDataLocationIndexe.xml">external</a> documentation.
--spec bindFragDataLocationIndexed(Program, ColorNumber, Index, Name) -> ok when Program :: integer(),ColorNumber :: integer(),Index :: integer(),Name :: string().
+-spec bindFragDataLocationIndexed(Program, ColorNumber, Index, Name) -> 'ok' when Program :: integer(),ColorNumber :: integer(),Index :: integer(),Name :: string().
bindFragDataLocationIndexed(Program,ColorNumber,Index,Name) ->
cast(5707, <<Program:?GLuint,ColorNumber:?GLuint,Index:?GLuint,(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 5) rem 8)) rem 8)>>).
@@ -14533,7 +14533,7 @@ genSamplers(Count) ->
%% names in samplers are silently ignored, as is the reserved name zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteSamplers.xml">external</a> documentation.
--spec deleteSamplers(Samplers) -> ok when Samplers :: [integer()].
+-spec deleteSamplers(Samplers) -> 'ok' when Samplers :: [integer()].
deleteSamplers(Samplers) ->
cast(5710, <<(length(Samplers)):?GLuint,
(<< <<C:?GLuint>> || C <- Samplers>>)/binary,0:(((1+length(Samplers)) rem 2)*32)>>).
@@ -14564,7 +14564,7 @@ isSampler(Sampler) ->
%% be bound to multiple texture units simultaneously.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindSampler.xml">external</a> documentation.
--spec bindSampler(Unit, Sampler) -> ok when Unit :: integer(),Sampler :: integer().
+-spec bindSampler(Unit, Sampler) -> 'ok' when Unit :: integer(),Sampler :: integer().
bindSampler(Unit,Sampler) ->
cast(5712, <<Unit:?GLuint,Sampler:?GLuint>>).
@@ -14710,33 +14710,33 @@ bindSampler(Unit,Sampler) ->
%% bound texture. result is assigned to R t.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameter.xml">external</a> documentation.
--spec samplerParameteri(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: integer().
+-spec samplerParameteri(Sampler, Pname, Param) -> 'ok' when Sampler :: integer(),Pname :: enum(),Param :: integer().
samplerParameteri(Sampler,Pname,Param) ->
cast(5713, <<Sampler:?GLuint,Pname:?GLenum,Param:?GLint>>).
%% @doc
%% See {@link samplerParameteri/3}
--spec samplerParameteriv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
+-spec samplerParameteriv(Sampler, Pname, Param) -> 'ok' when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
samplerParameteriv(Sampler,Pname,Param) ->
cast(5714, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLint>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
%% @doc
%% See {@link samplerParameteri/3}
--spec samplerParameterf(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: float().
+-spec samplerParameterf(Sampler, Pname, Param) -> 'ok' when Sampler :: integer(),Pname :: enum(),Param :: float().
samplerParameterf(Sampler,Pname,Param) ->
cast(5715, <<Sampler:?GLuint,Pname:?GLenum,Param:?GLfloat>>).
%% @doc
%% See {@link samplerParameteri/3}
--spec samplerParameterfv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [float()].
+-spec samplerParameterfv(Sampler, Pname, Param) -> 'ok' when Sampler :: integer(),Pname :: enum(),Param :: [float()].
samplerParameterfv(Sampler,Pname,Param) ->
cast(5716, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLfloat>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
%% @doc
%% See {@link samplerParameteri/3}
--spec samplerParameterIiv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
+-spec samplerParameterIiv(Sampler, Pname, Param) -> 'ok' when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
samplerParameterIiv(Sampler,Pname,Param) ->
cast(5717, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLint>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
@@ -14744,7 +14744,7 @@ samplerParameterIiv(Sampler,Pname,Param) ->
%% @doc glSamplerParameterI
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glSamplerParameterI.xml">external</a> documentation.
--spec samplerParameterIuiv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
+-spec samplerParameterIuiv(Sampler, Pname, Param) -> 'ok' when Sampler :: integer(),Pname :: enum(),Param :: [integer()].
samplerParameterIuiv(Sampler,Pname,Param) ->
cast(5718, <<Sampler:?GLuint,Pname:?GLenum,(length(Param)):?GLuint,
(<< <<C:?GLuint>> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>).
@@ -14826,7 +14826,7 @@ getSamplerParameterIuiv(Sampler,Pname) ->
%% that query object.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glQueryCounter.xml">external</a> documentation.
--spec queryCounter(Id, Target) -> ok when Id :: integer(),Target :: enum().
+-spec queryCounter(Id, Target) -> 'ok' when Id :: integer(),Target :: enum().
queryCounter(Id,Target) ->
cast(5723, <<Id:?GLuint,Target:?GLenum>>).
@@ -14870,7 +14870,7 @@ getQueryObjectui64v(Id,Pname) ->
%% well defined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysIndirect.xml">external</a> documentation.
--spec drawArraysIndirect(Mode, Indirect) -> ok when Mode :: enum(),Indirect :: offset()|mem().
+-spec drawArraysIndirect(Mode, Indirect) -> 'ok' when Mode :: enum(),Indirect :: offset()|mem().
drawArraysIndirect(Mode,Indirect) when is_integer(Indirect) ->
cast(5726, <<Mode:?GLenum,Indirect:?GLuint>>);
drawArraysIndirect(Mode,Indirect) ->
@@ -14910,7 +14910,7 @@ drawArraysIndirect(Mode,Indirect) ->
%% well defined.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsIndirect.xml">external</a> documentation.
--spec drawElementsIndirect(Mode, Type, Indirect) -> ok when Mode :: enum(),Type :: enum(),Indirect :: offset()|mem().
+-spec drawElementsIndirect(Mode, Type, Indirect) -> 'ok' when Mode :: enum(),Type :: enum(),Indirect :: offset()|mem().
drawElementsIndirect(Mode,Type,Indirect) when is_integer(Indirect) ->
cast(5728, <<Mode:?GLenum,Type:?GLenum,Indirect:?GLuint>>);
drawElementsIndirect(Mode,Type,Indirect) ->
@@ -14919,115 +14919,115 @@ drawElementsIndirect(Mode,Type,Indirect) ->
%% @doc
%% See {@link uniform1f/2}
--spec uniform1d(Location, X) -> ok when Location :: integer(),X :: float().
+-spec uniform1d(Location, X) -> 'ok' when Location :: integer(),X :: float().
uniform1d(Location,X) ->
cast(5730, <<Location:?GLint,0:32,X:?GLdouble>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2d(Location, X, Y) -> ok when Location :: integer(),X :: float(),Y :: float().
+-spec uniform2d(Location, X, Y) -> 'ok' when Location :: integer(),X :: float(),Y :: float().
uniform2d(Location,X,Y) ->
cast(5731, <<Location:?GLint,0:32,X:?GLdouble,Y:?GLdouble>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3d(Location, X, Y, Z) -> ok when Location :: integer(),X :: float(),Y :: float(),Z :: float().
+-spec uniform3d(Location, X, Y, Z) -> 'ok' when Location :: integer(),X :: float(),Y :: float(),Z :: float().
uniform3d(Location,X,Y,Z) ->
cast(5732, <<Location:?GLint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4d(Location, X, Y, Z, W) -> ok when Location :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec uniform4d(Location, X, Y, Z, W) -> 'ok' when Location :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
uniform4d(Location,X,Y,Z,W) ->
cast(5733, <<Location:?GLint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform1dv(Location, Value) -> ok when Location :: integer(),Value :: [float()].
+-spec uniform1dv(Location, Value) -> 'ok' when Location :: integer(),Value :: [float()].
uniform1dv(Location,Value) ->
cast(5734, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<C:?GLdouble>> || C <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform2dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float()}].
+-spec uniform2dv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{float(),float()}].
uniform2dv(Location,Value) ->
cast(5735, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform3dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float()}].
+-spec uniform3dv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{float(),float(),float()}].
uniform3dv(Location,Value) ->
cast(5736, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniform4dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float(),float()}].
+-spec uniform4dv(Location, Value) -> 'ok' when Location :: integer(),Value :: [{float(),float(),float(),float()}].
uniform4dv(Location,Value) ->
cast(5737, <<Location:?GLint,0:32,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
+-spec uniformMatrix2dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
uniformMatrix2dv(Location,Transpose,Value) ->
cast(5738, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix3dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3dv(Location,Transpose,Value) ->
cast(5739, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix4dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4dv(Location,Transpose,Value) ->
cast(5740, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble,V13:?GLdouble,V14:?GLdouble,V15:?GLdouble,V16:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix2x3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix2x3dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix2x3dv(Location,Transpose,Value) ->
cast(5741, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix2x4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix2x4dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix2x4dv(Location,Transpose,Value) ->
cast(5742, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix3x2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix3x2dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
uniformMatrix3x2dv(Location,Transpose,Value) ->
cast(5743, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix3x4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix3x4dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix3x4dv(Location,Transpose,Value) ->
cast(5744, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix4x2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix4x2dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x2dv(Location,Transpose,Value) ->
cast(5745, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link uniform1f/2}
--spec uniformMatrix4x3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec uniformMatrix4x3dv(Location, Transpose, Value) -> 'ok' when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
uniformMatrix4x3dv(Location,Transpose,Value) ->
cast(5746, <<Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
@@ -15126,7 +15126,7 @@ getActiveSubroutineName(Program,Shadertype,Index,Bufsize) ->
%% for the shader stage.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUniformSubroutines.xml">external</a> documentation.
--spec uniformSubroutinesuiv(Shadertype, Indices) -> ok when Shadertype :: enum(),Indices :: [integer()].
+-spec uniformSubroutinesuiv(Shadertype, Indices) -> 'ok' when Shadertype :: enum(),Indices :: [integer()].
uniformSubroutinesuiv(Shadertype,Indices) ->
cast(5752, <<Shadertype:?GLenum,(length(Indices)):?GLuint,
(<< <<C:?GLuint>> || C <- Indices>>)/binary,0:(((length(Indices)) rem 2)*32)>>).
@@ -15199,13 +15199,13 @@ getProgramStageiv(Program,Shadertype,Pname) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPatchParameter.xml">external</a> documentation.
--spec patchParameteri(Pname, Value) -> ok when Pname :: enum(),Value :: integer().
+-spec patchParameteri(Pname, Value) -> 'ok' when Pname :: enum(),Value :: integer().
patchParameteri(Pname,Value) ->
cast(5755, <<Pname:?GLenum,Value:?GLint>>).
%% @doc
%% See {@link patchParameteri/2}
--spec patchParameterfv(Pname, Values) -> ok when Pname :: enum(),Values :: [float()].
+-spec patchParameterfv(Pname, Values) -> 'ok' when Pname :: enum(),Values :: [float()].
patchParameterfv(Pname,Values) ->
cast(5756, <<Pname:?GLenum,(length(Values)):?GLuint,
(<< <<C:?GLfloat>> || C <- Values>>)/binary,0:(((length(Values)) rem 2)*32)>>).
@@ -15229,7 +15229,7 @@ patchParameterfv(Pname,Values) ->
%% the currently bound transform feedback object.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindTransformFeedback.xml">external</a> documentation.
--spec bindTransformFeedback(Target, Id) -> ok when Target :: enum(),Id :: integer().
+-spec bindTransformFeedback(Target, Id) -> 'ok' when Target :: enum(),Id :: integer().
bindTransformFeedback(Target,Id) ->
cast(5757, <<Target:?GLenum,Id:?GLuint>>).
@@ -15242,7 +15242,7 @@ bindTransformFeedback(Target,Id) ->
%% becomes unused, but the underlying object is not deleted until it is no longer active.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTransformFeedbacks.xml">external</a> documentation.
--spec deleteTransformFeedbacks(Ids) -> ok when Ids :: [integer()].
+-spec deleteTransformFeedbacks(Ids) -> 'ok' when Ids :: [integer()].
deleteTransformFeedbacks(Ids) ->
cast(5758, <<(length(Ids)):?GLuint,
(<< <<C:?GLuint>> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>).
@@ -15282,7 +15282,7 @@ isTransformFeedback(Id) ->
%% while transform feedback is paused.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glPauseTransformFeedback.xml">external</a> documentation.
--spec pauseTransformFeedback() -> ok.
+-spec pauseTransformFeedback() -> 'ok'.
pauseTransformFeedback() ->
cast(5761, <<>>).
@@ -15295,7 +15295,7 @@ pauseTransformFeedback() ->
%% while transform feedback is paused.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glResumeTransformFeedback.xml">external</a> documentation.
--spec resumeTransformFeedback() -> ok.
+-spec resumeTransformFeedback() -> 'ok'.
resumeTransformFeedback() ->
cast(5762, <<>>).
@@ -15309,7 +15309,7 @@ resumeTransformFeedback() ->
%% by `Id' .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedback.xml">external</a> documentation.
--spec drawTransformFeedback(Mode, Id) -> ok when Mode :: enum(),Id :: integer().
+-spec drawTransformFeedback(Mode, Id) -> 'ok' when Mode :: enum(),Id :: integer().
drawTransformFeedback(Mode,Id) ->
cast(5763, <<Mode:?GLenum,Id:?GLuint>>).
@@ -15327,14 +15327,14 @@ drawTransformFeedback(Mode,Id) ->
%% with `Stream' set to zero.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackStream.xml">external</a> documentation.
--spec drawTransformFeedbackStream(Mode, Id, Stream) -> ok when Mode :: enum(),Id :: integer(),Stream :: integer().
+-spec drawTransformFeedbackStream(Mode, Id, Stream) -> 'ok' when Mode :: enum(),Id :: integer(),Stream :: integer().
drawTransformFeedbackStream(Mode,Id,Stream) ->
cast(5764, <<Mode:?GLenum,Id:?GLuint,Stream:?GLuint>>).
%% @doc glBeginQueryIndexe
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQueryIndexe.xml">external</a> documentation.
--spec beginQueryIndexed(Target, Index, Id) -> ok when Target :: enum(),Index :: integer(),Id :: integer().
+-spec beginQueryIndexed(Target, Index, Id) -> 'ok' when Target :: enum(),Index :: integer(),Id :: integer().
beginQueryIndexed(Target,Index,Id) ->
cast(5765, <<Target:?GLenum,Index:?GLuint,Id:?GLuint>>).
@@ -15411,7 +15411,7 @@ beginQueryIndexed(Target,Index,Id) ->
%% is not yet complete.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBeginQueryIndexed.xml">external</a> documentation.
--spec endQueryIndexed(Target, Index) -> ok when Target :: enum(),Index :: integer().
+-spec endQueryIndexed(Target, Index) -> 'ok' when Target :: enum(),Index :: integer().
endQueryIndexed(Target,Index) ->
cast(5766, <<Target:?GLenum,Index:?GLuint>>).
@@ -15441,7 +15441,7 @@ getQueryIndexediv(Target,Index,Pname) ->
%% freed by the call to ``gl:releaseShaderCompiler''.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glReleaseShaderCompiler.xml">external</a> documentation.
--spec releaseShaderCompiler() -> ok.
+-spec releaseShaderCompiler() -> 'ok'.
releaseShaderCompiler() ->
cast(5768, <<>>).
@@ -15463,7 +15463,7 @@ releaseShaderCompiler() ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glShaderBinary.xml">external</a> documentation.
--spec shaderBinary(Shaders, Binaryformat, Binary) -> ok when Shaders :: [integer()],Binaryformat :: enum(),Binary :: binary().
+-spec shaderBinary(Shaders, Binaryformat, Binary) -> 'ok' when Shaders :: [integer()],Binaryformat :: enum(),Binary :: binary().
shaderBinary(Shaders,Binaryformat,Binary) ->
send_bin(Binary),
cast(5769, <<(length(Shaders)):?GLuint,
@@ -15496,14 +15496,14 @@ getShaderPrecisionFormat(Shadertype,Precisiontype) ->
%% @doc
%% See {@link depthRange/2}
--spec depthRangef(N, F) -> ok when N :: clamp(),F :: clamp().
+-spec depthRangef(N, F) -> 'ok' when N :: clamp(),F :: clamp().
depthRangef(N,F) ->
cast(5771, <<N:?GLclampf,F:?GLclampf>>).
%% @doc glClearDepthf
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glClearDepthf.xml">external</a> documentation.
--spec clearDepthf(D) -> ok when D :: clamp().
+-spec clearDepthf(D) -> 'ok' when D :: clamp().
clearDepthf(D) ->
cast(5772, <<D:?GLclampf>>).
@@ -15551,7 +15551,7 @@ getProgramBinary(Program,BufSize) ->
%% the program was linked before saving are restored with ``gl:programBinary'' is called.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramBinary.xml">external</a> documentation.
--spec programBinary(Program, BinaryFormat, Binary) -> ok when Program :: integer(),BinaryFormat :: enum(),Binary :: binary().
+-spec programBinary(Program, BinaryFormat, Binary) -> 'ok' when Program :: integer(),BinaryFormat :: enum(),Binary :: binary().
programBinary(Program,BinaryFormat,Binary) ->
send_bin(Binary),
cast(5774, <<Program:?GLuint,BinaryFormat:?GLenum>>).
@@ -15577,7 +15577,7 @@ programBinary(Program,BinaryFormat,Binary) ->
%% is `?GL_FALSE'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramParameter.xml">external</a> documentation.
--spec programParameteri(Program, Pname, Value) -> ok when Program :: integer(),Pname :: enum(),Value :: integer().
+-spec programParameteri(Program, Pname, Value) -> 'ok' when Program :: integer(),Pname :: enum(),Value :: integer().
programParameteri(Program,Pname,Value) ->
cast(5775, <<Program:?GLuint,Pname:?GLenum,Value:?GLint>>).
@@ -15602,7 +15602,7 @@ programParameteri(Program,Pname,Value) ->
%% , an error is generated.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glUseProgramStages.xml">external</a> documentation.
--spec useProgramStages(Pipeline, Stages, Program) -> ok when Pipeline :: integer(),Stages :: integer(),Program :: integer().
+-spec useProgramStages(Pipeline, Stages, Program) -> 'ok' when Pipeline :: integer(),Stages :: integer(),Program :: integer().
useProgramStages(Pipeline,Stages,Program) ->
cast(5776, <<Pipeline:?GLuint,Stages:?GLbitfield,Program:?GLuint>>).
@@ -15614,7 +15614,7 @@ useProgramStages(Pipeline,Stages,Program) ->
%% no program has been made current through a call to {@link gl:useProgram/1} .
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glActiveShaderProgram.xml">external</a> documentation.
--spec activeShaderProgram(Pipeline, Program) -> ok when Pipeline :: integer(),Program :: integer().
+-spec activeShaderProgram(Pipeline, Program) -> 'ok' when Pipeline :: integer(),Program :: integer().
activeShaderProgram(Pipeline,Program) ->
cast(5777, <<Pipeline:?GLuint,Program:?GLuint>>).
@@ -15644,7 +15644,7 @@ createShaderProgramv(Type,Strings) ->
%% taken from its program objects.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindProgramPipeline.xml">external</a> documentation.
--spec bindProgramPipeline(Pipeline) -> ok when Pipeline :: integer().
+-spec bindProgramPipeline(Pipeline) -> 'ok' when Pipeline :: integer().
bindProgramPipeline(Pipeline) ->
cast(5779, <<Pipeline:?GLuint>>).
@@ -15658,7 +15658,7 @@ bindProgramPipeline(Pipeline) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDeleteProgramPipelines.xml">external</a> documentation.
--spec deleteProgramPipelines(Pipelines) -> ok when Pipelines :: [integer()].
+-spec deleteProgramPipelines(Pipelines) -> 'ok' when Pipelines :: [integer()].
deleteProgramPipelines(Pipelines) ->
cast(5780, <<(length(Pipelines)):?GLuint,
(<< <<C:?GLuint>> || C <- Pipelines>>)/binary,0:(((1+length(Pipelines)) rem 2)*32)>>).
@@ -15790,334 +15790,334 @@ getProgramPipelineiv(Pipeline,Pname) ->
%% a single matrix, and a count greater than 1 can be used to modify an array of matrices.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glProgramUniform.xml">external</a> documentation.
--spec programUniform1i(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: integer().
+-spec programUniform1i(Program, Location, V0) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer().
programUniform1i(Program,Location,V0) ->
cast(5784, <<Program:?GLuint,Location:?GLint,V0:?GLint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [integer()].
+-spec programUniform1iv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [integer()].
programUniform1iv(Program,Location,Value) ->
cast(5785, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLint>> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1f(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: float().
+-spec programUniform1f(Program, Location, V0) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float().
programUniform1f(Program,Location,V0) ->
cast(5786, <<Program:?GLuint,Location:?GLint,V0:?GLfloat>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [float()].
+-spec programUniform1fv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [float()].
programUniform1fv(Program,Location,Value) ->
cast(5787, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLfloat>> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1d(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: float().
+-spec programUniform1d(Program, Location, V0) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float().
programUniform1d(Program,Location,V0) ->
cast(5788, <<Program:?GLuint,Location:?GLint,V0:?GLdouble>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [float()].
+-spec programUniform1dv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [float()].
programUniform1dv(Program,Location,Value) ->
cast(5789, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<C:?GLdouble>> || C <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1ui(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: integer().
+-spec programUniform1ui(Program, Location, V0) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer().
programUniform1ui(Program,Location,V0) ->
cast(5790, <<Program:?GLuint,Location:?GLint,V0:?GLuint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform1uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [integer()].
+-spec programUniform1uiv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [integer()].
programUniform1uiv(Program,Location,Value) ->
cast(5791, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<C:?GLuint>> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2i(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer().
+-spec programUniform2i(Program, Location, V0, V1) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer().
programUniform2i(Program,Location,V0,V1) ->
cast(5792, <<Program:?GLuint,Location:?GLint,V0:?GLint,V1:?GLint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}].
+-spec programUniform2iv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}].
programUniform2iv(Program,Location,Value) ->
cast(5793, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2f(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float().
+-spec programUniform2f(Program, Location, V0, V1) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float().
programUniform2f(Program,Location,V0,V1) ->
cast(5794, <<Program:?GLuint,Location:?GLint,V0:?GLfloat,V1:?GLfloat>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float()}].
+-spec programUniform2fv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{float(),float()}].
programUniform2fv(Program,Location,Value) ->
cast(5795, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2d(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float().
+-spec programUniform2d(Program, Location, V0, V1) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float().
programUniform2d(Program,Location,V0,V1) ->
cast(5796, <<Program:?GLuint,Location:?GLint,V0:?GLdouble,V1:?GLdouble>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float()}].
+-spec programUniform2dv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{float(),float()}].
programUniform2dv(Program,Location,Value) ->
cast(5797, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2ui(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer().
+-spec programUniform2ui(Program, Location, V0, V1) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer().
programUniform2ui(Program,Location,V0,V1) ->
cast(5798, <<Program:?GLuint,Location:?GLint,V0:?GLuint,V1:?GLuint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform2uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}].
+-spec programUniform2uiv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}].
programUniform2uiv(Program,Location,Value) ->
cast(5799, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint>> || {V1,V2} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3i(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
+-spec programUniform3i(Program, Location, V0, V1, V2) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
programUniform3i(Program,Location,V0,V1,V2) ->
cast(5800, <<Program:?GLuint,Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}].
+-spec programUniform3iv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}].
programUniform3iv(Program,Location,Value) ->
cast(5801, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3f(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
+-spec programUniform3f(Program, Location, V0, V1, V2) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
programUniform3f(Program,Location,V0,V1,V2) ->
cast(5802, <<Program:?GLuint,Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}].
+-spec programUniform3fv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}].
programUniform3fv(Program,Location,Value) ->
cast(5803, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3d(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
+-spec programUniform3d(Program, Location, V0, V1, V2) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float().
programUniform3d(Program,Location,V0,V1,V2) ->
cast(5804, <<Program:?GLuint,Location:?GLint,V0:?GLdouble,V1:?GLdouble,V2:?GLdouble>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}].
+-spec programUniform3dv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}].
programUniform3dv(Program,Location,Value) ->
cast(5805, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3ui(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
+-spec programUniform3ui(Program, Location, V0, V1, V2) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer().
programUniform3ui(Program,Location,V0,V1,V2) ->
cast(5806, <<Program:?GLuint,Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform3uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}].
+-spec programUniform3uiv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}].
programUniform3uiv(Program,Location,Value) ->
cast(5807, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint>> || {V1,V2,V3} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4i(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
+-spec programUniform4i(Program, Location, V0, V1, V2, V3) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
programUniform4i(Program,Location,V0,V1,V2,V3) ->
cast(5808, <<Program:?GLuint,Location:?GLint,V0:?GLint,V1:?GLint,V2:?GLint,V3:?GLint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
+-spec programUniform4iv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
programUniform4iv(Program,Location,Value) ->
cast(5809, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4f(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
+-spec programUniform4f(Program, Location, V0, V1, V2, V3) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
programUniform4f(Program,Location,V0,V1,V2,V3) ->
cast(5810, <<Program:?GLuint,Location:?GLint,V0:?GLfloat,V1:?GLfloat,V2:?GLfloat,V3:?GLfloat>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}].
+-spec programUniform4fv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}].
programUniform4fv(Program,Location,Value) ->
cast(5811, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4d(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
+-spec programUniform4d(Program, Location, V0, V1, V2, V3) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float().
programUniform4d(Program,Location,V0,V1,V2,V3) ->
cast(5812, <<Program:?GLuint,Location:?GLint,V0:?GLdouble,V1:?GLdouble,V2:?GLdouble,V3:?GLdouble>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}].
+-spec programUniform4dv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}].
programUniform4dv(Program,Location,Value) ->
cast(5813, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4ui(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
+-spec programUniform4ui(Program, Location, V0, V1, V2, V3) -> 'ok' when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer().
programUniform4ui(Program,Location,V0,V1,V2,V3) ->
cast(5814, <<Program:?GLuint,Location:?GLint,V0:?GLuint,V1:?GLuint,V2:?GLuint,V3:?GLuint>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniform4uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
+-spec programUniform4uiv(Program, Location, Value) -> 'ok' when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}].
programUniform4uiv(Program,Location,Value) ->
cast(5815, <<Program:?GLuint,Location:?GLint,(length(Value)):?GLuint,
(<< <<V1:?GLuint,V2:?GLuint,V3:?GLuint,V4:?GLuint>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
+-spec programUniformMatrix2fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
programUniformMatrix2fv(Program,Location,Transpose,Value) ->
cast(5816, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix3fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3fv(Program,Location,Transpose,Value) ->
cast(5817, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix4fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4fv(Program,Location,Transpose,Value) ->
cast(5818, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat,V13:?GLfloat,V14:?GLfloat,V15:?GLfloat,V16:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
+-spec programUniformMatrix2dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}].
programUniformMatrix2dv(Program,Location,Transpose,Value) ->
cast(5819, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble>> || {V1,V2,V3,V4} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix3dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3dv(Program,Location,Transpose,Value) ->
cast(5820, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix4dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4dv(Program,Location,Transpose,Value) ->
cast(5821, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble,V13:?GLdouble,V14:?GLdouble,V15:?GLdouble,V16:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix2x3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix2x3fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x3fv(Program,Location,Transpose,Value) ->
cast(5822, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix3x2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix3x2fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x2fv(Program,Location,Transpose,Value) ->
cast(5823, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix2x4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix2x4fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x4fv(Program,Location,Transpose,Value) ->
cast(5824, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix4x2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix4x2fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x2fv(Program,Location,Transpose,Value) ->
cast(5825, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix3x4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix3x4fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x4fv(Program,Location,Transpose,Value) ->
cast(5826, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix4x3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix4x3fv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x3fv(Program,Location,Transpose,Value) ->
cast(5827, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:24,(length(Value)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat,V5:?GLfloat,V6:?GLfloat,V7:?GLfloat,V8:?GLfloat,V9:?GLfloat,V10:?GLfloat,V11:?GLfloat,V12:?GLfloat>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix2x3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix2x3dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x3dv(Program,Location,Transpose,Value) ->
cast(5828, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix3x2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix3x2dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x2dv(Program,Location,Transpose,Value) ->
cast(5829, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble>> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix2x4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix2x4dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix2x4dv(Program,Location,Transpose,Value) ->
cast(5830, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix4x2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix4x2dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x2dv(Program,Location,Transpose,Value) ->
cast(5831, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix3x4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix3x4dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix3x4dv(Program,Location,Transpose,Value) ->
cast(5832, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
%% @doc
%% See {@link programUniform1i/3}
--spec programUniformMatrix4x3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
+-spec programUniformMatrix4x3dv(Program, Location, Transpose, Value) -> 'ok' when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}].
programUniformMatrix4x3dv(Program,Location,Transpose,Value) ->
cast(5833, <<Program:?GLuint,Location:?GLint,Transpose:?GLboolean,0:56,(length(Value)):?GLuint,0:32,
(<< <<V1:?GLdouble,V2:?GLdouble,V3:?GLdouble,V4:?GLdouble,V5:?GLdouble,V6:?GLdouble,V7:?GLdouble,V8:?GLdouble,V9:?GLdouble,V10:?GLdouble,V11:?GLdouble,V12:?GLdouble>> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>).
@@ -16138,7 +16138,7 @@ programUniformMatrix4x3dv(Program,Location,Transpose,Value) ->
%% pipeline object is created with name `Pipeline' and the default state vector.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glValidateProgramPipeline.xml">external</a> documentation.
--spec validateProgramPipeline(Pipeline) -> ok when Pipeline :: integer().
+-spec validateProgramPipeline(Pipeline) -> 'ok' when Pipeline :: integer().
validateProgramPipeline(Pipeline) ->
cast(5834, <<Pipeline:?GLuint>>).
@@ -16162,51 +16162,51 @@ getProgramPipelineInfoLog(Pipeline,BufSize) ->
%% @doc glVertexAttribL
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL1d(Index, X) -> ok when Index :: integer(),X :: float().
+-spec vertexAttribL1d(Index, X) -> 'ok' when Index :: integer(),X :: float().
vertexAttribL1d(Index,X) ->
cast(5836, <<Index:?GLuint,0:32,X:?GLdouble>>).
%% @doc glVertexAttribL
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL2d(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float().
+-spec vertexAttribL2d(Index, X, Y) -> 'ok' when Index :: integer(),X :: float(),Y :: float().
vertexAttribL2d(Index,X,Y) ->
cast(5837, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble>>).
%% @doc glVertexAttribL
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL3d(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float().
+-spec vertexAttribL3d(Index, X, Y, Z) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),Z :: float().
vertexAttribL3d(Index,X,Y,Z) ->
cast(5838, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble>>).
%% @doc glVertexAttribL
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribL.xml">external</a> documentation.
--spec vertexAttribL4d(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
+-spec vertexAttribL4d(Index, X, Y, Z, W) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float().
vertexAttribL4d(Index,X,Y,Z,W) ->
cast(5839, <<Index:?GLuint,0:32,X:?GLdouble,Y:?GLdouble,Z:?GLdouble,W:?GLdouble>>).
%% @equiv vertexAttribL1d(Index,X)
--spec vertexAttribL1dv(Index :: integer(),V) -> ok when V :: {X :: float()}.
+-spec vertexAttribL1dv(Index :: integer(),V) -> 'ok' when V :: {X :: float()}.
vertexAttribL1dv(Index,{X}) -> vertexAttribL1d(Index,X).
%% @equiv vertexAttribL2d(Index,X,Y)
--spec vertexAttribL2dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}.
+-spec vertexAttribL2dv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertexAttribL2dv(Index,{X,Y}) -> vertexAttribL2d(Index,X,Y).
%% @equiv vertexAttribL3d(Index,X,Y,Z)
--spec vertexAttribL3dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}.
+-spec vertexAttribL3dv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertexAttribL3dv(Index,{X,Y,Z}) -> vertexAttribL3d(Index,X,Y,Z).
%% @equiv vertexAttribL4d(Index,X,Y,Z,W)
--spec vertexAttribL4dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
+-spec vertexAttribL4dv(Index :: integer(),V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertexAttribL4dv(Index,{X,Y,Z,W}) -> vertexAttribL4d(Index,X,Y,Z,W).
%% @doc glVertexAttribLPointer
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribLPointer.xml">external</a> documentation.
--spec vertexAttribLPointer(Index, Size, Type, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
+-spec vertexAttribLPointer(Index, Size, Type, Stride, Pointer) -> 'ok' when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem().
vertexAttribLPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) ->
cast(5840, <<Index:?GLuint,Size:?GLint,Type:?GLenum,Stride:?GLsizei,Pointer:?GLuint>>);
vertexAttribLPointer(Index,Size,Type,Stride,Pointer) ->
@@ -16223,7 +16223,7 @@ getVertexAttribLdv(Index,Pname) ->
%% @doc glViewportArrayv
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportArrayv.xml">external</a> documentation.
--spec viewportArrayv(First, V) -> ok when First :: integer(),V :: [{float(),float(),float(),float()}].
+-spec viewportArrayv(First, V) -> 'ok' when First :: integer(),V :: [{float(),float(),float(),float()}].
viewportArrayv(First,V) ->
cast(5843, <<First:?GLuint,(length(V)):?GLuint,
(<< <<V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>> || {V1,V2,V3,V4} <- V>>)/binary>>).
@@ -16263,20 +16263,20 @@ viewportArrayv(First,V) ->
%% 1, v); }
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glViewportIndexed.xml">external</a> documentation.
--spec viewportIndexedf(Index, X, Y, W, H) -> ok when Index :: integer(),X :: float(),Y :: float(),W :: float(),H :: float().
+-spec viewportIndexedf(Index, X, Y, W, H) -> 'ok' when Index :: integer(),X :: float(),Y :: float(),W :: float(),H :: float().
viewportIndexedf(Index,X,Y,W,H) ->
cast(5844, <<Index:?GLuint,X:?GLfloat,Y:?GLfloat,W:?GLfloat,H:?GLfloat>>).
%% @doc
%% See {@link viewportIndexedf/5}
--spec viewportIndexedfv(Index, V) -> ok when Index :: integer(),V :: {float(),float(),float(),float()}.
+-spec viewportIndexedfv(Index, V) -> 'ok' when Index :: integer(),V :: {float(),float(),float(),float()}.
viewportIndexedfv(Index,{V1,V2,V3,V4}) ->
cast(5845, <<Index:?GLuint,V1:?GLfloat,V2:?GLfloat,V3:?GLfloat,V4:?GLfloat>>).
%% @doc glScissorArrayv
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorArrayv.xml">external</a> documentation.
--spec scissorArrayv(First, V) -> ok when First :: integer(),V :: [{integer(),integer(),integer(),integer()}].
+-spec scissorArrayv(First, V) -> 'ok' when First :: integer(),V :: [{integer(),integer(),integer(),integer()}].
scissorArrayv(First,V) ->
cast(5846, <<First:?GLuint,(length(V)):?GLuint,
(<< <<V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>> || {V1,V2,V3,V4} <- V>>)/binary>>).
@@ -16284,21 +16284,21 @@ scissorArrayv(First,V) ->
%% @doc glScissorIndexe
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorIndexe.xml">external</a> documentation.
--spec scissorIndexed(Index, Left, Bottom, Width, Height) -> ok when Index :: integer(),Left :: integer(),Bottom :: integer(),Width :: integer(),Height :: integer().
+-spec scissorIndexed(Index, Left, Bottom, Width, Height) -> 'ok' when Index :: integer(),Left :: integer(),Bottom :: integer(),Width :: integer(),Height :: integer().
scissorIndexed(Index,Left,Bottom,Width,Height) ->
cast(5847, <<Index:?GLuint,Left:?GLint,Bottom:?GLint,Width:?GLsizei,Height:?GLsizei>>).
%% @doc glScissorIndexe
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glScissorIndexe.xml">external</a> documentation.
--spec scissorIndexedv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
+-spec scissorIndexedv(Index, V) -> 'ok' when Index :: integer(),V :: {integer(),integer(),integer(),integer()}.
scissorIndexedv(Index,{V1,V2,V3,V4}) ->
cast(5848, <<Index:?GLuint,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
%% @doc glDepthRangeArrayv
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRangeArrayv.xml">external</a> documentation.
--spec depthRangeArrayv(First, V) -> ok when First :: integer(),V :: [{clamp(),clamp()}].
+-spec depthRangeArrayv(First, V) -> 'ok' when First :: integer(),V :: [{clamp(),clamp()}].
depthRangeArrayv(First,V) ->
cast(5849, <<First:?GLuint,0:32,(length(V)):?GLuint,0:32,
(<< <<V1:?GLclampd,V2:?GLclampd>> || {V1,V2} <- V>>)/binary>>).
@@ -16306,7 +16306,7 @@ depthRangeArrayv(First,V) ->
%% @doc glDepthRangeIndexe
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRangeIndexe.xml">external</a> documentation.
--spec depthRangeIndexed(Index, N, F) -> ok when Index :: integer(),N :: clamp(),F :: clamp().
+-spec depthRangeIndexed(Index, N, F) -> 'ok' when Index :: integer(),N :: clamp(),F :: clamp().
depthRangeIndexed(Index,N,F) ->
cast(5850, <<Index:?GLuint,0:32,N:?GLclampd,F:?GLclampd>>).
@@ -16325,7 +16325,7 @@ getDoublei_v(Target,Index) ->
%% @doc glDebugMessageControlARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDebugMessageControlARB.xml">external</a> documentation.
--spec debugMessageControlARB(Source, Type, Severity, Ids, Enabled) -> ok when Source :: enum(),Type :: enum(),Severity :: enum(),Ids :: [integer()],Enabled :: 0|1.
+-spec debugMessageControlARB(Source, Type, Severity, Ids, Enabled) -> 'ok' when Source :: enum(),Type :: enum(),Severity :: enum(),Ids :: [integer()],Enabled :: 0|1.
debugMessageControlARB(Source,Type,Severity,Ids,Enabled) ->
cast(5853, <<Source:?GLenum,Type:?GLenum,Severity:?GLenum,(length(Ids)):?GLuint,
(<< <<C:?GLuint>> || C <- Ids>>)/binary,0:(((length(Ids)) rem 2)*32),Enabled:?GLboolean>>).
@@ -16333,7 +16333,7 @@ debugMessageControlARB(Source,Type,Severity,Ids,Enabled) ->
%% @doc glDebugMessageInsertARB
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDebugMessageInsertARB.xml">external</a> documentation.
--spec debugMessageInsertARB(Source, Type, Id, Severity, Buf) -> ok when Source :: enum(),Type :: enum(),Id :: integer(),Severity :: enum(),Buf :: string().
+-spec debugMessageInsertARB(Source, Type, Id, Severity, Buf) -> 'ok' when Source :: enum(),Type :: enum(),Id :: integer(),Severity :: enum(),Buf :: string().
debugMessageInsertARB(Source,Type,Id,Severity,Buf) ->
cast(5854, <<Source:?GLenum,Type:?GLenum,Id:?GLuint,Severity:?GLenum,(list_to_binary([Buf|[0]]))/binary,0:((8-((length(Buf)+ 1) rem 8)) rem 8)>>).
@@ -16370,7 +16370,7 @@ getGraphicsResetStatusARB() ->
%% value of `?gl_InstanceID'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawArraysInstancedBaseInstance.xml">external</a> documentation.
--spec drawArraysInstancedBaseInstance(Mode, First, Count, Primcount, Baseinstance) -> ok when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer(),Baseinstance :: integer().
+-spec drawArraysInstancedBaseInstance(Mode, First, Count, Primcount, Baseinstance) -> 'ok' when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer(),Baseinstance :: integer().
drawArraysInstancedBaseInstance(Mode,First,Count,Primcount,Baseinstance) ->
cast(5857, <<Mode:?GLenum,First:?GLint,Count:?GLsizei,Primcount:?GLsizei,Baseinstance:?GLuint>>).
@@ -16393,7 +16393,7 @@ drawArraysInstancedBaseInstance(Mode,First,Count,Primcount,Baseinstance) ->
%% value of `?gl_InstanceID'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseInstance.xml">external</a> documentation.
--spec drawElementsInstancedBaseInstance(Mode, Count, Type, Indices, Primcount, Baseinstance) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Baseinstance :: integer().
+-spec drawElementsInstancedBaseInstance(Mode, Count, Type, Indices, Primcount, Baseinstance) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Baseinstance :: integer().
drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance) when is_integer(Indices) ->
cast(5858, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei,Baseinstance:?GLuint>>);
drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance) ->
@@ -16417,7 +16417,7 @@ drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance
%% value of `?gl_InstanceID'.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawElementsInstancedBaseVertexBaseInstance.xml">external</a> documentation.
--spec drawElementsInstancedBaseVertexBaseInstance(Mode, Count, Type, Indices, Primcount, Basevertex, Baseinstance) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer(),Baseinstance :: integer().
+-spec drawElementsInstancedBaseVertexBaseInstance(Mode, Count, Type, Indices, Primcount, Basevertex, Baseinstance) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer(),Baseinstance :: integer().
drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Basevertex,Baseinstance) when is_integer(Indices) ->
cast(5860, <<Mode:?GLenum,Count:?GLsizei,Type:?GLenum,Indices:?GLuint,Primcount:?GLsizei,Basevertex:?GLint,Baseinstance:?GLuint>>);
drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Basevertex,Baseinstance) ->
@@ -16427,14 +16427,14 @@ drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Ba
%% @doc glDrawTransformFeedbackInstance
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackInstance.xml">external</a> documentation.
--spec drawTransformFeedbackInstanced(Mode, Id, Primcount) -> ok when Mode :: enum(),Id :: integer(),Primcount :: integer().
+-spec drawTransformFeedbackInstanced(Mode, Id, Primcount) -> 'ok' when Mode :: enum(),Id :: integer(),Primcount :: integer().
drawTransformFeedbackInstanced(Mode,Id,Primcount) ->
cast(5862, <<Mode:?GLenum,Id:?GLuint,Primcount:?GLsizei>>).
%% @doc glDrawTransformFeedbackStreamInstance
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackStreamInstance.xml">external</a> documentation.
--spec drawTransformFeedbackStreamInstanced(Mode, Id, Stream, Primcount) -> ok when Mode :: enum(),Id :: integer(),Stream :: integer(),Primcount :: integer().
+-spec drawTransformFeedbackStreamInstanced(Mode, Id, Stream, Primcount) -> 'ok' when Mode :: enum(),Id :: integer(),Stream :: integer(),Primcount :: integer().
drawTransformFeedbackStreamInstanced(Mode,Id,Stream,Primcount) ->
cast(5863, <<Mode:?GLenum,Id:?GLuint,Stream:?GLuint,Primcount:?GLsizei>>).
@@ -16503,7 +16503,7 @@ getInternalformativ(Target,Internalformat,Pname,BufSize) ->
%% respectively.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glBindImageTexture.xml">external</a> documentation.
--spec bindImageTexture(Unit, Texture, Level, Layered, Layer, Access, Format) -> ok when Unit :: integer(),Texture :: integer(),Level :: integer(),Layered :: 0|1,Layer :: integer(),Access :: enum(),Format :: enum().
+-spec bindImageTexture(Unit, Texture, Level, Layered, Layer, Access, Format) -> 'ok' when Unit :: integer(),Texture :: integer(),Level :: integer(),Layered :: 0|1,Layer :: integer(),Access :: enum(),Format :: enum().
bindImageTexture(Unit,Texture,Level,Layered,Layer,Access,Format) ->
cast(5865, <<Unit:?GLuint,Texture:?GLuint,Level:?GLint,Layered:?GLboolean,0:24,Layer:?GLint,Access:?GLenum,Format:?GLenum>>).
@@ -16630,7 +16630,7 @@ bindImageTexture(Unit,Texture,Level,Layered,Layer,Access,Format) ->
%% passes is necessary.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glMemoryBarrier.xml">external</a> documentation.
--spec memoryBarrier(Barriers) -> ok when Barriers :: integer().
+-spec memoryBarrier(Barriers) -> 'ok' when Barriers :: integer().
memoryBarrier(Barriers) ->
cast(5866, <<Barriers:?GLbitfield>>).
@@ -16663,7 +16663,7 @@ memoryBarrier(Barriers) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexStorage1D.xml">external</a> documentation.
--spec texStorage1D(Target, Levels, Internalformat, Width) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer().
+-spec texStorage1D(Target, Levels, Internalformat, Width) -> 'ok' when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer().
texStorage1D(Target,Levels,Internalformat,Width) ->
cast(5867, <<Target:?GLenum,Levels:?GLsizei,Internalformat:?GLenum,Width:?GLsizei>>).
@@ -16708,7 +16708,7 @@ texStorage1D(Target,Levels,Internalformat,Width) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexStorage2D.xml">external</a> documentation.
--spec texStorage2D(Target, Levels, Internalformat, Width, Height) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer().
+-spec texStorage2D(Target, Levels, Internalformat, Width, Height) -> 'ok' when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer().
texStorage2D(Target,Levels,Internalformat,Width,Height) ->
cast(5868, <<Target:?GLenum,Levels:?GLsizei,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei>>).
@@ -16751,21 +16751,21 @@ texStorage2D(Target,Levels,Internalformat,Width,Height) ->
%%
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glTexStorage3D.xml">external</a> documentation.
--spec texStorage3D(Target, Levels, Internalformat, Width, Height, Depth) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer().
+-spec texStorage3D(Target, Levels, Internalformat, Width, Height, Depth) -> 'ok' when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer().
texStorage3D(Target,Levels,Internalformat,Width,Height,Depth) ->
cast(5869, <<Target:?GLenum,Levels:?GLsizei,Internalformat:?GLenum,Width:?GLsizei,Height:?GLsizei,Depth:?GLsizei>>).
%% @doc glDepthBoundsEXT
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthBoundsEXT.xml">external</a> documentation.
--spec depthBoundsEXT(Zmin, Zmax) -> ok when Zmin :: clamp(),Zmax :: clamp().
+-spec depthBoundsEXT(Zmin, Zmax) -> 'ok' when Zmin :: clamp(),Zmax :: clamp().
depthBoundsEXT(Zmin,Zmax) ->
cast(5870, <<Zmin:?GLclampd,Zmax:?GLclampd>>).
%% @doc glStencilClearTagEXT
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/glStencilClearTagEXT.xml">external</a> documentation.
--spec stencilClearTagEXT(StencilTagBits, StencilClearTag) -> ok when StencilTagBits :: integer(),StencilClearTag :: integer().
+-spec stencilClearTagEXT(StencilTagBits, StencilClearTag) -> 'ok' when StencilTagBits :: integer(),StencilClearTag :: integer().
stencilClearTagEXT(StencilTagBits,StencilClearTag) ->
cast(5871, <<StencilTagBits:?GLsizei,StencilClearTag:?GLuint>>).
diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl
index 5faba48930..47d9a83999 100644
--- a/lib/wx/src/gen/glu.erl
+++ b/lib/wx/src/gen/glu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -356,7 +356,7 @@ checkExtension(ExtName,ExtString) ->
%% at the +`y' axis.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCylinder.xml">external</a> documentation.
--spec cylinder(Quad, Base, Top, Height, Slices, Stacks) -> ok when Quad :: integer(),Base :: float(),Top :: float(),Height :: float(),Slices :: integer(),Stacks :: integer().
+-spec cylinder(Quad, Base, Top, Height, Slices, Stacks) -> 'ok' when Quad :: integer(),Base :: float(),Top :: float(),Height :: float(),Slices :: integer(),Stacks :: integer().
cylinder(Quad,Base,Top,Height,Slices,Stacks) ->
cast(5017, <<Quad:?GLUquadric,Base:?GLdouble,Top:?GLdouble,Height:?GLdouble,Slices:?GLint,Stacks:?GLint>>).
@@ -367,7 +367,7 @@ cylinder(Quad,Base,Top,Height,Slices,Stacks) ->
%% cannot be used again.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDeleteQuadric.xml">external</a> documentation.
--spec deleteQuadric(Quad) -> ok when Quad :: integer().
+-spec deleteQuadric(Quad) -> 'ok' when Quad :: integer().
deleteQuadric(Quad) ->
cast(5018, <<Quad:?GLUquadric>>).
@@ -390,7 +390,7 @@ deleteQuadric(Quad) ->
%% (0, -`r', 0) it is (0.5, 0).
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDisk.xml">external</a> documentation.
--spec disk(Quad, Inner, Outer, Slices, Loops) -> ok when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer().
+-spec disk(Quad, Inner, Outer, Slices, Loops) -> 'ok' when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer().
disk(Quad,Inner,Outer,Slices,Loops) ->
cast(5019, <<Quad:?GLUquadric,Inner:?GLdouble,Outer:?GLdouble,Slices:?GLint,Loops:?GLint>>).
@@ -468,7 +468,7 @@ getString(Name) ->
%% -eyez);
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml">external</a> documentation.
--spec lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ) -> ok when EyeX :: float(),EyeY :: float(),EyeZ :: float(),CenterX :: float(),CenterY :: float(),CenterZ :: float(),UpX :: float(),UpY :: float(),UpZ :: float().
+-spec lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ) -> 'ok' when EyeX :: float(),EyeY :: float(),EyeZ :: float(),CenterX :: float(),CenterY :: float(),CenterZ :: float(),UpX :: float(),UpY :: float(),UpZ :: float().
lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) ->
cast(5022, <<EyeX:?GLdouble,EyeY:?GLdouble,EyeZ:?GLdouble,CenterX:?GLdouble,CenterY:?GLdouble,CenterZ:?GLdouble,UpX:?GLdouble,UpY:?GLdouble,UpZ:?GLdouble>>).
@@ -489,7 +489,7 @@ newQuadric() ->
%% to calling {@link gl:ortho/6} with near=-1 and far=1.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluOrtho2D.xml">external</a> documentation.
--spec ortho2D(Left, Right, Bottom, Top) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float().
+-spec ortho2D(Left, Right, Bottom, Top) -> 'ok' when Left :: float(),Right :: float(),Bottom :: float(),Top :: float().
ortho2D(Left,Right,Bottom,Top) ->
cast(5024, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble>>).
@@ -518,7 +518,7 @@ ortho2D(Left,Right,Bottom,Top) ->
%% at (0, -`r', 0) it is (0.5, 0.0).
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPartialDisk.xml">external</a> documentation.
--spec partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> ok when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer(),Start :: float(),Sweep :: float().
+-spec partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> 'ok' when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer(),Start :: float(),Sweep :: float().
partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) ->
cast(5025, <<Quad:?GLUquadric,Inner:?GLdouble,Outer:?GLdouble,Slices:?GLint,Loops:?GLint,Start:?GLdouble,Sweep:?GLdouble>>).
@@ -542,7 +542,7 @@ partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) ->
%% (f/aspect 0 0 0 0 f 0 0 0 0(zFar+zNear)/(zNear-zFar)(2×zFar×zNear)/(zNear-zFar) 0 0 -1 0)
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml">external</a> documentation.
--spec perspective(Fovy, Aspect, ZNear, ZFar) -> ok when Fovy :: float(),Aspect :: float(),ZNear :: float(),ZFar :: float().
+-spec perspective(Fovy, Aspect, ZNear, ZFar) -> 'ok' when Fovy :: float(),Aspect :: float(),ZNear :: float(),ZFar :: float().
perspective(Fovy,Aspect,ZNear,ZFar) ->
cast(5026, <<Fovy:?GLdouble,Aspect:?GLdouble,ZNear:?GLdouble,ZFar:?GLdouble>>).
@@ -568,7 +568,7 @@ perspective(Fovy,Aspect,ZNear,ZFar) ->
%% it was subdivided without the pick matrix.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPickMatrix.xml">external</a> documentation.
--spec pickMatrix(X, Y, DelX, DelY, Viewport) -> ok when X :: float(),Y :: float(),DelX :: float(),DelY :: float(),Viewport :: {integer(),integer(),integer(),integer()}.
+-spec pickMatrix(X, Y, DelX, DelY, Viewport) -> 'ok' when X :: float(),Y :: float(),DelX :: float(),DelY :: float(),Viewport :: {integer(),integer(),integer(),integer()}.
pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) ->
cast(5027, <<X:?GLdouble,Y:?GLdouble,DelX:?GLdouble,DelY:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
@@ -621,7 +621,7 @@ project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,
%% `?GLU_POINT': Quadrics are rendered as a set of points.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricDrawStyle.xml">external</a> documentation.
--spec quadricDrawStyle(Quad, Draw) -> ok when Quad :: integer(),Draw :: enum().
+-spec quadricDrawStyle(Quad, Draw) -> 'ok' when Quad :: integer(),Draw :: enum().
quadricDrawStyle(Quad,Draw) ->
cast(5029, <<Quad:?GLUquadric,Draw:?GLenum>>).
@@ -638,7 +638,7 @@ quadricDrawStyle(Quad,Draw) ->
%% initial value.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricNormals.xml">external</a> documentation.
--spec quadricNormals(Quad, Normal) -> ok when Quad :: integer(),Normal :: enum().
+-spec quadricNormals(Quad, Normal) -> 'ok' when Quad :: integer(),Normal :: enum().
quadricNormals(Quad,Normal) ->
cast(5030, <<Quad:?GLUquadric,Normal:?GLenum>>).
@@ -656,7 +656,7 @@ quadricNormals(Quad,Normal) ->
%% being drawn.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricOrientation.xml">external</a> documentation.
--spec quadricOrientation(Quad, Orientation) -> ok when Quad :: integer(),Orientation :: enum().
+-spec quadricOrientation(Quad, Orientation) -> 'ok' when Quad :: integer(),Orientation :: enum().
quadricOrientation(Quad,Orientation) ->
cast(5031, <<Quad:?GLUquadric,Orientation:?GLenum>>).
@@ -671,7 +671,7 @@ quadricOrientation(Quad,Orientation) ->
%% rendered.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricTexture.xml">external</a> documentation.
--spec quadricTexture(Quad, Texture) -> ok when Quad :: integer(),Texture :: 0|1.
+-spec quadricTexture(Quad, Texture) -> 'ok' when Quad :: integer(),Texture :: 0|1.
quadricTexture(Quad,Texture) ->
cast(5032, <<Quad:?GLUquadric,Texture:?GLboolean>>).
@@ -714,7 +714,7 @@ scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) ->
%% axis, and back to 1.0 at the +`y' axis.
%%
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluSphere.xml">external</a> documentation.
--spec sphere(Quad, Radius, Slices, Stacks) -> ok when Quad :: integer(),Radius :: float(),Slices :: integer(),Stacks :: integer().
+-spec sphere(Quad, Radius, Slices, Stacks) -> 'ok' when Quad :: integer(),Radius :: float(),Slices :: integer(),Stacks :: integer().
sphere(Quad,Radius,Slices,Stacks) ->
cast(5034, <<Quad:?GLUquadric,Radius:?GLdouble,Slices:?GLint,Stacks:?GLint>>).
diff --git a/lib/wx/src/gen/wxAcceleratorEntry.erl b/lib/wx/src/gen/wxAcceleratorEntry.erl
index 0885c25371..78d2ec47de 100644
--- a/lib/wx/src/gen/wxAcceleratorEntry.erl
+++ b/lib/wx/src/gen/wxAcceleratorEntry.erl
@@ -47,10 +47,10 @@ new() ->
%% Entry::wxAcceleratorEntry().<br />
%%
-spec new([Option]) -> wxAcceleratorEntry() when
- Option :: {flags, integer()}
- | {keyCode, integer()}
- | {cmd, integer()}
- | {item, wxMenuItem:wxMenuItem()};
+ Option :: {'flags', integer()}
+ | {'keyCode', integer()}
+ | {'cmd', integer()}
+ | {'item', wxMenuItem:wxMenuItem()};
(Entry) -> wxAcceleratorEntry() when
Entry::wxAcceleratorEntry().
new(Options)
@@ -93,7 +93,7 @@ getKeyCode(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv set(This,Flags,KeyCode,Cmd, [])
--spec set(This, Flags, KeyCode, Cmd) -> ok when
+-spec set(This, Flags, KeyCode, Cmd) -> 'ok' when
This::wxAcceleratorEntry(), Flags::integer(), KeyCode::integer(), Cmd::integer().
set(This,Flags,KeyCode,Cmd)
@@ -101,9 +101,9 @@ set(This,Flags,KeyCode,Cmd)
set(This,Flags,KeyCode,Cmd, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxacceleratorentry.html#wxacceleratorentryset">external documentation</a>.
--spec set(This, Flags, KeyCode, Cmd, [Option]) -> ok when
+-spec set(This, Flags, KeyCode, Cmd, [Option]) -> 'ok' when
This::wxAcceleratorEntry(), Flags::integer(), KeyCode::integer(), Cmd::integer(),
- Option :: {item, wxMenuItem:wxMenuItem()}.
+ Option :: {'item', wxMenuItem:wxMenuItem()}.
set(#wx_ref{type=ThisT,ref=ThisRef},Flags,KeyCode,Cmd, Options)
when is_integer(Flags),is_integer(KeyCode),is_integer(Cmd),is_list(Options) ->
?CLASS(ThisT,wxAcceleratorEntry),
@@ -114,7 +114,7 @@ set(#wx_ref{type=ThisT,ref=ThisRef},Flags,KeyCode,Cmd, Options)
<<ThisRef:32/?UI,Flags:32/?UI,KeyCode:32/?UI,Cmd:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxAcceleratorEntry()) -> ok.
+-spec destroy(This::wxAcceleratorEntry()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAcceleratorEntry),
wxe_util:destroy(?wxAcceleratorEntry_destroy,Obj),
diff --git a/lib/wx/src/gen/wxAcceleratorTable.erl b/lib/wx/src/gen/wxAcceleratorTable.erl
index 3ed419b057..4efcaaa7d0 100644
--- a/lib/wx/src/gen/wxAcceleratorTable.erl
+++ b/lib/wx/src/gen/wxAcceleratorTable.erl
@@ -46,7 +46,7 @@ new() ->
N::integer(), Entries::[wxAcceleratorEntry:wxAcceleratorEntry()].
new(N,Entries)
when is_integer(N),is_list(Entries) ->
- [?CLASS(EntriesT,wxAcceleratorEntry) || #wx_ref{type=EntriesT} <- Entries],
+ _ = [?CLASS(EntriesT,wxAcceleratorEntry) || #wx_ref{type=EntriesT} <- Entries],
wxe_util:construct(?wxAcceleratorTable_new_2,
<<N:32/?UI,(length(Entries)):32/?UI,
(<< <<(C#wx_ref.ref):32/?UI>> || C <- Entries>>)/binary, 0:(((0+length(Entries)) rem 2)*32)>>).
@@ -60,7 +60,7 @@ ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxAcceleratorTable()) -> ok.
+-spec destroy(This::wxAcceleratorTable()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAcceleratorTable),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxArtProvider.erl b/lib/wx/src/gen/wxArtProvider.erl
index c85c0b5457..da220a90c8 100644
--- a/lib/wx/src/gen/wxArtProvider.erl
+++ b/lib/wx/src/gen/wxArtProvider.erl
@@ -46,8 +46,8 @@ getBitmap(Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxartprovider.html#wxartprovidergetbitmap">external documentation</a>.
-spec getBitmap(Id, [Option]) -> wxBitmap:wxBitmap() when
Id::unicode:chardata(),
- Option :: {client, unicode:chardata()}
- | {size, {W::integer(), H::integer()}}.
+ Option :: {'client', unicode:chardata()}
+ | {'size', {W::integer(), H::integer()}}.
getBitmap(Id, Options)
when is_list(Id),is_list(Options) ->
Id_UC = unicode:characters_to_binary([Id,0]),
@@ -69,8 +69,8 @@ getIcon(Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxartprovider.html#wxartprovidergeticon">external documentation</a>.
-spec getIcon(Id, [Option]) -> wxIcon:wxIcon() when
Id::unicode:chardata(),
- Option :: {client, unicode:chardata()}
- | {size, {W::integer(), H::integer()}}.
+ Option :: {'client', unicode:chardata()}
+ | {'size', {W::integer(), H::integer()}}.
getIcon(Id, Options)
when is_list(Id),is_list(Options) ->
Id_UC = unicode:characters_to_binary([Id,0]),
diff --git a/lib/wx/src/gen/wxAuiDockArt.erl b/lib/wx/src/gen/wxAuiDockArt.erl
index 4149b1d424..5b7890f132 100644
--- a/lib/wx/src/gen/wxAuiDockArt.erl
+++ b/lib/wx/src/gen/wxAuiDockArt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ getMetric(#wx_ref{type=ThisT,ref=ThisRef},Id)
<<ThisRef:32/?UI,Id:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauidockart.html#wxauidockartsetcolour">external documentation</a>.
--spec setColour(This, Id, Colour) -> ok when
+-spec setColour(This, Id, Colour) -> 'ok' when
This::wxAuiDockArt(), Id::integer(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Id,Colour)
when is_integer(Id),tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -72,7 +72,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Id,Colour)
<<ThisRef:32/?UI,Id:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauidockart.html#wxauidockartsetfont">external documentation</a>.
--spec setFont(This, Id, Font) -> ok when
+-spec setFont(This, Id, Font) -> 'ok' when
This::wxAuiDockArt(), Id::integer(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},Id,#wx_ref{type=FontT,ref=FontRef})
when is_integer(Id) ->
@@ -82,7 +82,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},Id,#wx_ref{type=FontT,ref=FontRef})
<<ThisRef:32/?UI,Id:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauidockart.html#wxauidockartsetmetric">external documentation</a>.
--spec setMetric(This, Id, New_val) -> ok when
+-spec setMetric(This, Id, New_val) -> 'ok' when
This::wxAuiDockArt(), Id::integer(), New_val::integer().
setMetric(#wx_ref{type=ThisT,ref=ThisRef},Id,New_val)
when is_integer(Id),is_integer(New_val) ->
diff --git a/lib/wx/src/gen/wxAuiManager.erl b/lib/wx/src/gen/wxAuiManager.erl
index bf22e3091d..37693060e1 100644
--- a/lib/wx/src/gen/wxAuiManager.erl
+++ b/lib/wx/src/gen/wxAuiManager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -52,8 +52,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagerwxauimanager">external documentation</a>.
-spec new([Option]) -> wxAuiManager() when
- Option :: {managed_wnd, wxWindow:wxWindow()}
- | {flags, integer()}.
+ Option :: {'managed_wnd', wxWindow:wxWindow()}
+ | {'flags', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({managed_wnd, #wx_ref{type=Managed_wndT,ref=Managed_wndRef}}, Acc) -> ?CLASS(Managed_wndT,wxWindow),[<<1:32/?UI,Managed_wndRef:32/?UI>>|Acc];
@@ -78,8 +78,8 @@ addPane(This,Window)
%%
-spec addPane(This, Window, [Option]) -> boolean() when
This::wxAuiManager(), Window::wxWindow:wxWindow(),
- Option :: {direction, integer()}
- | {caption, unicode:chardata()};
+ Option :: {'direction', integer()}
+ | {'caption', unicode:chardata()};
(This, Window, Pane_info) -> boolean() when
This::wxAuiManager(), Window::wxWindow:wxWindow(), Pane_info::wxAuiPaneInfo:wxAuiPaneInfo().
addPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options)
@@ -189,7 +189,7 @@ getPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagerhidehint">external documentation</a>.
--spec hideHint(This) -> ok when
+-spec hideHint(This) -> 'ok' when
This::wxAuiManager().
hideHint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
@@ -207,7 +207,7 @@ insertPane(This,Window,Insert_location)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagerinsertpane">external documentation</a>.
-spec insertPane(This, Window, Insert_location, [Option]) -> boolean() when
This::wxAuiManager(), Window::wxWindow:wxWindow(), Insert_location::wxAuiPaneInfo:wxAuiPaneInfo(),
- Option :: {insert_level, integer()}.
+ Option :: {'insert_level', integer()}.
insertPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=Insert_locationT,ref=Insert_locationRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiManager),
@@ -220,7 +220,7 @@ insertPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#
<<ThisRef:32/?UI,WindowRef:32/?UI,Insert_locationRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagerloadpaneinfo">external documentation</a>.
--spec loadPaneInfo(This, Pane_part, Pane) -> ok when
+-spec loadPaneInfo(This, Pane_part, Pane) -> 'ok' when
This::wxAuiManager(), Pane_part::unicode:chardata(), Pane::wxAuiPaneInfo:wxAuiPaneInfo().
loadPaneInfo(#wx_ref{type=ThisT,ref=ThisRef},Pane_part,#wx_ref{type=PaneT,ref=PaneRef})
when is_list(Pane_part) ->
@@ -241,7 +241,7 @@ loadPerspective(This,Perspective)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagerloadperspective">external documentation</a>.
-spec loadPerspective(This, Perspective, [Option]) -> boolean() when
This::wxAuiManager(), Perspective::unicode:chardata(),
- Option :: {update, boolean()}.
+ Option :: {'update', boolean()}.
loadPerspective(#wx_ref{type=ThisT,ref=ThisRef},Perspective, Options)
when is_list(Perspective),is_list(Options) ->
?CLASS(ThisT,wxAuiManager),
@@ -270,7 +270,7 @@ savePerspective(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagersetartprovider">external documentation</a>.
--spec setArtProvider(This, Art_provider) -> ok when
+-spec setArtProvider(This, Art_provider) -> 'ok' when
This::wxAuiManager(), Art_provider::wxAuiDockArt:wxAuiDockArt().
setArtProvider(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Art_providerT,ref=Art_providerRef}) ->
?CLASS(ThisT,wxAuiManager),
@@ -279,7 +279,7 @@ setArtProvider(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Art_providerT,ref=Ar
<<ThisRef:32/?UI,Art_providerRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagersetdocksizeconstraint">external documentation</a>.
--spec setDockSizeConstraint(This, Width_pct, Height_pct) -> ok when
+-spec setDockSizeConstraint(This, Width_pct, Height_pct) -> 'ok' when
This::wxAuiManager(), Width_pct::number(), Height_pct::number().
setDockSizeConstraint(#wx_ref{type=ThisT,ref=ThisRef},Width_pct,Height_pct)
when is_number(Width_pct),is_number(Height_pct) ->
@@ -288,7 +288,7 @@ setDockSizeConstraint(#wx_ref{type=ThisT,ref=ThisRef},Width_pct,Height_pct)
<<ThisRef:32/?UI,0:32,Width_pct:64/?F,Height_pct:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagersetflags">external documentation</a>.
--spec setFlags(This, Flags) -> ok when
+-spec setFlags(This, Flags) -> 'ok' when
This::wxAuiManager(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -297,7 +297,7 @@ setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
<<ThisRef:32/?UI,Flags:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagersetmanagedwindow">external documentation</a>.
--spec setManagedWindow(This, Managed_wnd) -> ok when
+-spec setManagedWindow(This, Managed_wnd) -> 'ok' when
This::wxAuiManager(), Managed_wnd::wxWindow:wxWindow().
setManagedWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Managed_wndT,ref=Managed_wndRef}) ->
?CLASS(ThisT,wxAuiManager),
@@ -306,7 +306,7 @@ setManagedWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Managed_wndT,ref=M
<<ThisRef:32/?UI,Managed_wndRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagershowhint">external documentation</a>.
--spec showHint(This, Rect) -> ok when
+-spec showHint(This, Rect) -> 'ok' when
This::wxAuiManager(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
showHint(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
@@ -315,7 +315,7 @@ showHint(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanageruninit">external documentation</a>.
--spec unInit(This) -> ok when
+-spec unInit(This) -> 'ok' when
This::wxAuiManager().
unInit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
@@ -323,7 +323,7 @@ unInit(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanager.html#wxauimanagerupdate">external documentation</a>.
--spec update(This) -> ok when
+-spec update(This) -> 'ok' when
This::wxAuiManager().
update(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxAuiManager),
@@ -331,7 +331,7 @@ update(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxAuiManager()) -> ok.
+-spec destroy(This::wxAuiManager()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiManager),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxAuiManagerEvent.erl b/lib/wx/src/gen/wxAuiManagerEvent.erl
index 88e4433f24..2878c5b272 100644
--- a/lib/wx/src/gen/wxAuiManagerEvent.erl
+++ b/lib/wx/src/gen/wxAuiManagerEvent.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxAuiManagerEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanagerevent.html#wxauimanagereventsetmanager">external documentation</a>.
--spec setManager(This, Mgr) -> ok when
+-spec setManager(This, Mgr) -> 'ok' when
This::wxAuiManagerEvent(), Mgr::wxAuiManager:wxAuiManager().
setManager(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MgrT,ref=MgrRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
@@ -63,7 +63,7 @@ getManager(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanagerevent.html#wxauimanagereventsetpane">external documentation</a>.
--spec setPane(This, P) -> ok when
+-spec setPane(This, P) -> 'ok' when
This::wxAuiManagerEvent(), P::wxAuiPaneInfo:wxAuiPaneInfo().
setPane(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PT,ref=PRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
@@ -80,7 +80,7 @@ getPane(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanagerevent.html#wxauimanagereventsetbutton">external documentation</a>.
--spec setButton(This, B) -> ok when
+-spec setButton(This, B) -> 'ok' when
This::wxAuiManagerEvent(), B::integer().
setButton(#wx_ref{type=ThisT,ref=ThisRef},B)
when is_integer(B) ->
@@ -97,7 +97,7 @@ getButton(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanagerevent.html#wxauimanagereventsetdc">external documentation</a>.
--spec setDC(This, Pdc) -> ok when
+-spec setDC(This, Pdc) -> 'ok' when
This::wxAuiManagerEvent(), Pdc::wxDC:wxDC().
setDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PdcT,ref=PdcRef}) ->
?CLASS(ThisT,wxAuiManagerEvent),
@@ -114,7 +114,7 @@ getDC(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv veto(This, [])
--spec veto(This) -> ok when
+-spec veto(This) -> 'ok' when
This::wxAuiManagerEvent().
veto(This)
@@ -122,9 +122,9 @@ veto(This)
veto(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanagerevent.html#wxauimanagereventveto">external documentation</a>.
--spec veto(This, [Option]) -> ok when
+-spec veto(This, [Option]) -> 'ok' when
This::wxAuiManagerEvent(),
- Option :: {veto, boolean()}.
+ Option :: {'veto', boolean()}.
veto(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiManagerEvent),
@@ -143,7 +143,7 @@ getVeto(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauimanagerevent.html#wxauimanagereventsetcanveto">external documentation</a>.
--spec setCanVeto(This, Can_veto) -> ok when
+-spec setCanVeto(This, Can_veto) -> 'ok' when
This::wxAuiManagerEvent(), Can_veto::boolean().
setCanVeto(#wx_ref{type=ThisT,ref=ThisRef},Can_veto)
when is_boolean(Can_veto) ->
diff --git a/lib/wx/src/gen/wxAuiNotebook.erl b/lib/wx/src/gen/wxAuiNotebook.erl
index 7ec1acb26d..42da35e16a 100644
--- a/lib/wx/src/gen/wxAuiNotebook.erl
+++ b/lib/wx/src/gen/wxAuiNotebook.erl
@@ -100,10 +100,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebookwxauinotebook">external documentation</a>.
-spec new(Parent, [Option]) -> wxAuiNotebook() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -127,8 +127,8 @@ addPage(This,Page,Caption)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebookaddpage">external documentation</a>.
-spec addPage(This, Page, Caption, [Option]) -> boolean() when
This::wxAuiNotebook(), Page::wxWindow:wxWindow(), Caption::unicode:chardata(),
- Option :: {select, boolean()}
- | {bitmap, wxBitmap:wxBitmap()}.
+ Option :: {'select', boolean()}
+ | {'bitmap', wxBitmap:wxBitmap()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Caption, Options)
when is_list(Caption),is_list(Options) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -152,10 +152,10 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebookcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxAuiNotebook(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -249,8 +249,8 @@ insertPage(This,Page_idx,Page,Caption)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebookinsertpage">external documentation</a>.
-spec insertPage(This, Page_idx, Page, Caption, [Option]) -> boolean() when
This::wxAuiNotebook(), Page_idx::integer(), Page::wxWindow:wxWindow(), Caption::unicode:chardata(),
- Option :: {select, boolean()}
- | {bitmap, wxBitmap:wxBitmap()}.
+ Option :: {'select', boolean()}
+ | {'bitmap', wxBitmap:wxBitmap()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},Page_idx,#wx_ref{type=PageT,ref=PageRef},Caption, Options)
when is_integer(Page_idx),is_list(Caption),is_list(Options) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -273,7 +273,7 @@ removePage(#wx_ref{type=ThisT,ref=ThisRef},Page)
<<ThisRef:32/?UI,Page:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebooksetartprovider">external documentation</a>.
--spec setArtProvider(This, Art) -> ok when
+-spec setArtProvider(This, Art) -> 'ok' when
This::wxAuiNotebook(), Art::wxAuiTabArt:wxAuiTabArt().
setArtProvider(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ArtT,ref=ArtRef}) ->
?CLASS(ThisT,wxAuiNotebook),
@@ -320,7 +320,7 @@ setSelection(#wx_ref{type=ThisT,ref=ThisRef},New_page)
<<ThisRef:32/?UI,New_page:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebooksettabctrlheight">external documentation</a>.
--spec setTabCtrlHeight(This, Height) -> ok when
+-spec setTabCtrlHeight(This, Height) -> 'ok' when
This::wxAuiNotebook(), Height::integer().
setTabCtrlHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
@@ -329,7 +329,7 @@ setTabCtrlHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
<<ThisRef:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebook.html#wxauinotebooksetuniformbitmapsize">external documentation</a>.
--spec setUniformBitmapSize(This, Size) -> ok when
+-spec setUniformBitmapSize(This, Size) -> 'ok' when
This::wxAuiNotebook(), Size::{W::integer(), H::integer()}.
setUniformBitmapSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -338,7 +338,7 @@ setUniformBitmapSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxAuiNotebook()) -> ok.
+-spec destroy(This::wxAuiNotebook()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiNotebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxAuiNotebookEvent.erl b/lib/wx/src/gen/wxAuiNotebookEvent.erl
index 4ebe408cef..a51a85b7f4 100644
--- a/lib/wx/src/gen/wxAuiNotebookEvent.erl
+++ b/lib/wx/src/gen/wxAuiNotebookEvent.erl
@@ -52,7 +52,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxAuiNotebookEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebookevent.html#wxauinotebookeventsetselection">external documentation</a>.
--spec setSelection(This, S) -> ok when
+-spec setSelection(This, S) -> 'ok' when
This::wxAuiNotebookEvent(), S::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_integer(S) ->
@@ -69,7 +69,7 @@ getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebookevent.html#wxauinotebookeventsetoldselection">external documentation</a>.
--spec setOldSelection(This, S) -> ok when
+-spec setOldSelection(This, S) -> 'ok' when
This::wxAuiNotebookEvent(), S::integer().
setOldSelection(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_integer(S) ->
@@ -86,7 +86,7 @@ getOldSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauinotebookevent.html#wxauinotebookeventsetdragsource">external documentation</a>.
--spec setDragSource(This, S) -> ok when
+-spec setDragSource(This, S) -> 'ok' when
This::wxAuiNotebookEvent(), S::wxAuiNotebook:wxAuiNotebook().
setDragSource(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ST,ref=SRef}) ->
?CLASS(ThisT,wxAuiNotebookEvent),
diff --git a/lib/wx/src/gen/wxAuiPaneInfo.erl b/lib/wx/src/gen/wxAuiPaneInfo.erl
index 1f15e9cd39..858da200be 100644
--- a/lib/wx/src/gen/wxAuiPaneInfo.erl
+++ b/lib/wx/src/gen/wxAuiPaneInfo.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -103,7 +103,7 @@ bottomDockable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfobottomdockable">external documentation</a>.
-spec bottomDockable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
bottomDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -134,7 +134,7 @@ captionVisible(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfocaptionvisible">external documentation</a>.
-spec captionVisible(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
captionVisible(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -171,7 +171,7 @@ closeButton(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfoclosebutton">external documentation</a>.
-spec closeButton(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
closeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -200,7 +200,7 @@ destroyOnClose(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfodestroyonclose">external documentation</a>.
-spec destroyOnClose(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
destroyOnClose(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -238,7 +238,7 @@ dockable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfodockable">external documentation</a>.
-spec dockable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
dockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -275,7 +275,7 @@ floatable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfofloatable">external documentation</a>.
-spec floatable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
floatable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -332,7 +332,7 @@ gripper(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfogripper">external documentation</a>.
-spec gripper(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
gripper(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -353,7 +353,7 @@ gripperTop(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfogrippertop">external documentation</a>.
-spec gripperTop(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {attop, boolean()}.
+ Option :: {'attop', boolean()}.
gripperTop(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -576,7 +576,7 @@ leftDockable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfoleftdockable">external documentation</a>.
-spec leftDockable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
leftDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -615,7 +615,7 @@ maximizeButton(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfomaximizebutton">external documentation</a>.
-spec maximizeButton(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
maximizeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -654,7 +654,7 @@ minimizeButton(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfominimizebutton">external documentation</a>.
-spec minimizeButton(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
minimizeButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -675,7 +675,7 @@ movable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfomovable">external documentation</a>.
-spec movable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
movable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -706,7 +706,7 @@ paneBorder(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfopaneborder">external documentation</a>.
-spec paneBorder(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
paneBorder(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -727,7 +727,7 @@ pinButton(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfopinbutton">external documentation</a>.
-spec pinButton(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {visible, boolean()}.
+ Option :: {'visible', boolean()}.
pinButton(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -757,7 +757,7 @@ resizable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinforesizable">external documentation</a>.
-spec resizable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {resizable, boolean()}.
+ Option :: {'resizable', boolean()}.
resizable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -786,7 +786,7 @@ rightDockable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinforightdockable">external documentation</a>.
-spec rightDockable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
rightDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -806,7 +806,7 @@ row(#wx_ref{type=ThisT,ref=ThisRef},Row)
<<ThisRef:32/?UI,Row:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfosafeset">external documentation</a>.
--spec safeSet(This, Source) -> ok when
+-spec safeSet(This, Source) -> 'ok' when
This::wxAuiPaneInfo(), Source::wxAuiPaneInfo().
safeSet(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SourceT,ref=SourceRef}) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -834,7 +834,7 @@ show(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfoshow">external documentation</a>.
-spec show(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {show, boolean()}.
+ Option :: {'show', boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -871,7 +871,7 @@ topDockable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauipaneinfo.html#wxauipaneinfotopdockable">external documentation</a>.
-spec topDockable(This, [Option]) -> wxAuiPaneInfo() when
This::wxAuiPaneInfo(),
- Option :: {b, boolean()}.
+ Option :: {'b', boolean()}.
topDockable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxAuiPaneInfo),
@@ -955,7 +955,7 @@ getFloatingSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxAuiPaneInfo()) -> ok.
+-spec destroy(This::wxAuiPaneInfo()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiPaneInfo),
wxe_util:destroy(?wxAuiPaneInfo_destruct,Obj),
diff --git a/lib/wx/src/gen/wxAuiSimpleTabArt.erl b/lib/wx/src/gen/wxAuiSimpleTabArt.erl
index 57d12e2eb4..eae00e5591 100644
--- a/lib/wx/src/gen/wxAuiSimpleTabArt.erl
+++ b/lib/wx/src/gen/wxAuiSimpleTabArt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ new() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxAuiSimpleTabArt()) -> ok.
+-spec destroy(This::wxAuiSimpleTabArt()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxAuiSimpleTabArt),
wxe_util:destroy(?wxAuiSimpleTabArt_destroy,Obj),
diff --git a/lib/wx/src/gen/wxAuiTabArt.erl b/lib/wx/src/gen/wxAuiTabArt.erl
index 80924c0269..324c167aa5 100644
--- a/lib/wx/src/gen/wxAuiTabArt.erl
+++ b/lib/wx/src/gen/wxAuiTabArt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxAuiTabArt() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauitabart.html#wxauitabartsetflags">external documentation</a>.
--spec setFlags(This, Flags) -> ok when
+-spec setFlags(This, Flags) -> 'ok' when
This::wxAuiTabArt(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -46,7 +46,7 @@ setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
<<ThisRef:32/?UI,Flags:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauitabart.html#wxauitabartsetmeasuringfont">external documentation</a>.
--spec setMeasuringFont(This, Font) -> ok when
+-spec setMeasuringFont(This, Font) -> 'ok' when
This::wxAuiTabArt(), Font::wxFont:wxFont().
setMeasuringFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxAuiTabArt),
@@ -55,7 +55,7 @@ setMeasuringFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauitabart.html#wxauitabartsetnormalfont">external documentation</a>.
--spec setNormalFont(This, Font) -> ok when
+-spec setNormalFont(This, Font) -> 'ok' when
This::wxAuiTabArt(), Font::wxFont:wxFont().
setNormalFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxAuiTabArt),
@@ -64,7 +64,7 @@ setNormalFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) -
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauitabart.html#wxauitabartsetselectedfont">external documentation</a>.
--spec setSelectedFont(This, Font) -> ok when
+-spec setSelectedFont(This, Font) -> 'ok' when
This::wxAuiTabArt(), Font::wxFont:wxFont().
setSelectedFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxAuiTabArt),
@@ -73,7 +73,7 @@ setSelectedFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef})
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauitabart.html#wxauitabartsetcolour">external documentation</a>.
--spec setColour(This, Colour) -> ok when
+-spec setColour(This, Colour) -> 'ok' when
This::wxAuiTabArt(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -82,7 +82,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxauitabart.html#wxauitabartsetactivecolour">external documentation</a>.
--spec setActiveColour(This, Colour) -> ok when
+-spec setActiveColour(This, Colour) -> 'ok' when
This::wxAuiTabArt(), Colour::wx:wx_colour().
setActiveColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
diff --git a/lib/wx/src/gen/wxBitmap.erl b/lib/wx/src/gen/wxBitmap.erl
index 9bf2f8eee0..e7830dae9b 100644
--- a/lib/wx/src/gen/wxBitmap.erl
+++ b/lib/wx/src/gen/wxBitmap.erl
@@ -67,20 +67,20 @@ new(Image)
%% <br /> Also:<br />
%% new(Filename, [Option]) -> wxBitmap() when<br />
%% Filename::unicode:chardata(),<br />
-%% Option :: {type, wx:wx_enum()};<br />
+%% Option :: {'type', wx:wx_enum()};<br />
%% (Image, [Option]) -> wxBitmap() when<br />
%% Image::wxImage:wxImage(),<br />
-%% Option :: {depth, integer()}.<br />
+%% Option :: {'depth', integer()}.<br />
%%
%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
-spec new(Width, Height) -> wxBitmap() when
Width::integer(), Height::integer();
(Filename, [Option]) -> wxBitmap() when
Filename::unicode:chardata(),
- Option :: {type, wx:wx_enum()};
+ Option :: {'type', wx:wx_enum()};
(Image, [Option]) -> wxBitmap() when
Image::wxImage:wxImage(),
- Option :: {depth, integer()}.
+ Option :: {'depth', integer()}.
new(Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -106,13 +106,13 @@ new(#wx_ref{type=ImageT,ref=ImageRef}, Options)
%% <br /> Also:<br />
%% new(Width, Height, [Option]) -> wxBitmap() when<br />
%% Width::integer(), Height::integer(),<br />
-%% Option :: {depth, integer()}.<br />
+%% Option :: {'depth', integer()}.<br />
%%
-spec new(Bits, Width, Height) -> wxBitmap() when
Bits::binary(), Width::integer(), Height::integer();
(Width, Height, [Option]) -> wxBitmap() when
Width::integer(), Height::integer(),
- Option :: {depth, integer()}.
+ Option :: {'depth', integer()}.
new(Bits,Width,Height)
when is_binary(Bits),is_integer(Width),is_integer(Height) ->
@@ -128,7 +128,7 @@ new(Width,Height, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapwxbitmap">external documentation</a>.
-spec new(Bits, Width, Height, [Option]) -> wxBitmap() when
Bits::binary(), Width::integer(), Height::integer(),
- Option :: {depth, integer()}.
+ Option :: {'depth', integer()}.
new(Bits,Width,Height, Options)
when is_binary(Bits),is_integer(Width),is_integer(Height),is_list(Options) ->
wxe_util:send_bin(Bits),
@@ -166,7 +166,7 @@ create(This,Width,Height)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapcreate">external documentation</a>.
-spec create(This, Width, Height, [Option]) -> boolean() when
This::wxBitmap(), Width::integer(), Height::integer(),
- Option :: {depth, integer()}.
+ Option :: {'depth', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxBitmap),
@@ -237,7 +237,7 @@ loadFile(This,Name)
%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
-spec loadFile(This, Name, [Option]) -> boolean() when
This::wxBitmap(), Name::unicode:chardata(),
- Option :: {type, wx:wx_enum()}.
+ Option :: {'type', wx:wx_enum()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
when is_list(Name),is_list(Options) ->
?CLASS(ThisT,wxBitmap),
@@ -268,7 +268,7 @@ saveFile(This,Name,Type)
%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
-spec saveFile(This, Name, Type, [Option]) -> boolean() when
This::wxBitmap(), Name::unicode:chardata(), Type::wx:wx_enum(),
- Option :: {palette, wxPalette:wxPalette()}.
+ Option :: {'palette', wxPalette:wxPalette()}.
saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Type, Options)
when is_list(Name),is_integer(Type),is_list(Options) ->
?CLASS(ThisT,wxBitmap),
@@ -280,7 +280,7 @@ saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Type, Options)
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapsetdepth">external documentation</a>.
--spec setDepth(This, Depth) -> ok when
+-spec setDepth(This, Depth) -> 'ok' when
This::wxBitmap(), Depth::integer().
setDepth(#wx_ref{type=ThisT,ref=ThisRef},Depth)
when is_integer(Depth) ->
@@ -289,7 +289,7 @@ setDepth(#wx_ref{type=ThisT,ref=ThisRef},Depth)
<<ThisRef:32/?UI,Depth:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapsetheight">external documentation</a>.
--spec setHeight(This, Height) -> ok when
+-spec setHeight(This, Height) -> 'ok' when
This::wxBitmap(), Height::integer().
setHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
@@ -298,7 +298,7 @@ setHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
<<ThisRef:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapsetmask">external documentation</a>.
--spec setMask(This, Mask) -> ok when
+-spec setMask(This, Mask) -> 'ok' when
This::wxBitmap(), Mask::wxMask:wxMask().
setMask(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef}) ->
?CLASS(ThisT,wxBitmap),
@@ -307,7 +307,7 @@ setMask(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef}) ->
<<ThisRef:32/?UI,MaskRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapsetpalette">external documentation</a>.
--spec setPalette(This, Palette) -> ok when
+-spec setPalette(This, Palette) -> 'ok' when
This::wxBitmap(), Palette::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) ->
?CLASS(ThisT,wxBitmap),
@@ -316,7 +316,7 @@ setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}
<<ThisRef:32/?UI,PaletteRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmap.html#wxbitmapsetwidth">external documentation</a>.
--spec setWidth(This, Width) -> ok when
+-spec setWidth(This, Width) -> 'ok' when
This::wxBitmap(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -325,7 +325,7 @@ setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBitmap()) -> ok.
+-spec destroy(This::wxBitmap()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBitmap),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBitmapButton.erl b/lib/wx/src/gen/wxBitmapButton.erl
index 642828b0b0..d1d2d037e8 100644
--- a/lib/wx/src/gen/wxBitmapButton.erl
+++ b/lib/wx/src/gen/wxBitmapButton.erl
@@ -100,10 +100,10 @@ new(Parent,Id,Bitmap)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapbutton.html#wxbitmapbuttonwxbitmapbutton">external documentation</a>.
-spec new(Parent, Id, Bitmap, [Option]) -> wxBitmapButton() when
Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -128,10 +128,10 @@ create(This,Parent,Id,Bitmap)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapbutton.html#wxbitmapbuttoncreate">external documentation</a>.
-spec create(This, Parent, Id, Bitmap, [Option]) -> boolean() when
This::wxBitmapButton(), Parent::wxWindow:wxWindow(), Id::integer(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxBitmapButton),
@@ -179,7 +179,7 @@ getBitmapSelected(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmapdisabled">external documentation</a>.
--spec setBitmapDisabled(This, Disabled) -> ok when
+-spec setBitmapDisabled(This, Disabled) -> 'ok' when
This::wxBitmapButton(), Disabled::wxBitmap:wxBitmap().
setBitmapDisabled(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DisabledT,ref=DisabledRef}) ->
?CLASS(ThisT,wxBitmapButton),
@@ -188,7 +188,7 @@ setBitmapDisabled(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DisabledT,ref=Dis
<<ThisRef:32/?UI,DisabledRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmapfocus">external documentation</a>.
--spec setBitmapFocus(This, Focus) -> ok when
+-spec setBitmapFocus(This, Focus) -> 'ok' when
This::wxBitmapButton(), Focus::wxBitmap:wxBitmap().
setBitmapFocus(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FocusT,ref=FocusRef}) ->
?CLASS(ThisT,wxBitmapButton),
@@ -197,7 +197,7 @@ setBitmapFocus(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FocusT,ref=FocusRef}
<<ThisRef:32/?UI,FocusRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmaplabel">external documentation</a>.
--spec setBitmapLabel(This, Bitmap) -> ok when
+-spec setBitmapLabel(This, Bitmap) -> 'ok' when
This::wxBitmapButton(), Bitmap::wxBitmap:wxBitmap().
setBitmapLabel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxBitmapButton),
@@ -206,7 +206,7 @@ setBitmapLabel(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRe
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapbutton.html#wxbitmapbuttonsetbitmapselected">external documentation</a>.
--spec setBitmapSelected(This, Sel) -> ok when
+-spec setBitmapSelected(This, Sel) -> 'ok' when
This::wxBitmapButton(), Sel::wxBitmap:wxBitmap().
setBitmapSelected(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SelT,ref=SelRef}) ->
?CLASS(ThisT,wxBitmapButton),
@@ -215,7 +215,7 @@ setBitmapSelected(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SelT,ref=SelRef})
<<ThisRef:32/?UI,SelRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBitmapButton()) -> ok.
+-spec destroy(This::wxBitmapButton()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBitmapButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBitmapDataObject.erl b/lib/wx/src/gen/wxBitmapDataObject.erl
index 2c90498880..58094a5910 100644
--- a/lib/wx/src/gen/wxBitmapDataObject.erl
+++ b/lib/wx/src/gen/wxBitmapDataObject.erl
@@ -51,7 +51,7 @@ new() ->
%% Bitmap::wxBitmap:wxBitmap().<br />
%%
-spec new([Option]) -> wxBitmapDataObject() when
- Option :: {bitmap, wxBitmap:wxBitmap()};
+ Option :: {'bitmap', wxBitmap:wxBitmap()};
(Bitmap) -> wxBitmapDataObject() when
Bitmap::wxBitmap:wxBitmap().
new(Options)
@@ -75,7 +75,7 @@ getBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbitmapdataobject.html#wxbitmapdataobjectsetbitmap">external documentation</a>.
--spec setBitmap(This, Bitmap) -> ok when
+-spec setBitmap(This, Bitmap) -> 'ok' when
This::wxBitmapDataObject(), Bitmap::wxBitmap:wxBitmap().
setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxBitmapDataObject),
@@ -84,7 +84,7 @@ setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) -
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBitmapDataObject()) -> ok.
+-spec destroy(This::wxBitmapDataObject()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBitmapDataObject),
wxe_util:destroy(?wxBitmapDataObject_destroy,Obj),
diff --git a/lib/wx/src/gen/wxBoxSizer.erl b/lib/wx/src/gen/wxBoxSizer.erl
index 1a19b264d9..595be0a452 100644
--- a/lib/wx/src/gen/wxBoxSizer.erl
+++ b/lib/wx/src/gen/wxBoxSizer.erl
@@ -64,7 +64,7 @@ getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBoxSizer()) -> ok.
+-spec destroy(This::wxBoxSizer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBoxSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBrush.erl b/lib/wx/src/gen/wxBrush.erl
index bc1956c1f7..8f5eced1b9 100644
--- a/lib/wx/src/gen/wxBrush.erl
+++ b/lib/wx/src/gen/wxBrush.erl
@@ -63,7 +63,7 @@ new(#wx_ref{type=StippleBitmapT,ref=StippleBitmapRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbrush.html#wxbrushwxbrush">external documentation</a>.
-spec new(Colour, [Option]) -> wxBrush() when
Colour::wx:wx_colour(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(Colour, Options)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4,is_list(Options) ->
MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc];
@@ -113,7 +113,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbrush.html#wxbrushsetcolour">external documentation</a>.
--spec setColour(This, Col) -> ok when
+-spec setColour(This, Col) -> 'ok' when
This::wxBrush(), Col::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -122,7 +122,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbrush.html#wxbrushsetcolour">external documentation</a>.
--spec setColour(This, R, G, B) -> ok when
+-spec setColour(This, R, G, B) -> 'ok' when
This::wxBrush(), R::integer(), G::integer(), B::integer().
setColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
when is_integer(R),is_integer(G),is_integer(B) ->
@@ -131,7 +131,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
<<ThisRef:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbrush.html#wxbrushsetstipple">external documentation</a>.
--spec setStipple(This, Stipple) -> ok when
+-spec setStipple(This, Stipple) -> 'ok' when
This::wxBrush(), Stipple::wxBitmap:wxBitmap().
setStipple(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StippleT,ref=StippleRef}) ->
?CLASS(ThisT,wxBrush),
@@ -140,7 +140,7 @@ setStipple(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StippleT,ref=StippleRef}
<<ThisRef:32/?UI,StippleRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbrush.html#wxbrushsetstyle">external documentation</a>.
--spec setStyle(This, Style) -> ok when
+-spec setStyle(This, Style) -> 'ok' when
This::wxBrush(), Style::integer().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
@@ -149,7 +149,7 @@ setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
<<ThisRef:32/?UI,Style:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBrush()) -> ok.
+-spec destroy(This::wxBrush()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBrush),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBufferedDC.erl b/lib/wx/src/gen/wxBufferedDC.erl
index 67b851a84e..7856f6bb96 100644
--- a/lib/wx/src/gen/wxBufferedDC.erl
+++ b/lib/wx/src/gen/wxBufferedDC.erl
@@ -81,15 +81,15 @@ new(Dc)
%% <br /> Also:<br />
%% new(Dc, [Option]) -> wxBufferedDC() when<br />
%% Dc::wxDC:wxDC(),<br />
-%% Option :: {buffer, wxBitmap:wxBitmap()}<br />
-%% | {style, integer()}.<br />
+%% Option :: {'buffer', wxBitmap:wxBitmap()}<br />
+%% | {'style', integer()}.<br />
%%
-spec new(Dc, Area) -> wxBufferedDC() when
Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()};
(Dc, [Option]) -> wxBufferedDC() when
Dc::wxDC:wxDC(),
- Option :: {buffer, wxBitmap:wxBitmap()}
- | {style, integer()}.
+ Option :: {'buffer', wxBitmap:wxBitmap()}
+ | {'style', integer()}.
new(Dc,Area={AreaW,AreaH})
when is_record(Dc, wx_ref),is_integer(AreaW),is_integer(AreaH) ->
@@ -107,7 +107,7 @@ new(#wx_ref{type=DcT,ref=DcRef}, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbuffereddc.html#wxbuffereddcwxbuffereddc">external documentation</a>.
-spec new(Dc, Area, [Option]) -> wxBufferedDC() when
Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()},
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH}, Options)
when is_integer(AreaW),is_integer(AreaH),is_list(Options) ->
?CLASS(DcT,wxDC),
@@ -118,7 +118,7 @@ new(#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH}, Options)
<<DcRef:32/?UI,AreaW:32/?UI,AreaH:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv init(This,Dc, [])
--spec init(This, Dc) -> ok when
+-spec init(This, Dc) -> 'ok' when
This::wxBufferedDC(), Dc::wxDC:wxDC().
init(This,Dc)
@@ -127,17 +127,17 @@ init(This,Dc)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbuffereddc.html#wxbuffereddcinit">external documentation</a>.
%% <br /> Also:<br />
-%% init(This, Dc, [Option]) -> ok when<br />
+%% init(This, Dc, [Option]) -> 'ok' when<br />
%% This::wxBufferedDC(), Dc::wxDC:wxDC(),<br />
-%% Option :: {buffer, wxBitmap:wxBitmap()}<br />
-%% | {style, integer()}.<br />
+%% Option :: {'buffer', wxBitmap:wxBitmap()}<br />
+%% | {'style', integer()}.<br />
%%
--spec init(This, Dc, Area) -> ok when
+-spec init(This, Dc, Area) -> 'ok' when
This::wxBufferedDC(), Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()};
- (This, Dc, [Option]) -> ok when
+ (This, Dc, [Option]) -> 'ok' when
This::wxBufferedDC(), Dc::wxDC:wxDC(),
- Option :: {buffer, wxBitmap:wxBitmap()}
- | {style, integer()}.
+ Option :: {'buffer', wxBitmap:wxBitmap()}
+ | {'style', integer()}.
init(This,Dc,Area={AreaW,AreaH})
when is_record(This, wx_ref),is_record(Dc, wx_ref),is_integer(AreaW),is_integer(AreaH) ->
@@ -154,9 +154,9 @@ init(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}, Options)
<<ThisRef:32/?UI,DcRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbuffereddc.html#wxbuffereddcinit">external documentation</a>.
--spec init(This, Dc, Area, [Option]) -> ok when
+-spec init(This, Dc, Area, [Option]) -> 'ok' when
This::wxBufferedDC(), Dc::wxDC:wxDC(), Area::{W::integer(), H::integer()},
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
init(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH}, Options)
when is_integer(AreaW),is_integer(AreaH),is_list(Options) ->
?CLASS(ThisT,wxBufferedDC),
@@ -168,7 +168,7 @@ init(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef},{AreaW,AreaH},
<<ThisRef:32/?UI,DcRef:32/?UI,AreaW:32/?UI,AreaH:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBufferedDC()) -> ok.
+-spec destroy(This::wxBufferedDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBufferedDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxBufferedPaintDC.erl b/lib/wx/src/gen/wxBufferedPaintDC.erl
index 0601caf300..5af5098d27 100644
--- a/lib/wx/src/gen/wxBufferedPaintDC.erl
+++ b/lib/wx/src/gen/wxBufferedPaintDC.erl
@@ -78,13 +78,13 @@ new(Window)
%% <br /> Also:<br />
%% new(Window, [Option]) -> wxBufferedPaintDC() when<br />
%% Window::wxWindow:wxWindow(),<br />
-%% Option :: {style, integer()}.<br />
+%% Option :: {'style', integer()}.<br />
%%
-spec new(Window, Buffer) -> wxBufferedPaintDC() when
Window::wxWindow:wxWindow(), Buffer::wxBitmap:wxBitmap();
(Window, [Option]) -> wxBufferedPaintDC() when
Window::wxWindow:wxWindow(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(Window,Buffer)
when is_record(Window, wx_ref),is_record(Buffer, wx_ref) ->
@@ -101,7 +101,7 @@ new(#wx_ref{type=WindowT,ref=WindowRef}, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbufferedpaintdc.html#wxbufferedpaintdcwxbufferedpaintdc">external documentation</a>.
-spec new(Window, Buffer, [Option]) -> wxBufferedPaintDC() when
Window::wxWindow:wxWindow(), Buffer::wxBitmap:wxBitmap(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=BufferT,ref=BufferRef}, Options)
when is_list(Options) ->
?CLASS(WindowT,wxWindow),
@@ -113,7 +113,7 @@ new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=BufferT,ref=BufferRef}, Opt
<<WindowRef:32/?UI,BufferRef:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxBufferedPaintDC()) -> ok.
+-spec destroy(This::wxBufferedPaintDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxBufferedPaintDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxButton.erl b/lib/wx/src/gen/wxButton.erl
index c94303bbea..65d45caa13 100644
--- a/lib/wx/src/gen/wxButton.erl
+++ b/lib/wx/src/gen/wxButton.erl
@@ -97,11 +97,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbutton.html#wxbuttonwxbutton">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxButton() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {label, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'label', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,11 +126,11 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbutton.html#wxbuttoncreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {label, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'label', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxButton),
@@ -152,7 +152,7 @@ getDefaultSize() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbutton.html#wxbuttonsetdefault">external documentation</a>.
--spec setDefault(This) -> ok when
+-spec setDefault(This) -> 'ok' when
This::wxButton().
setDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxButton),
@@ -160,7 +160,7 @@ setDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxbutton.html#wxbuttonsetlabel">external documentation</a>.
--spec setLabel(This, Label) -> ok when
+-spec setLabel(This, Label) -> 'ok' when
This::wxButton(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
@@ -170,7 +170,7 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
<<ThisRef:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxButton()) -> ok.
+-spec destroy(This::wxButton()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCalendarCtrl.erl b/lib/wx/src/gen/wxCalendarCtrl.erl
index 1d4baeed08..93fcb61464 100644
--- a/lib/wx/src/gen/wxCalendarCtrl.erl
+++ b/lib/wx/src/gen/wxCalendarCtrl.erl
@@ -103,10 +103,10 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlwxcalendarctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxCalendarCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {date, wx:wx_datetime()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'date', wx:wx_datetime()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -130,10 +130,10 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxCalendarCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {date, wx:wx_datetime()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'date', wx:wx_datetime()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -165,7 +165,7 @@ getDate(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv enableYearChange(This, [])
--spec enableYearChange(This) -> ok when
+-spec enableYearChange(This) -> 'ok' when
This::wxCalendarCtrl().
enableYearChange(This)
@@ -173,9 +173,9 @@ enableYearChange(This)
enableYearChange(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlenableyearchange">external documentation</a>.
--spec enableYearChange(This, [Option]) -> ok when
+-spec enableYearChange(This, [Option]) -> 'ok' when
This::wxCalendarCtrl(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableYearChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -186,7 +186,7 @@ enableYearChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv enableMonthChange(This, [])
--spec enableMonthChange(This) -> ok when
+-spec enableMonthChange(This) -> 'ok' when
This::wxCalendarCtrl().
enableMonthChange(This)
@@ -194,9 +194,9 @@ enableMonthChange(This)
enableMonthChange(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlenablemonthchange">external documentation</a>.
--spec enableMonthChange(This, [Option]) -> ok when
+-spec enableMonthChange(This, [Option]) -> 'ok' when
This::wxCalendarCtrl(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableMonthChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -207,7 +207,7 @@ enableMonthChange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv enableHolidayDisplay(This, [])
--spec enableHolidayDisplay(This) -> ok when
+-spec enableHolidayDisplay(This) -> 'ok' when
This::wxCalendarCtrl().
enableHolidayDisplay(This)
@@ -215,9 +215,9 @@ enableHolidayDisplay(This)
enableHolidayDisplay(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlenableholidaydisplay">external documentation</a>.
--spec enableHolidayDisplay(This, [Option]) -> ok when
+-spec enableHolidayDisplay(This, [Option]) -> 'ok' when
This::wxCalendarCtrl(),
- Option :: {display, boolean()}.
+ Option :: {'display', boolean()}.
enableHolidayDisplay(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCalendarCtrl),
@@ -228,7 +228,7 @@ enableHolidayDisplay(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlsetheadercolours">external documentation</a>.
--spec setHeaderColours(This, ColFg, ColBg) -> ok when
+-spec setHeaderColours(This, ColFg, ColBg) -> 'ok' when
This::wxCalendarCtrl(), ColFg::wx:wx_colour(), ColBg::wx:wx_colour().
setHeaderColours(#wx_ref{type=ThisT,ref=ThisRef},ColFg,ColBg)
when tuple_size(ColFg) =:= 3; tuple_size(ColFg) =:= 4,tuple_size(ColBg) =:= 3; tuple_size(ColBg) =:= 4 ->
@@ -253,7 +253,7 @@ getHeaderColourBg(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlsethighlightcolours">external documentation</a>.
--spec setHighlightColours(This, ColFg, ColBg) -> ok when
+-spec setHighlightColours(This, ColFg, ColBg) -> 'ok' when
This::wxCalendarCtrl(), ColFg::wx:wx_colour(), ColBg::wx:wx_colour().
setHighlightColours(#wx_ref{type=ThisT,ref=ThisRef},ColFg,ColBg)
when tuple_size(ColFg) =:= 3; tuple_size(ColFg) =:= 4,tuple_size(ColBg) =:= 3; tuple_size(ColBg) =:= 4 ->
@@ -278,7 +278,7 @@ getHighlightColourBg(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlsetholidaycolours">external documentation</a>.
--spec setHolidayColours(This, ColFg, ColBg) -> ok when
+-spec setHolidayColours(This, ColFg, ColBg) -> 'ok' when
This::wxCalendarCtrl(), ColFg::wx:wx_colour(), ColBg::wx:wx_colour().
setHolidayColours(#wx_ref{type=ThisT,ref=ThisRef},ColFg,ColBg)
when tuple_size(ColFg) =:= 3; tuple_size(ColFg) =:= 4,tuple_size(ColBg) =:= 3; tuple_size(ColBg) =:= 4 ->
@@ -312,7 +312,7 @@ getAttr(#wx_ref{type=ThisT,ref=ThisRef},Day)
<<ThisRef:32/?UI,Day:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlsetattr">external documentation</a>.
--spec setAttr(This, Day, Attr) -> ok when
+-spec setAttr(This, Day, Attr) -> 'ok' when
This::wxCalendarCtrl(), Day::integer(), Attr::wxCalendarDateAttr:wxCalendarDateAttr().
setAttr(#wx_ref{type=ThisT,ref=ThisRef},Day,#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(Day) ->
@@ -322,7 +322,7 @@ setAttr(#wx_ref{type=ThisT,ref=ThisRef},Day,#wx_ref{type=AttrT,ref=AttrRef})
<<ThisRef:32/?UI,Day:32/?UI,AttrRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlsetholiday">external documentation</a>.
--spec setHoliday(This, Day) -> ok when
+-spec setHoliday(This, Day) -> 'ok' when
This::wxCalendarCtrl(), Day::integer().
setHoliday(#wx_ref{type=ThisT,ref=ThisRef},Day)
when is_integer(Day) ->
@@ -331,7 +331,7 @@ setHoliday(#wx_ref{type=ThisT,ref=ThisRef},Day)
<<ThisRef:32/?UI,Day:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendarctrl.html#wxcalendarctrlresetattr">external documentation</a>.
--spec resetAttr(This, Day) -> ok when
+-spec resetAttr(This, Day) -> 'ok' when
This::wxCalendarCtrl(), Day::integer().
resetAttr(#wx_ref{type=ThisT,ref=ThisRef},Day)
when is_integer(Day) ->
@@ -352,7 +352,7 @@ hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxCalendarCtrl()) -> ok.
+-spec destroy(This::wxCalendarCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCalendarCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCalendarDateAttr.erl b/lib/wx/src/gen/wxCalendarDateAttr.erl
index 175b03cfdd..cb670fd273 100644
--- a/lib/wx/src/gen/wxCalendarDateAttr.erl
+++ b/lib/wx/src/gen/wxCalendarDateAttr.erl
@@ -67,21 +67,21 @@ new(ColText)
%% <br /> Also:<br />
%% new(ColText, [Option]) -> wxCalendarDateAttr() when<br />
%% ColText::wx:wx_colour(),<br />
-%% Option :: {colBack, wx:wx_colour()}<br />
-%% | {colBorder, wx:wx_colour()}<br />
-%% | {font, wxFont:wxFont()}<br />
-%% | {border, wx:wx_enum()}.<br />
+%% Option :: {'colBack', wx:wx_colour()}<br />
+%% | {'colBorder', wx:wx_colour()}<br />
+%% | {'font', wxFont:wxFont()}<br />
+%% | {'border', wx:wx_enum()}.<br />
%%
%%<br /> Border = ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
-spec new(Border, [Option]) -> wxCalendarDateAttr() when
Border::wx:wx_enum(),
- Option :: {colBorder, wx:wx_colour()};
+ Option :: {'colBorder', wx:wx_colour()};
(ColText, [Option]) -> wxCalendarDateAttr() when
ColText::wx:wx_colour(),
- Option :: {colBack, wx:wx_colour()}
- | {colBorder, wx:wx_colour()}
- | {font, wxFont:wxFont()}
- | {border, wx:wx_enum()}.
+ Option :: {'colBack', wx:wx_colour()}
+ | {'colBorder', wx:wx_colour()}
+ | {'font', wxFont:wxFont()}
+ | {'border', wx:wx_enum()}.
new(Border, Options)
when is_integer(Border),is_list(Options) ->
MOpts = fun({colBorder, ColBorder}, Acc) -> [<<1:32/?UI,(wxe_util:colour_bin(ColBorder)):16/binary,0:32>>|Acc];
@@ -101,7 +101,7 @@ new(ColText, Options)
<<(wxe_util:colour_bin(ColText)):16/binary, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendardateattr.html#wxcalendardateattrsettextcolour">external documentation</a>.
--spec setTextColour(This, ColText) -> ok when
+-spec setTextColour(This, ColText) -> 'ok' when
This::wxCalendarDateAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
@@ -110,7 +110,7 @@ setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendardateattr.html#wxcalendardateattrsetbackgroundcolour">external documentation</a>.
--spec setBackgroundColour(This, ColBack) -> ok when
+-spec setBackgroundColour(This, ColBack) -> 'ok' when
This::wxCalendarDateAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
@@ -119,7 +119,7 @@ setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendardateattr.html#wxcalendardateattrsetbordercolour">external documentation</a>.
--spec setBorderColour(This, Col) -> ok when
+-spec setBorderColour(This, Col) -> 'ok' when
This::wxCalendarDateAttr(), Col::wx:wx_colour().
setBorderColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -128,7 +128,7 @@ setBorderColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendardateattr.html#wxcalendardateattrsetfont">external documentation</a>.
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxCalendarDateAttr(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxCalendarDateAttr),
@@ -138,7 +138,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendardateattr.html#wxcalendardateattrsetborder">external documentation</a>.
%%<br /> Border = ?wxCAL_BORDER_NONE | ?wxCAL_BORDER_SQUARE | ?wxCAL_BORDER_ROUND
--spec setBorder(This, Border) -> ok when
+-spec setBorder(This, Border) -> 'ok' when
This::wxCalendarDateAttr(), Border::wx:wx_enum().
setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
when is_integer(Border) ->
@@ -147,7 +147,7 @@ setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
<<ThisRef:32/?UI,Border:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcalendardateattr.html#wxcalendardateattrsetholiday">external documentation</a>.
--spec setHoliday(This, Holiday) -> ok when
+-spec setHoliday(This, Holiday) -> 'ok' when
This::wxCalendarDateAttr(), Holiday::boolean().
setHoliday(#wx_ref{type=ThisT,ref=ThisRef},Holiday)
when is_boolean(Holiday) ->
@@ -245,7 +245,7 @@ getBorder(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxCalendarDateAttr()) -> ok.
+-spec destroy(This::wxCalendarDateAttr()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCalendarDateAttr),
wxe_util:destroy(?wxCalendarDateAttr_destroy,Obj),
diff --git a/lib/wx/src/gen/wxCaret.erl b/lib/wx/src/gen/wxCaret.erl
index 9da832aa67..8833a920d5 100644
--- a/lib/wx/src/gen/wxCaret.erl
+++ b/lib/wx/src/gen/wxCaret.erl
@@ -106,7 +106,7 @@ getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcarethide">external documentation</a>.
--spec hide(This) -> ok when
+-spec hide(This) -> 'ok' when
This::wxCaret().
hide(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxCaret),
@@ -130,7 +130,7 @@ isVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcaretmove">external documentation</a>.
--spec move(This, Pt) -> ok when
+-spec move(This, Pt) -> 'ok' when
This::wxCaret(), Pt::{X::integer(), Y::integer()}.
move(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -139,7 +139,7 @@ move(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcaretmove">external documentation</a>.
--spec move(This, X, Y) -> ok when
+-spec move(This, X, Y) -> 'ok' when
This::wxCaret(), X::integer(), Y::integer().
move(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -148,7 +148,7 @@ move(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcaretsetblinktime">external documentation</a>.
--spec setBlinkTime(Milliseconds) -> ok when
+-spec setBlinkTime(Milliseconds) -> 'ok' when
Milliseconds::integer().
setBlinkTime(Milliseconds)
when is_integer(Milliseconds) ->
@@ -156,7 +156,7 @@ setBlinkTime(Milliseconds)
<<Milliseconds:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcaretsetsize">external documentation</a>.
--spec setSize(This, Size) -> ok when
+-spec setSize(This, Size) -> 'ok' when
This::wxCaret(), Size::{W::integer(), H::integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -165,7 +165,7 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcaretsetsize">external documentation</a>.
--spec setSize(This, Width, Height) -> ok when
+-spec setSize(This, Width, Height) -> 'ok' when
This::wxCaret(), Width::integer(), Height::integer().
setSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -174,7 +174,7 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @equiv show(This, [])
--spec show(This) -> ok when
+-spec show(This) -> 'ok' when
This::wxCaret().
show(This)
@@ -182,9 +182,9 @@ show(This)
show(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcaret.html#wxcaretshow">external documentation</a>.
--spec show(This, [Option]) -> ok when
+-spec show(This, [Option]) -> 'ok' when
This::wxCaret(),
- Option :: {show, boolean()}.
+ Option :: {'show', boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCaret),
@@ -195,7 +195,7 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxCaret()) -> ok.
+-spec destroy(This::wxCaret()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCaret),
wxe_util:destroy(?wxCaret_destruct,Obj),
diff --git a/lib/wx/src/gen/wxCheckBox.erl b/lib/wx/src/gen/wxCheckBox.erl
index 2cea4d04b4..3276add802 100644
--- a/lib/wx/src/gen/wxCheckBox.erl
+++ b/lib/wx/src/gen/wxCheckBox.erl
@@ -98,10 +98,10 @@ new(Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcheckbox.html#wxcheckboxwxcheckbox">external documentation</a>.
-spec new(Parent, Id, Label, [Option]) -> wxCheckBox() when
Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,10 +126,10 @@ create(This,Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcheckbox.html#wxcheckboxcreate">external documentation</a>.
-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
This::wxCheckBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxCheckBox),
@@ -186,7 +186,7 @@ isChecked(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcheckbox.html#wxcheckboxsetvalue">external documentation</a>.
--spec setValue(This, State) -> ok when
+-spec setValue(This, State) -> 'ok' when
This::wxCheckBox(), State::boolean().
setValue(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_boolean(State) ->
@@ -196,7 +196,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},State)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcheckbox.html#wxcheckboxset3statevalue">external documentation</a>.
%%<br /> State = ?wxCHK_UNCHECKED | ?wxCHK_CHECKED | ?wxCHK_UNDETERMINED
--spec set3StateValue(This, State) -> ok when
+-spec set3StateValue(This, State) -> 'ok' when
This::wxCheckBox(), State::wx:wx_enum().
set3StateValue(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_integer(State) ->
@@ -205,7 +205,7 @@ set3StateValue(#wx_ref{type=ThisT,ref=ThisRef},State)
<<ThisRef:32/?UI,State:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxCheckBox()) -> ok.
+-spec destroy(This::wxCheckBox()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCheckBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCheckListBox.erl b/lib/wx/src/gen/wxCheckListBox.erl
index f6013e4863..888f29518c 100644
--- a/lib/wx/src/gen/wxCheckListBox.erl
+++ b/lib/wx/src/gen/wxCheckListBox.erl
@@ -105,11 +105,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchecklistbox.html#wxchecklistboxwxchecklistbox">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxCheckListBox() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {choices, [unicode:chardata()]}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'choices', [unicode:chardata()]}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,7 +124,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
%% @equiv check(This,Index, [])
--spec check(This, Index) -> ok when
+-spec check(This, Index) -> 'ok' when
This::wxCheckListBox(), Index::integer().
check(This,Index)
@@ -132,9 +132,9 @@ check(This,Index)
check(This,Index, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchecklistbox.html#wxchecklistboxcheck">external documentation</a>.
--spec check(This, Index, [Option]) -> ok when
+-spec check(This, Index, [Option]) -> 'ok' when
This::wxCheckListBox(), Index::integer(),
- Option :: {check, boolean()}.
+ Option :: {'check', boolean()}.
check(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
when is_integer(Index),is_list(Options) ->
?CLASS(ThisT,wxCheckListBox),
@@ -154,7 +154,7 @@ isChecked(#wx_ref{type=ThisT,ref=ThisRef},Index)
<<ThisRef:32/?UI,Index:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxCheckListBox()) -> ok.
+-spec destroy(This::wxCheckListBox()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCheckListBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxChoice.erl b/lib/wx/src/gen/wxChoice.erl
index 73867d6597..1a90b275d1 100644
--- a/lib/wx/src/gen/wxChoice.erl
+++ b/lib/wx/src/gen/wxChoice.erl
@@ -103,11 +103,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoice.html#wxchoicewxchoice">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxChoice() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {choices, [unicode:chardata()]}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'choices', [unicode:chardata()]}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -132,8 +132,8 @@ create(This,Parent,Id,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoice.html#wxchoicecreate">external documentation</a>.
-spec create(This, Parent, Id, Pos, Size, Choices, [Option]) -> boolean() when
This::wxChoice(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[unicode:chardata()],
- Option :: {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxChoice),
@@ -148,7 +148,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{P
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoice.html#wxchoicedelete">external documentation</a>.
--spec delete(This, N) -> ok when
+-spec delete(This, N) -> 'ok' when
This::wxChoice(), N::integer().
delete(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -165,7 +165,7 @@ getColumns(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv setColumns(This, [])
--spec setColumns(This) -> ok when
+-spec setColumns(This) -> 'ok' when
This::wxChoice().
setColumns(This)
@@ -173,9 +173,9 @@ setColumns(This)
setColumns(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoice.html#wxchoicesetcolumns">external documentation</a>.
--spec setColumns(This, [Option]) -> ok when
+-spec setColumns(This, [Option]) -> 'ok' when
This::wxChoice(),
- Option :: {n, integer()}.
+ Option :: {'n', integer()}.
setColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxChoice),
@@ -186,7 +186,7 @@ setColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxChoice()) -> ok.
+-spec destroy(This::wxChoice()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxChoice),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxChoicebook.erl b/lib/wx/src/gen/wxChoicebook.erl
index 37a44a813a..34b62ff75b 100644
--- a/lib/wx/src/gen/wxChoicebook.erl
+++ b/lib/wx/src/gen/wxChoicebook.erl
@@ -101,9 +101,9 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebookwxchoicebook">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxChoicebook() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,8 +126,8 @@ addPage(This,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebookaddpage">external documentation</a>.
-spec addPage(This, Page, Text, [Option]) -> boolean() when
This::wxChoicebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -141,7 +141,7 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
<<ThisRef:32/?UI,PageRef: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>>).
%% @equiv advanceSelection(This, [])
--spec advanceSelection(This) -> ok when
+-spec advanceSelection(This) -> 'ok' when
This::wxChoicebook().
advanceSelection(This)
@@ -149,9 +149,9 @@ advanceSelection(This)
advanceSelection(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebookadvanceselection">external documentation</a>.
--spec advanceSelection(This, [Option]) -> ok when
+-spec advanceSelection(This, [Option]) -> 'ok' when
This::wxChoicebook(),
- Option :: {forward, boolean()}.
+ Option :: {'forward', boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -162,7 +162,7 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebookassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList) -> ok when
+-spec assignImageList(This, ImageList) -> 'ok' when
This::wxChoicebook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxChoicebook),
@@ -181,9 +181,9 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebookcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxChoicebook(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -302,8 +302,8 @@ insertPage(This,N,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebookinsertpage">external documentation</a>.
-spec insertPage(This, N, Page, Text, [Option]) -> boolean() when
This::wxChoicebook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(N),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxChoicebook),
@@ -317,7 +317,7 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Tex
<<ThisRef:32/?UI,N:32/?UI,PageRef: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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebooksetimagelist">external documentation</a>.
--spec setImageList(This, ImageList) -> ok when
+-spec setImageList(This, ImageList) -> 'ok' when
This::wxChoicebook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxChoicebook),
@@ -326,7 +326,7 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxchoicebook.html#wxchoicebooksetpagesize">external documentation</a>.
--spec setPageSize(This, Size) -> ok when
+-spec setPageSize(This, Size) -> 'ok' when
This::wxChoicebook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -372,7 +372,7 @@ changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxChoicebook()) -> ok.
+-spec destroy(This::wxChoicebook()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxChoicebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxClientDC.erl b/lib/wx/src/gen/wxClientDC.erl
index 3e9bcd33dd..4965536690 100644
--- a/lib/wx/src/gen/wxClientDC.erl
+++ b/lib/wx/src/gen/wxClientDC.erl
@@ -80,7 +80,7 @@ new(#wx_ref{type=WinT,ref=WinRef}) ->
<<WinRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxClientDC()) -> ok.
+-spec destroy(This::wxClientDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxClientDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxClipboard.erl b/lib/wx/src/gen/wxClipboard.erl
index cbf9e63067..747e4f1610 100644
--- a/lib/wx/src/gen/wxClipboard.erl
+++ b/lib/wx/src/gen/wxClipboard.erl
@@ -52,7 +52,7 @@ addData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
<<ThisRef:32/?UI,DataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxclipboard.html#wxclipboardclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxClipboard().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
@@ -60,7 +60,7 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxclipboard.html#wxclipboardclose">external documentation</a>.
--spec close(This) -> ok when
+-spec close(This) -> 'ok' when
This::wxClipboard().
close(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxClipboard),
@@ -110,7 +110,7 @@ setData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
<<ThisRef:32/?UI,DataRef:32/?UI>>).
%% @equiv usePrimarySelection(This, [])
--spec usePrimarySelection(This) -> ok when
+-spec usePrimarySelection(This) -> 'ok' when
This::wxClipboard().
usePrimarySelection(This)
@@ -118,9 +118,9 @@ usePrimarySelection(This)
usePrimarySelection(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxclipboard.html#wxclipboarduseprimaryselection">external documentation</a>.
--spec usePrimarySelection(This, [Option]) -> ok when
+-spec usePrimarySelection(This, [Option]) -> 'ok' when
This::wxClipboard(),
- Option :: {primary, boolean()}.
+ Option :: {'primary', boolean()}.
usePrimarySelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxClipboard),
@@ -147,7 +147,7 @@ get() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxClipboard()) -> ok.
+-spec destroy(This::wxClipboard()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxClipboard),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCloseEvent.erl b/lib/wx/src/gen/wxCloseEvent.erl
index b02a578b9e..6a683c6e8c 100644
--- a/lib/wx/src/gen/wxCloseEvent.erl
+++ b/lib/wx/src/gen/wxCloseEvent.erl
@@ -61,7 +61,7 @@ getLoggingOff(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcloseevent.html#wxcloseeventsetcanveto">external documentation</a>.
--spec setCanVeto(This, CanVeto) -> ok when
+-spec setCanVeto(This, CanVeto) -> 'ok' when
This::wxCloseEvent(), CanVeto::boolean().
setCanVeto(#wx_ref{type=ThisT,ref=ThisRef},CanVeto)
when is_boolean(CanVeto) ->
@@ -70,7 +70,7 @@ setCanVeto(#wx_ref{type=ThisT,ref=ThisRef},CanVeto)
<<ThisRef:32/?UI,(wxe_util:from_bool(CanVeto)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcloseevent.html#wxcloseeventsetloggingoff">external documentation</a>.
--spec setLoggingOff(This, LogOff) -> ok when
+-spec setLoggingOff(This, LogOff) -> 'ok' when
This::wxCloseEvent(), LogOff::boolean().
setLoggingOff(#wx_ref{type=ThisT,ref=ThisRef},LogOff)
when is_boolean(LogOff) ->
@@ -79,7 +79,7 @@ setLoggingOff(#wx_ref{type=ThisT,ref=ThisRef},LogOff)
<<ThisRef:32/?UI,(wxe_util:from_bool(LogOff)):32/?UI>>).
%% @equiv veto(This, [])
--spec veto(This) -> ok when
+-spec veto(This) -> 'ok' when
This::wxCloseEvent().
veto(This)
@@ -87,9 +87,9 @@ veto(This)
veto(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcloseevent.html#wxcloseeventveto">external documentation</a>.
--spec veto(This, [Option]) -> ok when
+-spec veto(This, [Option]) -> 'ok' when
This::wxCloseEvent(),
- Option :: {veto, boolean()}.
+ Option :: {'veto', boolean()}.
veto(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxCloseEvent),
diff --git a/lib/wx/src/gen/wxColourData.erl b/lib/wx/src/gen/wxColourData.erl
index 7379592298..92586688f6 100644
--- a/lib/wx/src/gen/wxColourData.erl
+++ b/lib/wx/src/gen/wxColourData.erl
@@ -76,7 +76,7 @@ getCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I)
<<ThisRef:32/?UI,I:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatasetchoosefull">external documentation</a>.
--spec setChooseFull(This, Flag) -> ok when
+-spec setChooseFull(This, Flag) -> 'ok' when
This::wxColourData(), Flag::boolean().
setChooseFull(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -85,7 +85,7 @@ setChooseFull(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatasetcolour">external documentation</a>.
--spec setColour(This, Colour) -> ok when
+-spec setColour(This, Colour) -> 'ok' when
This::wxColourData(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -94,7 +94,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatasetcustomcolour">external documentation</a>.
--spec setCustomColour(This, I, Colour) -> ok when
+-spec setCustomColour(This, I, Colour) -> 'ok' when
This::wxColourData(), I::integer(), Colour::wx:wx_colour().
setCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I,Colour)
when is_integer(I),tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -103,7 +103,7 @@ setCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I,Colour)
<<ThisRef:32/?UI,I:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxColourData()) -> ok.
+-spec destroy(This::wxColourData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxColourDialog.erl b/lib/wx/src/gen/wxColourDialog.erl
index 15eee30727..9c97434d9a 100644
--- a/lib/wx/src/gen/wxColourDialog.erl
+++ b/lib/wx/src/gen/wxColourDialog.erl
@@ -105,7 +105,7 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdialog.html#wxcolourdialogwxcolourdialog">external documentation</a>.
-spec new(Parent, [Option]) -> wxColourDialog() when
Parent::wxWindow:wxWindow(),
- Option :: {data, wxColourData:wxColourData()}.
+ Option :: {'data', wxColourData:wxColourData()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,7 +126,7 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdialog.html#wxcolourdialogcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxColourDialog(), Parent::wxWindow:wxWindow(),
- Option :: {data, wxColourData:wxColourData()}.
+ Option :: {'data', wxColourData:wxColourData()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxColourDialog),
@@ -146,7 +146,7 @@ getColourData(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxColourDialog()) -> ok.
+-spec destroy(This::wxColourDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxColourPickerCtrl.erl b/lib/wx/src/gen/wxColourPickerCtrl.erl
index 486441c005..9c987b4dde 100644
--- a/lib/wx/src/gen/wxColourPickerCtrl.erl
+++ b/lib/wx/src/gen/wxColourPickerCtrl.erl
@@ -102,11 +102,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourpickerctrl.html#wxcolourpickerctrlwxcolourpickerctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxColourPickerCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {col, wx:wx_colour()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'col', wx:wx_colour()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -131,11 +131,11 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourpickerctrl.html#wxcolourpickerctrlcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {col, wx:wx_colour()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'col', wx:wx_colour()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxColourPickerCtrl),
@@ -160,12 +160,12 @@ getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourpickerctrl.html#wxcolourpickerctrlsetcolour">external documentation</a>.
%% <br /> Also:<br />
-%% setColour(This, Col) -> ok when<br />
+%% setColour(This, Col) -> 'ok' when<br />
%% This::wxColourPickerCtrl(), Col::wx:wx_colour().<br />
%%
-spec setColour(This, Text) -> boolean() when
This::wxColourPickerCtrl(), Text::unicode:chardata();
- (This, Col) -> ok when
+ (This, Col) -> 'ok' when
This::wxColourPickerCtrl(), Col::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -180,7 +180,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxColourPickerCtrl()) -> ok.
+-spec destroy(This::wxColourPickerCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourPickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxComboBox.erl b/lib/wx/src/gen/wxComboBox.erl
index 37d6e71605..bbdf768eba 100644
--- a/lib/wx/src/gen/wxComboBox.erl
+++ b/lib/wx/src/gen/wxComboBox.erl
@@ -105,12 +105,12 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxwxcombobox">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxComboBox() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {value, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {choices, [unicode:chardata()]}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'value', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'choices', [unicode:chardata()]}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -136,8 +136,8 @@ create(This,Parent,Id,Value,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxcreate">external documentation</a>.
-spec create(This, Parent, Id, Value, Pos, Size, Choices, [Option]) -> boolean() when
This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[unicode:chardata()],
- Option :: {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Value,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_list(Value),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxComboBox),
@@ -193,7 +193,7 @@ canUndo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxcopy">external documentation</a>.
--spec copy(This) -> ok when
+-spec copy(This) -> 'ok' when
This::wxComboBox().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
@@ -201,7 +201,7 @@ copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxcut">external documentation</a>.
--spec cut(This) -> ok when
+-spec cut(This) -> 'ok' when
This::wxComboBox().
cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
@@ -233,7 +233,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxpaste">external documentation</a>.
--spec paste(This) -> ok when
+-spec paste(This) -> 'ok' when
This::wxComboBox().
paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
@@ -241,7 +241,7 @@ paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxredo">external documentation</a>.
--spec redo(This) -> ok when
+-spec redo(This) -> 'ok' when
This::wxComboBox().
redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
@@ -249,7 +249,7 @@ redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxreplace">external documentation</a>.
--spec replace(This, From, To, Value) -> ok when
+-spec replace(This, From, To, Value) -> 'ok' when
This::wxComboBox(), From::integer(), To::integer(), Value::unicode:chardata().
replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
when is_integer(From),is_integer(To),is_list(Value) ->
@@ -259,7 +259,7 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxremove">external documentation</a>.
--spec remove(This, From, To) -> ok when
+-spec remove(This, From, To) -> 'ok' when
This::wxComboBox(), From::integer(), To::integer().
remove(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
@@ -268,7 +268,7 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},From,To)
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxsetinsertionpoint">external documentation</a>.
--spec setInsertionPoint(This, Pos) -> ok when
+-spec setInsertionPoint(This, Pos) -> 'ok' when
This::wxComboBox(), Pos::integer().
setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -277,7 +277,7 @@ setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxsetinsertionpointend">external documentation</a>.
--spec setInsertionPointEnd(This) -> ok when
+-spec setInsertionPointEnd(This) -> 'ok' when
This::wxComboBox().
setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
@@ -285,7 +285,7 @@ setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxsetselection">external documentation</a>.
--spec setSelection(This, N) -> ok when
+-spec setSelection(This, N) -> 'ok' when
This::wxComboBox(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -294,7 +294,7 @@ setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxsetselection">external documentation</a>.
--spec setSelection(This, From, To) -> ok when
+-spec setSelection(This, From, To) -> 'ok' when
This::wxComboBox(), From::integer(), To::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
@@ -303,7 +303,7 @@ setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxsetvalue">external documentation</a>.
--spec setValue(This, Value) -> ok when
+-spec setValue(This, Value) -> 'ok' when
This::wxComboBox(), Value::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_list(Value) ->
@@ -313,7 +313,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
<<ThisRef:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcombobox.html#wxcomboboxundo">external documentation</a>.
--spec undo(This) -> ok when
+-spec undo(This) -> 'ok' when
This::wxComboBox().
undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxComboBox),
@@ -321,7 +321,7 @@ undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxComboBox()) -> ok.
+-spec destroy(This::wxComboBox()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxComboBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxCommandEvent.erl b/lib/wx/src/gen/wxCommandEvent.erl
index a36aa3aa95..781482aebb 100644
--- a/lib/wx/src/gen/wxCommandEvent.erl
+++ b/lib/wx/src/gen/wxCommandEvent.erl
@@ -102,7 +102,7 @@ isSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcommandevent.html#wxcommandeventsetint">external documentation</a>.
--spec setInt(This, I) -> ok when
+-spec setInt(This, I) -> 'ok' when
This::wxCommandEvent(), I::integer().
setInt(#wx_ref{type=ThisT,ref=ThisRef},I)
when is_integer(I) ->
@@ -111,7 +111,7 @@ setInt(#wx_ref{type=ThisT,ref=ThisRef},I)
<<ThisRef:32/?UI,I:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcommandevent.html#wxcommandeventsetstring">external documentation</a>.
--spec setString(This, S) -> ok when
+-spec setString(This, S) -> 'ok' when
This::wxCommandEvent(), S::unicode:chardata().
setString(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_list(S) ->
diff --git a/lib/wx/src/gen/wxContextMenuEvent.erl b/lib/wx/src/gen/wxContextMenuEvent.erl
index 94a7a2948d..f1c953badb 100644
--- a/lib/wx/src/gen/wxContextMenuEvent.erl
+++ b/lib/wx/src/gen/wxContextMenuEvent.erl
@@ -57,7 +57,7 @@ getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontextmenuevent.html#wxcontextmenueventsetposition">external documentation</a>.
--spec setPosition(This, Pos) -> ok when
+-spec setPosition(This, Pos) -> 'ok' when
This::wxContextMenuEvent(), Pos::{X::integer(), Y::integer()}.
setPosition(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
diff --git a/lib/wx/src/gen/wxControl.erl b/lib/wx/src/gen/wxControl.erl
index f84ec34b02..a84f88639b 100644
--- a/lib/wx/src/gen/wxControl.erl
+++ b/lib/wx/src/gen/wxControl.erl
@@ -86,7 +86,7 @@ getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrol.html#wxcontrolsetlabel">external documentation</a>.
--spec setLabel(This, Label) -> ok when
+-spec setLabel(This, Label) -> 'ok' when
This::wxControl(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
diff --git a/lib/wx/src/gen/wxControlWithItems.erl b/lib/wx/src/gen/wxControlWithItems.erl
index d52c7917a2..c4d116d9e7 100644
--- a/lib/wx/src/gen/wxControlWithItems.erl
+++ b/lib/wx/src/gen/wxControlWithItems.erl
@@ -104,7 +104,7 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Item,ClientData)
<<ThisRef:32/?UI,(byte_size(Item_UC)):32/?UI,(Item_UC)/binary, 0:(((8- ((0+byte_size(Item_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemsappend">external documentation</a>.
--spec appendStrings(This, Strings) -> ok when
+-spec appendStrings(This, Strings) -> 'ok' when
This::wxControlWithItems(), Strings::[unicode:chardata()].
appendStrings(#wx_ref{type=ThisT,ref=ThisRef},Strings)
when is_list(Strings) ->
@@ -115,7 +115,7 @@ appendStrings(#wx_ref{type=ThisT,ref=ThisRef},Strings)
<<ThisRef:32/?UI,(length(Strings_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Strings_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Strings_UCA])) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemsclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxControlWithItems().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxControlWithItems),
@@ -123,7 +123,7 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemsdelete">external documentation</a>.
--spec delete(This, N) -> ok when
+-spec delete(This, N) -> 'ok' when
This::wxControlWithItems(), N::integer().
delete(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -142,7 +142,7 @@ findString(This,S)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemsfindstring">external documentation</a>.
-spec findString(This, S, [Option]) -> integer() when
This::wxControlWithItems(), S::unicode:chardata(),
- Option :: {bCase, boolean()}.
+ Option :: {'bCase', boolean()}.
findString(#wx_ref{type=ThisT,ref=ThisRef},S, Options)
when is_list(S),is_list(Options) ->
?CLASS(ThisT,wxControlWithItems),
@@ -163,7 +163,7 @@ getClientData(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemssetclientobject">external documentation</a>.
--spec setClientData(This, N, ClientData) -> ok when
+-spec setClientData(This, N, ClientData) -> 'ok' when
This::wxControlWithItems(), N::integer(), ClientData::term().
setClientData(#wx_ref{type=ThisT,ref=ThisRef},N,ClientData)
when is_integer(N) ->
@@ -235,7 +235,7 @@ isEmpty(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemsselect">external documentation</a>.
--spec select(This, N) -> ok when
+-spec select(This, N) -> 'ok' when
This::wxControlWithItems(), N::integer().
select(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -244,7 +244,7 @@ select(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemssetselection">external documentation</a>.
--spec setSelection(This, N) -> ok when
+-spec setSelection(This, N) -> 'ok' when
This::wxControlWithItems(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -253,7 +253,7 @@ setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcontrolwithitems.html#wxcontrolwithitemssetstring">external documentation</a>.
--spec setString(This, N, S) -> ok when
+-spec setString(This, N, S) -> 'ok' when
This::wxControlWithItems(), N::integer(), S::unicode:chardata().
setString(#wx_ref{type=ThisT,ref=ThisRef},N,S)
when is_integer(N),is_list(S) ->
diff --git a/lib/wx/src/gen/wxCursor.erl b/lib/wx/src/gen/wxCursor.erl
index 7f32b140e6..689935576a 100644
--- a/lib/wx/src/gen/wxCursor.erl
+++ b/lib/wx/src/gen/wxCursor.erl
@@ -78,8 +78,8 @@ new(Bits,Width,Height)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcursor.html#wxcursorwxcursor">external documentation</a>.
-spec new(Bits, Width, Height, [Option]) -> wxCursor() when
Bits::binary(), Width::integer(), Height::integer(),
- Option :: {hotSpotX, integer()}
- | {hotSpotY, integer()}.
+ Option :: {'hotSpotX', integer()}
+ | {'hotSpotY', integer()}.
new(Bits,Width,Height, Options)
when is_binary(Bits),is_integer(Width),is_integer(Height),is_list(Options) ->
wxe_util:send_bin(Bits),
@@ -99,7 +99,7 @@ ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxCursor()) -> ok.
+-spec destroy(This::wxCursor()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxCursor),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDC.erl b/lib/wx/src/gen/wxDC.erl
index 263ad76526..ad7a4251ec 100644
--- a/lib/wx/src/gen/wxDC.erl
+++ b/lib/wx/src/gen/wxDC.erl
@@ -69,9 +69,9 @@ blit(This,DestPt={DestPtX,DestPtY},Sz={SzW,SzH},Source,SrcPt={SrcPtX,SrcPtY})
%%<br /> Rop = integer
-spec blit(This, DestPt, Sz, Source, SrcPt, [Option]) -> boolean() when
This::wxDC(), DestPt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Source::wxDC(), SrcPt::{X::integer(), Y::integer()},
- Option :: {rop, wx:wx_enum()}
- | {useMask, boolean()}
- | {srcPtMask, {X::integer(), Y::integer()}}.
+ Option :: {'rop', wx:wx_enum()}
+ | {'useMask', boolean()}
+ | {'srcPtMask', {X::integer(), Y::integer()}}.
blit(#wx_ref{type=ThisT,ref=ThisRef},{DestPtX,DestPtY},{SzW,SzH},#wx_ref{type=SourceT,ref=SourceRef},{SrcPtX,SrcPtY}, Options)
when is_integer(DestPtX),is_integer(DestPtY),is_integer(SzW),is_integer(SzH),is_integer(SrcPtX),is_integer(SrcPtY),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -85,7 +85,7 @@ blit(#wx_ref{type=ThisT,ref=ThisRef},{DestPtX,DestPtY},{SzW,SzH},#wx_ref{type=So
<<ThisRef:32/?UI,DestPtX:32/?UI,DestPtY:32/?UI,SzW:32/?UI,SzH:32/?UI,SourceRef:32/?UI,SrcPtX:32/?UI,SrcPtY:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdccalcboundingbox">external documentation</a>.
--spec calcBoundingBox(This, X, Y) -> ok when
+-spec calcBoundingBox(This, X, Y) -> 'ok' when
This::wxDC(), X::integer(), Y::integer().
calcBoundingBox(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -94,7 +94,7 @@ calcBoundingBox(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxDC().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
@@ -102,7 +102,7 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdccomputescaleandorigin">external documentation</a>.
--spec computeScaleAndOrigin(This) -> ok when
+-spec computeScaleAndOrigin(This) -> 'ok' when
This::wxDC().
computeScaleAndOrigin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
@@ -110,7 +110,7 @@ computeScaleAndOrigin(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdccrosshair">external documentation</a>.
--spec crossHair(This, Pt) -> ok when
+-spec crossHair(This, Pt) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}.
crossHair(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -119,7 +119,7 @@ crossHair(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdestroyclippingregion">external documentation</a>.
--spec destroyClippingRegion(This) -> ok when
+-spec destroyClippingRegion(This) -> 'ok' when
This::wxDC().
destroyClippingRegion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
@@ -163,7 +163,7 @@ deviceToLogicalYRel(#wx_ref{type=ThisT,ref=ThisRef},Y)
<<ThisRef:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawarc">external documentation</a>.
--spec drawArc(This, Pt1, Pt2, Centre) -> ok when
+-spec drawArc(This, Pt1, Pt2, Centre) -> 'ok' when
This::wxDC(), Pt1::{X::integer(), Y::integer()}, Pt2::{X::integer(), Y::integer()}, Centre::{X::integer(), Y::integer()}.
drawArc(#wx_ref{type=ThisT,ref=ThisRef},{Pt1X,Pt1Y},{Pt2X,Pt2Y},{CentreX,CentreY})
when is_integer(Pt1X),is_integer(Pt1Y),is_integer(Pt2X),is_integer(Pt2Y),is_integer(CentreX),is_integer(CentreY) ->
@@ -172,7 +172,7 @@ drawArc(#wx_ref{type=ThisT,ref=ThisRef},{Pt1X,Pt1Y},{Pt2X,Pt2Y},{CentreX,CentreY
<<ThisRef:32/?UI,Pt1X:32/?UI,Pt1Y:32/?UI,Pt2X:32/?UI,Pt2Y:32/?UI,CentreX:32/?UI,CentreY:32/?UI>>).
%% @equiv drawBitmap(This,Bmp,Pt, [])
--spec drawBitmap(This, Bmp, Pt) -> ok when
+-spec drawBitmap(This, Bmp, Pt) -> 'ok' when
This::wxDC(), Bmp::wxBitmap:wxBitmap(), Pt::{X::integer(), Y::integer()}.
drawBitmap(This,Bmp,Pt={PtX,PtY})
@@ -180,9 +180,9 @@ drawBitmap(This,Bmp,Pt={PtX,PtY})
drawBitmap(This,Bmp,Pt, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawbitmap">external documentation</a>.
--spec drawBitmap(This, Bmp, Pt, [Option]) -> ok when
+-spec drawBitmap(This, Bmp, Pt, [Option]) -> 'ok' when
This::wxDC(), Bmp::wxBitmap:wxBitmap(), Pt::{X::integer(), Y::integer()},
- Option :: {useMask, boolean()}.
+ Option :: {'useMask', boolean()}.
drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},{PtX,PtY}, Options)
when is_integer(PtX),is_integer(PtY),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -194,7 +194,7 @@ drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},{PtX,Pt
<<ThisRef:32/?UI,BmpRef:32/?UI,PtX:32/?UI,PtY:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawcheckmark">external documentation</a>.
--spec drawCheckMark(This, Rect) -> ok when
+-spec drawCheckMark(This, Rect) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawCheckMark(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
@@ -203,7 +203,7 @@ drawCheckMark(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawcircle">external documentation</a>.
--spec drawCircle(This, Pt, Radius) -> ok when
+-spec drawCircle(This, Pt, Radius) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Radius::integer().
drawCircle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Radius)
when is_integer(PtX),is_integer(PtY),is_integer(Radius) ->
@@ -212,7 +212,7 @@ drawCircle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Radius)
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,Radius:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawellipse">external documentation</a>.
--spec drawEllipse(This, Rect) -> ok when
+-spec drawEllipse(This, Rect) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
@@ -221,7 +221,7 @@ drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawellipse">external documentation</a>.
--spec drawEllipse(This, Pt, Sz) -> ok when
+-spec drawEllipse(This, Pt, Sz) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}.
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH) ->
@@ -230,7 +230,7 @@ drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawellipticarc">external documentation</a>.
--spec drawEllipticArc(This, Pt, Sz, Sa, Ea) -> ok when
+-spec drawEllipticArc(This, Pt, Sz, Sa, Ea) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Sa::number(), Ea::number().
drawEllipticArc(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH},Sa,Ea)
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH),is_number(Sa),is_number(Ea) ->
@@ -239,7 +239,7 @@ drawEllipticArc(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH},Sa,Ea)
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI,0:32,Sa:64/?F,Ea:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawicon">external documentation</a>.
--spec drawIcon(This, Icon, Pt) -> ok when
+-spec drawIcon(This, Icon, Pt) -> 'ok' when
This::wxDC(), Icon::wxIcon:wxIcon(), Pt::{X::integer(), Y::integer()}.
drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -249,7 +249,7 @@ drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},{PtX,Pt
<<ThisRef:32/?UI,IconRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @equiv drawLabel(This,Text,Rect, [])
--spec drawLabel(This, Text, Rect) -> ok when
+-spec drawLabel(This, Text, Rect) -> 'ok' when
This::wxDC(), Text::unicode:chardata(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawLabel(This,Text,Rect={RectX,RectY,RectW,RectH})
@@ -257,10 +257,10 @@ drawLabel(This,Text,Rect={RectX,RectY,RectW,RectH})
drawLabel(This,Text,Rect, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawlabel">external documentation</a>.
--spec drawLabel(This, Text, Rect, [Option]) -> ok when
+-spec drawLabel(This, Text, Rect, [Option]) -> 'ok' when
This::wxDC(), Text::unicode:chardata(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
- Option :: {alignment, integer()}
- | {indexAccel, integer()}.
+ Option :: {'alignment', integer()}
+ | {'indexAccel', integer()}.
drawLabel(#wx_ref{type=ThisT,ref=ThisRef},Text,{RectX,RectY,RectW,RectH}, Options)
when is_list(Text),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -273,7 +273,7 @@ drawLabel(#wx_ref{type=ThisT,ref=ThisRef},Text,{RectX,RectY,RectW,RectH}, Option
<<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,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawline">external documentation</a>.
--spec drawLine(This, Pt1, Pt2) -> ok when
+-spec drawLine(This, Pt1, Pt2) -> 'ok' when
This::wxDC(), Pt1::{X::integer(), Y::integer()}, Pt2::{X::integer(), Y::integer()}.
drawLine(#wx_ref{type=ThisT,ref=ThisRef},{Pt1X,Pt1Y},{Pt2X,Pt2Y})
when is_integer(Pt1X),is_integer(Pt1Y),is_integer(Pt2X),is_integer(Pt2Y) ->
@@ -282,7 +282,7 @@ drawLine(#wx_ref{type=ThisT,ref=ThisRef},{Pt1X,Pt1Y},{Pt2X,Pt2Y})
<<ThisRef:32/?UI,Pt1X:32/?UI,Pt1Y:32/?UI,Pt2X:32/?UI,Pt2Y:32/?UI>>).
%% @equiv drawLines(This,Points, [])
--spec drawLines(This, Points) -> ok when
+-spec drawLines(This, Points) -> 'ok' when
This::wxDC(), Points::[{X::integer(), Y::integer()}].
drawLines(This,Points)
@@ -290,10 +290,10 @@ drawLines(This,Points)
drawLines(This,Points, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawlines">external documentation</a>.
--spec drawLines(This, Points, [Option]) -> ok when
+-spec drawLines(This, Points, [Option]) -> 'ok' when
This::wxDC(), Points::[{X::integer(), Y::integer()}],
- Option :: {xoffset, integer()}
- | {yoffset, integer()}.
+ Option :: {'xoffset', integer()}
+ | {'yoffset', integer()}.
drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -306,7 +306,7 @@ drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
(<< <<X:32/?I,Y:32/?I>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
%% @equiv drawPolygon(This,Points, [])
--spec drawPolygon(This, Points) -> ok when
+-spec drawPolygon(This, Points) -> 'ok' when
This::wxDC(), Points::[{X::integer(), Y::integer()}].
drawPolygon(This,Points)
@@ -315,11 +315,11 @@ drawPolygon(This,Points)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawpolygon">external documentation</a>.
%%<br /> FillStyle = integer
--spec drawPolygon(This, Points, [Option]) -> ok when
+-spec drawPolygon(This, Points, [Option]) -> 'ok' when
This::wxDC(), Points::[{X::integer(), Y::integer()}],
- Option :: {xoffset, integer()}
- | {yoffset, integer()}
- | {fillStyle, wx:wx_enum()}.
+ Option :: {'xoffset', integer()}
+ | {'yoffset', integer()}
+ | {'fillStyle', wx:wx_enum()}.
drawPolygon(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -333,7 +333,7 @@ drawPolygon(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
(<< <<X:32/?I,Y:32/?I>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawpoint">external documentation</a>.
--spec drawPoint(This, Pt) -> ok when
+-spec drawPoint(This, Pt) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}.
drawPoint(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -342,7 +342,7 @@ drawPoint(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawrectangle">external documentation</a>.
--spec drawRectangle(This, Rect) -> ok when
+-spec drawRectangle(This, Rect) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
@@ -351,7 +351,7 @@ drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawrectangle">external documentation</a>.
--spec drawRectangle(This, Pt, Sz) -> ok when
+-spec drawRectangle(This, Pt, Sz) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}.
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH) ->
@@ -360,7 +360,7 @@ drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawrotatedtext">external documentation</a>.
--spec drawRotatedText(This, Text, Pt, Angle) -> ok when
+-spec drawRotatedText(This, Text, Pt, Angle) -> 'ok' when
This::wxDC(), Text::unicode:chardata(), Pt::{X::integer(), Y::integer()}, Angle::number().
drawRotatedText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY},Angle)
when is_list(Text),is_integer(PtX),is_integer(PtY),is_number(Angle) ->
@@ -370,7 +370,7 @@ drawRotatedText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY},Angle)
<<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,PtX:32/?UI,PtY:32/?UI,Angle:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawroundedrectangle">external documentation</a>.
--spec drawRoundedRectangle(This, R, Radius) -> ok when
+-spec drawRoundedRectangle(This, R, Radius) -> 'ok' when
This::wxDC(), R::{X::integer(), Y::integer(), W::integer(), H::integer()}, Radius::number().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},{RX,RY,RW,RH},Radius)
when is_integer(RX),is_integer(RY),is_integer(RW),is_integer(RH),is_number(Radius) ->
@@ -379,7 +379,7 @@ drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},{RX,RY,RW,RH},Radius)
<<ThisRef:32/?UI,RX:32/?UI,RY:32/?UI,RW:32/?UI,RH:32/?UI,0:32,Radius:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawroundedrectangle">external documentation</a>.
--spec drawRoundedRectangle(This, Pt, Sz, Radius) -> ok when
+-spec drawRoundedRectangle(This, Pt, Sz, Radius) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}, Radius::number().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH},Radius)
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH),is_number(Radius) ->
@@ -388,7 +388,7 @@ drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH},Radius)
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI,0:32,Radius:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcdrawtext">external documentation</a>.
--spec drawText(This, Text, Pt) -> ok when
+-spec drawText(This, Text, Pt) -> 'ok' when
This::wxDC(), Text::unicode:chardata(), Pt::{X::integer(), Y::integer()}.
drawText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY})
when is_list(Text),is_integer(PtX),is_integer(PtY) ->
@@ -398,7 +398,7 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Text,{PtX,PtY})
<<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,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcenddoc">external documentation</a>.
--spec endDoc(This) -> ok when
+-spec endDoc(This) -> 'ok' when
This::wxDC().
endDoc(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
@@ -406,7 +406,7 @@ endDoc(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcendpage">external documentation</a>.
--spec endPage(This) -> ok when
+-spec endPage(This) -> 'ok' when
This::wxDC().
endPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
@@ -425,7 +425,7 @@ floodFill(This,Pt={PtX,PtY},Col)
%%<br /> Style = integer
-spec floodFill(This, Pt, Col, [Option]) -> boolean() when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Col::wx:wx_colour(),
- Option :: {style, wx:wx_enum()}.
+ Option :: {'style', wx:wx_enum()}.
floodFill(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},Col, Options)
when is_integer(PtX),is_integer(PtY),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4,is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -530,7 +530,7 @@ getMultiLineTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcgetmultilinetextextent">external documentation</a>.
-spec getMultiLineTextExtent(This, String, [Option]) -> {Width::integer(), Height::integer(), HeightLine::integer()} when
This::wxDC(), String::unicode:chardata(),
- Option :: {font, wxFont:wxFont()}.
+ Option :: {'font', wxFont:wxFont()}.
getMultiLineTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
when is_list(String),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -616,7 +616,7 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String)
-spec getTextExtent(This, String, [Option]) -> Result when
Result :: {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()},
This::wxDC(), String::unicode:chardata(),
- Option :: {theFont, wxFont:wxFont()}.
+ Option :: {'theFont', wxFont:wxFont()}.
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
when is_list(String),is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -644,7 +644,7 @@ getUserScale(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcgradientfillconcentric">external documentation</a>.
--spec gradientFillConcentric(This, Rect, InitialColour, DestColour) -> ok when
+-spec gradientFillConcentric(This, Rect, InitialColour, DestColour) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour().
gradientFillConcentric(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},InitialColour,DestColour)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4 ->
@@ -653,7 +653,7 @@ gradientFillConcentric(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,(wxe_util:colour_bin(InitialColour)):16/binary,(wxe_util:colour_bin(DestColour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcgradientfillconcentric">external documentation</a>.
--spec gradientFillConcentric(This, Rect, InitialColour, DestColour, CircleCenter) -> ok when
+-spec gradientFillConcentric(This, Rect, InitialColour, DestColour, CircleCenter) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour(), CircleCenter::{X::integer(), Y::integer()}.
gradientFillConcentric(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},InitialColour,DestColour,{CircleCenterX,CircleCenterY})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4,is_integer(CircleCenterX),is_integer(CircleCenterY) ->
@@ -662,7 +662,7 @@ gradientFillConcentric(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,(wxe_util:colour_bin(InitialColour)):16/binary,(wxe_util:colour_bin(DestColour)):16/binary,CircleCenterX:32/?UI,CircleCenterY:32/?UI>>).
%% @equiv gradientFillLinear(This,Rect,InitialColour,DestColour, [])
--spec gradientFillLinear(This, Rect, InitialColour, DestColour) -> ok when
+-spec gradientFillLinear(This, Rect, InitialColour, DestColour) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour().
gradientFillLinear(This,Rect={RectX,RectY,RectW,RectH},InitialColour,DestColour)
@@ -671,9 +671,9 @@ gradientFillLinear(This,Rect={RectX,RectY,RectW,RectH},InitialColour,DestColour)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcgradientfilllinear">external documentation</a>.
%%<br /> NDirection = ?wxLEFT | ?wxRIGHT | ?wxUP | ?wxDOWN | ?wxTOP | ?wxBOTTOM | ?wxNORTH | ?wxSOUTH | ?wxWEST | ?wxEAST | ?wxALL
--spec gradientFillLinear(This, Rect, InitialColour, DestColour, [Option]) -> ok when
+-spec gradientFillLinear(This, Rect, InitialColour, DestColour, [Option]) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, InitialColour::wx:wx_colour(), DestColour::wx:wx_colour(),
- Option :: {nDirection, wx:wx_enum()}.
+ Option :: {'nDirection', wx:wx_enum()}.
gradientFillLinear(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},InitialColour,DestColour, Options)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),tuple_size(InitialColour) =:= 3; tuple_size(InitialColour) =:= 4,tuple_size(DestColour) =:= 3; tuple_size(DestColour) =:= 4,is_list(Options) ->
?CLASS(ThisT,wxDC),
@@ -760,7 +760,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcresetboundingbox">external documentation</a>.
--spec resetBoundingBox(This) -> ok when
+-spec resetBoundingBox(This) -> 'ok' when
This::wxDC().
resetBoundingBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
@@ -768,7 +768,7 @@ resetBoundingBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetaxisorientation">external documentation</a>.
--spec setAxisOrientation(This, XLeftRight, YBottomUp) -> ok when
+-spec setAxisOrientation(This, XLeftRight, YBottomUp) -> 'ok' when
This::wxDC(), XLeftRight::boolean(), YBottomUp::boolean().
setAxisOrientation(#wx_ref{type=ThisT,ref=ThisRef},XLeftRight,YBottomUp)
when is_boolean(XLeftRight),is_boolean(YBottomUp) ->
@@ -777,7 +777,7 @@ setAxisOrientation(#wx_ref{type=ThisT,ref=ThisRef},XLeftRight,YBottomUp)
<<ThisRef:32/?UI,(wxe_util:from_bool(XLeftRight)):32/?UI,(wxe_util:from_bool(YBottomUp)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetbackground">external documentation</a>.
--spec setBackground(This, Brush) -> ok when
+-spec setBackground(This, Brush) -> 'ok' when
This::wxDC(), Brush::wxBrush:wxBrush().
setBackground(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxDC),
@@ -786,7 +786,7 @@ setBackground(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef})
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetbackgroundmode">external documentation</a>.
--spec setBackgroundMode(This, Mode) -> ok when
+-spec setBackgroundMode(This, Mode) -> 'ok' when
This::wxDC(), Mode::integer().
setBackgroundMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -795,7 +795,7 @@ setBackgroundMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
<<ThisRef:32/?UI,Mode:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetbrush">external documentation</a>.
--spec setBrush(This, Brush) -> ok when
+-spec setBrush(This, Brush) -> 'ok' when
This::wxDC(), Brush::wxBrush:wxBrush().
setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxDC),
@@ -805,12 +805,12 @@ setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetclippingregion">external documentation</a>.
%% <br /> Also:<br />
-%% setClippingRegion(This, Rect) -> ok when<br />
+%% setClippingRegion(This, Rect) -> 'ok' when<br />
%% This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
%%
--spec setClippingRegion(This, Region) -> ok when
+-spec setClippingRegion(This, Region) -> 'ok' when
This::wxDC(), Region::wxRegion:wxRegion();
- (This, Rect) -> ok when
+ (This, Rect) -> 'ok' when
This::wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxDC),
@@ -824,7 +824,7 @@ setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetclippingregion">external documentation</a>.
--spec setClippingRegion(This, Pt, Sz) -> ok when
+-spec setClippingRegion(This, Pt, Sz) -> 'ok' when
This::wxDC(), Pt::{X::integer(), Y::integer()}, Sz::{W::integer(), H::integer()}.
setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
when is_integer(PtX),is_integer(PtY),is_integer(SzW),is_integer(SzH) ->
@@ -833,7 +833,7 @@ setClippingRegion(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY},{SzW,SzH})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetdeviceorigin">external documentation</a>.
--spec setDeviceOrigin(This, X, Y) -> ok when
+-spec setDeviceOrigin(This, X, Y) -> 'ok' when
This::wxDC(), X::integer(), Y::integer().
setDeviceOrigin(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -842,7 +842,7 @@ setDeviceOrigin(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetfont">external documentation</a>.
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxDC(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxDC),
@@ -852,7 +852,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetlayoutdirection">external documentation</a>.
%%<br /> Dir = ?wxLayout_Default | ?wxLayout_LeftToRight | ?wxLayout_RightToLeft
--spec setLayoutDirection(This, Dir) -> ok when
+-spec setLayoutDirection(This, Dir) -> 'ok' when
This::wxDC(), Dir::wx:wx_enum().
setLayoutDirection(#wx_ref{type=ThisT,ref=ThisRef},Dir)
when is_integer(Dir) ->
@@ -862,7 +862,7 @@ setLayoutDirection(#wx_ref{type=ThisT,ref=ThisRef},Dir)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetlogicalfunction">external documentation</a>.
%%<br /> Function = integer
--spec setLogicalFunction(This, Function) -> ok when
+-spec setLogicalFunction(This, Function) -> 'ok' when
This::wxDC(), Function::wx:wx_enum().
setLogicalFunction(#wx_ref{type=ThisT,ref=ThisRef},Function)
when is_integer(Function) ->
@@ -872,7 +872,7 @@ setLogicalFunction(#wx_ref{type=ThisT,ref=ThisRef},Function)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetmapmode">external documentation</a>.
%%<br /> Mode = integer
--spec setMapMode(This, Mode) -> ok when
+-spec setMapMode(This, Mode) -> 'ok' when
This::wxDC(), Mode::wx:wx_enum().
setMapMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -881,7 +881,7 @@ setMapMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
<<ThisRef:32/?UI,Mode:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetpalette">external documentation</a>.
--spec setPalette(This, Palette) -> ok when
+-spec setPalette(This, Palette) -> 'ok' when
This::wxDC(), Palette::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) ->
?CLASS(ThisT,wxDC),
@@ -890,7 +890,7 @@ setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}
<<ThisRef:32/?UI,PaletteRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetpen">external documentation</a>.
--spec setPen(This, Pen) -> ok when
+-spec setPen(This, Pen) -> 'ok' when
This::wxDC(), Pen::wxPen:wxPen().
setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxDC),
@@ -899,7 +899,7 @@ setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
<<ThisRef:32/?UI,PenRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsettextbackground">external documentation</a>.
--spec setTextBackground(This, Colour) -> ok when
+-spec setTextBackground(This, Colour) -> 'ok' when
This::wxDC(), Colour::wx:wx_colour().
setTextBackground(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -908,7 +908,7 @@ setTextBackground(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsettextforeground">external documentation</a>.
--spec setTextForeground(This, Colour) -> ok when
+-spec setTextForeground(This, Colour) -> 'ok' when
This::wxDC(), Colour::wx:wx_colour().
setTextForeground(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -917,7 +917,7 @@ setTextForeground(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcsetuserscale">external documentation</a>.
--spec setUserScale(This, X, Y) -> ok when
+-spec setUserScale(This, X, Y) -> 'ok' when
This::wxDC(), X::number(), Y::number().
setUserScale(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_number(X),is_number(Y) ->
@@ -936,7 +936,7 @@ startDoc(#wx_ref{type=ThisT,ref=ThisRef},Message)
<<ThisRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdc.html#wxdcstartpage">external documentation</a>.
--spec startPage(This) -> ok when
+-spec startPage(This) -> 'ok' when
This::wxDC().
startPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDC),
diff --git a/lib/wx/src/gen/wxDCOverlay.erl b/lib/wx/src/gen/wxDCOverlay.erl
index f98e310ba6..6eb0be1d64 100644
--- a/lib/wx/src/gen/wxDCOverlay.erl
+++ b/lib/wx/src/gen/wxDCOverlay.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ new(#wx_ref{type=OverlayT,ref=OverlayRef},#wx_ref{type=DcT,ref=DcRef},X,Y,Width,
<<OverlayRef:32/?UI,DcRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdcoverlay.html#wxdcoverlayclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxDCOverlay().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxDCOverlay),
@@ -63,7 +63,7 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxDCOverlay()) -> ok.
+-spec destroy(This::wxDCOverlay()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDCOverlay),
wxe_util:destroy(?wxDCOverlay_destruct,Obj),
diff --git a/lib/wx/src/gen/wxDatePickerCtrl.erl b/lib/wx/src/gen/wxDatePickerCtrl.erl
index 057f91d4e8..1b306a498a 100644
--- a/lib/wx/src/gen/wxDatePickerCtrl.erl
+++ b/lib/wx/src/gen/wxDatePickerCtrl.erl
@@ -102,11 +102,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdatepickerctrl.html#wxdatepickerctrlwxdatepickerctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxDatePickerCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {date, wx:wx_datetime()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'date', wx:wx_datetime()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -138,7 +138,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdatepickerctrl.html#wxdatepickerctrlsetrange">external documentation</a>.
--spec setRange(This, Dt1, Dt2) -> ok when
+-spec setRange(This, Dt1, Dt2) -> 'ok' when
This::wxDatePickerCtrl(), Dt1::wx:wx_datetime(), Dt2::wx:wx_datetime().
setRange(#wx_ref{type=ThisT,ref=ThisRef},Dt1,Dt2)
when tuple_size(Dt1) =:= 2,tuple_size(Dt2) =:= 2 ->
@@ -147,7 +147,7 @@ setRange(#wx_ref{type=ThisT,ref=ThisRef},Dt1,Dt2)
<<ThisRef:32/?UI,(wxe_util:datetime_bin(Dt1)):24/binary,(wxe_util:datetime_bin(Dt2)):24/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdatepickerctrl.html#wxdatepickerctrlsetvalue">external documentation</a>.
--spec setValue(This, Date) -> ok when
+-spec setValue(This, Date) -> 'ok' when
This::wxDatePickerCtrl(), Date::wx:wx_datetime().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Date)
when tuple_size(Date) =:= 2 ->
@@ -156,7 +156,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Date)
<<ThisRef:32/?UI,(wxe_util:datetime_bin(Date)):24/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxDatePickerCtrl()) -> ok.
+-spec destroy(This::wxDatePickerCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDatePickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDialog.erl b/lib/wx/src/gen/wxDialog.erl
index c3f4828c68..9f98644828 100644
--- a/lib/wx/src/gen/wxDialog.erl
+++ b/lib/wx/src/gen/wxDialog.erl
@@ -103,9 +103,9 @@ new(Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdialog.html#wxdialogwxdialog">external documentation</a>.
-spec new(Parent, Id, Title, [Option]) -> wxDialog() when
Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -129,9 +129,9 @@ create(This,Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdialog.html#wxdialogcreate">external documentation</a>.
-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
This::wxDialog(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxDialog),
@@ -164,7 +164,7 @@ createStdDialogButtonSizer(#wx_ref{type=ThisT,ref=ThisRef},Flags)
<<ThisRef:32/?UI,Flags:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdialog.html#wxdialogendmodal">external documentation</a>.
--spec endModal(This, RetCode) -> ok when
+-spec endModal(This, RetCode) -> 'ok' when
This::wxDialog(), RetCode::integer().
endModal(#wx_ref{type=ThisT,ref=ThisRef},RetCode)
when is_integer(RetCode) ->
@@ -197,7 +197,7 @@ isModal(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdialog.html#wxdialogsetaffirmativeid">external documentation</a>.
--spec setAffirmativeId(This, AffirmativeId) -> ok when
+-spec setAffirmativeId(This, AffirmativeId) -> 'ok' when
This::wxDialog(), AffirmativeId::integer().
setAffirmativeId(#wx_ref{type=ThisT,ref=ThisRef},AffirmativeId)
when is_integer(AffirmativeId) ->
@@ -206,7 +206,7 @@ setAffirmativeId(#wx_ref{type=ThisT,ref=ThisRef},AffirmativeId)
<<ThisRef:32/?UI,AffirmativeId:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdialog.html#wxdialogsetreturncode">external documentation</a>.
--spec setReturnCode(This, ReturnCode) -> ok when
+-spec setReturnCode(This, ReturnCode) -> 'ok' when
This::wxDialog(), ReturnCode::integer().
setReturnCode(#wx_ref{type=ThisT,ref=ThisRef},ReturnCode)
when is_integer(ReturnCode) ->
@@ -225,7 +225,7 @@ show(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdialog.html#wxdialogshow">external documentation</a>.
-spec show(This, [Option]) -> boolean() when
This::wxDialog(),
- Option :: {show, boolean()}.
+ Option :: {'show', boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxDialog),
@@ -244,7 +244,7 @@ showModal(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxDialog()) -> ok.
+-spec destroy(This::wxDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDirDialog.erl b/lib/wx/src/gen/wxDirDialog.erl
index aa7a419bcd..1b6b9dba71 100644
--- a/lib/wx/src/gen/wxDirDialog.erl
+++ b/lib/wx/src/gen/wxDirDialog.erl
@@ -99,11 +99,11 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdirdialog.html#wxdirdialogwxdirdialog">external documentation</a>.
-spec new(Parent, [Option]) -> wxDirDialog() when
Parent::wxWindow:wxWindow(),
- Option :: {title, unicode:chardata()}
- | {defaultPath, unicode:chardata()}
- | {style, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {sz, {W::integer(), H::integer()}}.
+ Option :: {'title', unicode:chardata()}
+ | {'defaultPath', unicode:chardata()}
+ | {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'sz', {W::integer(), H::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -134,7 +134,7 @@ getMessage(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdirdialog.html#wxdirdialogsetmessage">external documentation</a>.
--spec setMessage(This, Message) -> ok when
+-spec setMessage(This, Message) -> 'ok' when
This::wxDirDialog(), Message::unicode:chardata().
setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
when is_list(Message) ->
@@ -144,7 +144,7 @@ setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
<<ThisRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdirdialog.html#wxdirdialogsetpath">external documentation</a>.
--spec setPath(This, Path) -> ok when
+-spec setPath(This, Path) -> 'ok' when
This::wxDirDialog(), Path::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
@@ -154,7 +154,7 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxDirDialog()) -> ok.
+-spec destroy(This::wxDirDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDirDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxDirPickerCtrl.erl b/lib/wx/src/gen/wxDirPickerCtrl.erl
index fea7ee71a1..3bedeb7f54 100644
--- a/lib/wx/src/gen/wxDirPickerCtrl.erl
+++ b/lib/wx/src/gen/wxDirPickerCtrl.erl
@@ -102,12 +102,12 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdirpickerctrl.html#wxdirpickerctrlwxdirpickerctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxDirPickerCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {path, unicode:chardata()}
- | {message, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'path', unicode:chardata()}
+ | {'message', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -133,12 +133,12 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdirpickerctrl.html#wxdirpickerctrlcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxDirPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {path, unicode:chardata()}
- | {message, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'path', unicode:chardata()}
+ | {'message', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxDirPickerCtrl),
@@ -163,7 +163,7 @@ getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdirpickerctrl.html#wxdirpickerctrlsetpath">external documentation</a>.
--spec setPath(This, Str) -> ok when
+-spec setPath(This, Str) -> 'ok' when
This::wxDirPickerCtrl(), Str::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
@@ -173,7 +173,7 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxDirPickerCtrl()) -> ok.
+-spec destroy(This::wxDirPickerCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxDirPickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxEvent.erl b/lib/wx/src/gen/wxEvent.erl
index b896c938c2..677badd364 100644
--- a/lib/wx/src/gen/wxEvent.erl
+++ b/lib/wx/src/gen/wxEvent.erl
@@ -69,7 +69,7 @@ isCommandEvent(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxevent.html#wxeventresumepropagation">external documentation</a>.
--spec resumePropagation(This, PropagationLevel) -> ok when
+-spec resumePropagation(This, PropagationLevel) -> 'ok' when
This::wxEvent(), PropagationLevel::integer().
resumePropagation(#wx_ref{type=ThisT,ref=ThisRef},PropagationLevel)
when is_integer(PropagationLevel) ->
@@ -86,7 +86,7 @@ shouldPropagate(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv skip(This, [])
--spec skip(This) -> ok when
+-spec skip(This) -> 'ok' when
This::wxEvent().
skip(This)
@@ -94,9 +94,9 @@ skip(This)
skip(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxevent.html#wxeventskip">external documentation</a>.
--spec skip(This, [Option]) -> ok when
+-spec skip(This, [Option]) -> 'ok' when
This::wxEvent(),
- Option :: {skip, boolean()}.
+ Option :: {'skip', boolean()}.
skip(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxEvent),
diff --git a/lib/wx/src/gen/wxEvtHandler.erl b/lib/wx/src/gen/wxEvtHandler.erl
index d330075101..8d56ad952c 100644
--- a/lib/wx/src/gen/wxEvtHandler.erl
+++ b/lib/wx/src/gen/wxEvtHandler.erl
@@ -53,7 +53,7 @@
-type wxEvtHandler() :: wx:wx_object().
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
--spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
+-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> 'ok'.
connect(This, EventType) ->
connect(This, EventType, []).
@@ -75,9 +75,9 @@ connect(This, EventType) ->
%% to process the event. Default not specfied i.e. a message will
%% be delivered to the process calling this function.
%% {userData, term()} An erlang term that will be sent with the event. Default: [].
--spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> ok when
- Option :: {id, integer()} | {lastId, integer()} | {skip, boolean()} |
- callback | {callback, function()} | {userData, term()}.
+-spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> 'ok' when
+ Option :: {'id', integer()} | {'lastId', integer()} | {'skip', boolean()} |
+ 'callback' | {'callback', function()} | {'userData', term()}.
connect(This=#wx_ref{type=ThisT}, EventType, Options) ->
EvH = parse_opts(Options, #evh{et=EventType}),
?CLASS(ThisT,wxEvtHandler),
@@ -135,7 +135,7 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType) when is_atom(EventT
%% EventType may be the atom 'null' to match any eventtype.
%% Notice that the options skip and userdata is not used to match the eventhandler.
-spec disconnect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> boolean() when
- Option :: {id, integer()} | {lastId, integer()} | {callback, function()}.
+ Option :: {'id', integer()} | {'lastId', integer()} | {'callback', function()}.
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
?CLASS(ThisT,wxEvtHandler),
EvH = parse_opts(Opts, #evh{et=EventType}),
diff --git a/lib/wx/src/gen/wxFileDataObject.erl b/lib/wx/src/gen/wxFileDataObject.erl
index 15f7d149e1..06d8ceb9cd 100644
--- a/lib/wx/src/gen/wxFileDataObject.erl
+++ b/lib/wx/src/gen/wxFileDataObject.erl
@@ -46,7 +46,7 @@ new() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledataobject.html#wxfiledataobjectaddfile">external documentation</a>.
--spec addFile(This, Filename) -> ok when
+-spec addFile(This, Filename) -> 'ok' when
This::wxFileDataObject(), Filename::unicode:chardata().
addFile(#wx_ref{type=ThisT,ref=ThisRef},Filename)
when is_list(Filename) ->
@@ -64,7 +64,7 @@ getFilenames(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFileDataObject()) -> ok.
+-spec destroy(This::wxFileDataObject()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFileDataObject),
wxe_util:destroy(?wxFileDataObject_destroy,Obj),
diff --git a/lib/wx/src/gen/wxFileDialog.erl b/lib/wx/src/gen/wxFileDialog.erl
index 36ee6463ae..070fce3a39 100644
--- a/lib/wx/src/gen/wxFileDialog.erl
+++ b/lib/wx/src/gen/wxFileDialog.erl
@@ -101,13 +101,13 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogwxfiledialog">external documentation</a>.
-spec new(Parent, [Option]) -> wxFileDialog() when
Parent::wxWindow:wxWindow(),
- Option :: {message, unicode:chardata()}
- | {defaultDir, unicode:chardata()}
- | {defaultFile, unicode:chardata()}
- | {wildCard, unicode:chardata()}
- | {style, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {sz, {W::integer(), H::integer()}}.
+ Option :: {'message', unicode:chardata()}
+ | {'defaultDir', unicode:chardata()}
+ | {'defaultFile', unicode:chardata()}
+ | {'wildCard', unicode:chardata()}
+ | {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'sz', {W::integer(), H::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -188,7 +188,7 @@ getWildcard(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogsetdirectory">external documentation</a>.
--spec setDirectory(This, Dir) -> ok when
+-spec setDirectory(This, Dir) -> 'ok' when
This::wxFileDialog(), Dir::unicode:chardata().
setDirectory(#wx_ref{type=ThisT,ref=ThisRef},Dir)
when is_list(Dir) ->
@@ -198,7 +198,7 @@ setDirectory(#wx_ref{type=ThisT,ref=ThisRef},Dir)
<<ThisRef:32/?UI,(byte_size(Dir_UC)):32/?UI,(Dir_UC)/binary, 0:(((8- ((0+byte_size(Dir_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogsetfilename">external documentation</a>.
--spec setFilename(This, Name) -> ok when
+-spec setFilename(This, Name) -> 'ok' when
This::wxFileDialog(), Name::unicode:chardata().
setFilename(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
@@ -208,7 +208,7 @@ setFilename(#wx_ref{type=ThisT,ref=ThisRef},Name)
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogsetfilterindex">external documentation</a>.
--spec setFilterIndex(This, FilterIndex) -> ok when
+-spec setFilterIndex(This, FilterIndex) -> 'ok' when
This::wxFileDialog(), FilterIndex::integer().
setFilterIndex(#wx_ref{type=ThisT,ref=ThisRef},FilterIndex)
when is_integer(FilterIndex) ->
@@ -217,7 +217,7 @@ setFilterIndex(#wx_ref{type=ThisT,ref=ThisRef},FilterIndex)
<<ThisRef:32/?UI,FilterIndex:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogsetmessage">external documentation</a>.
--spec setMessage(This, Message) -> ok when
+-spec setMessage(This, Message) -> 'ok' when
This::wxFileDialog(), Message::unicode:chardata().
setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
when is_list(Message) ->
@@ -227,7 +227,7 @@ setMessage(#wx_ref{type=ThisT,ref=ThisRef},Message)
<<ThisRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogsetpath">external documentation</a>.
--spec setPath(This, Path) -> ok when
+-spec setPath(This, Path) -> 'ok' when
This::wxFileDialog(), Path::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
@@ -237,7 +237,7 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfiledialog.html#wxfiledialogsetwildcard">external documentation</a>.
--spec setWildcard(This, WildCard) -> ok when
+-spec setWildcard(This, WildCard) -> 'ok' when
This::wxFileDialog(), WildCard::unicode:chardata().
setWildcard(#wx_ref{type=ThisT,ref=ThisRef},WildCard)
when is_list(WildCard) ->
@@ -247,7 +247,7 @@ setWildcard(#wx_ref{type=ThisT,ref=ThisRef},WildCard)
<<ThisRef:32/?UI,(byte_size(WildCard_UC)):32/?UI,(WildCard_UC)/binary, 0:(((8- ((0+byte_size(WildCard_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFileDialog()) -> ok.
+-spec destroy(This::wxFileDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFileDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFilePickerCtrl.erl b/lib/wx/src/gen/wxFilePickerCtrl.erl
index 2b57a5927b..396403dc22 100644
--- a/lib/wx/src/gen/wxFilePickerCtrl.erl
+++ b/lib/wx/src/gen/wxFilePickerCtrl.erl
@@ -102,13 +102,13 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfilepickerctrl.html#wxfilepickerctrlwxfilepickerctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxFilePickerCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {path, unicode:chardata()}
- | {message, unicode:chardata()}
- | {wildcard, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'path', unicode:chardata()}
+ | {'message', unicode:chardata()}
+ | {'wildcard', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -135,13 +135,13 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfilepickerctrl.html#wxfilepickerctrlcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxFilePickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {path, unicode:chardata()}
- | {message, unicode:chardata()}
- | {wildcard, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'path', unicode:chardata()}
+ | {'message', unicode:chardata()}
+ | {'wildcard', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxFilePickerCtrl),
@@ -167,7 +167,7 @@ getPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfilepickerctrl.html#wxfilepickerctrlsetpath">external documentation</a>.
--spec setPath(This, Str) -> ok when
+-spec setPath(This, Str) -> 'ok' when
This::wxFilePickerCtrl(), Str::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
@@ -177,7 +177,7 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Str)
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFilePickerCtrl()) -> ok.
+-spec destroy(This::wxFilePickerCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFilePickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFindReplaceData.erl b/lib/wx/src/gen/wxFindReplaceData.erl
index 851ad2d76f..9b4b910f7e 100644
--- a/lib/wx/src/gen/wxFindReplaceData.erl
+++ b/lib/wx/src/gen/wxFindReplaceData.erl
@@ -75,7 +75,7 @@ getFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfindreplacedata.html#wxfindreplacedatasetflags">external documentation</a>.
--spec setFlags(This, Flags) -> ok when
+-spec setFlags(This, Flags) -> 'ok' when
This::wxFindReplaceData(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -84,7 +84,7 @@ setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
<<ThisRef:32/?UI,Flags:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfindreplacedata.html#wxfindreplacedatasetfindstring">external documentation</a>.
--spec setFindString(This, Str) -> ok when
+-spec setFindString(This, Str) -> 'ok' when
This::wxFindReplaceData(), Str::unicode:chardata().
setFindString(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
@@ -94,7 +94,7 @@ setFindString(#wx_ref{type=ThisT,ref=ThisRef},Str)
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfindreplacedata.html#wxfindreplacedatasetreplacestring">external documentation</a>.
--spec setReplaceString(This, Str) -> ok when
+-spec setReplaceString(This, Str) -> 'ok' when
This::wxFindReplaceData(), Str::unicode:chardata().
setReplaceString(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
@@ -104,7 +104,7 @@ setReplaceString(#wx_ref{type=ThisT,ref=ThisRef},Str)
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFindReplaceData()) -> ok.
+-spec destroy(This::wxFindReplaceData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFindReplaceData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFindReplaceDialog.erl b/lib/wx/src/gen/wxFindReplaceDialog.erl
index d265e232b3..a34fc329ae 100644
--- a/lib/wx/src/gen/wxFindReplaceDialog.erl
+++ b/lib/wx/src/gen/wxFindReplaceDialog.erl
@@ -105,7 +105,7 @@ new(Parent,Data,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfindreplacedialog.html#wxfindreplacedialogwxfindreplacedialog">external documentation</a>.
-spec new(Parent, Data, Title, [Option]) -> wxFindReplaceDialog() when
Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, Options)
when is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -128,7 +128,7 @@ create(This,Parent,Data,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfindreplacedialog.html#wxfindreplacedialogcreate">external documentation</a>.
-spec create(This, Parent, Data, Title, [Option]) -> boolean() when
This::wxFindReplaceDialog(), Parent::wxWindow:wxWindow(), Data::wxFindReplaceData:wxFindReplaceData(), Title::unicode:chardata(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=DataT,ref=DataRef},Title, Options)
when is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxFindReplaceDialog),
@@ -150,7 +150,7 @@ getData(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFindReplaceDialog()) -> ok.
+-spec destroy(This::wxFindReplaceDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFindReplaceDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFlexGridSizer.erl b/lib/wx/src/gen/wxFlexGridSizer.erl
index 84a9b619ac..80ef8f6b24 100644
--- a/lib/wx/src/gen/wxFlexGridSizer.erl
+++ b/lib/wx/src/gen/wxFlexGridSizer.erl
@@ -64,8 +64,8 @@ new(Cols)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizerwxflexgridsizer">external documentation</a>.
-spec new(Cols, [Option]) -> wxFlexGridSizer() when
Cols::integer(),
- Option :: {vgap, integer()}
- | {hgap, integer()}.
+ Option :: {'vgap', integer()}
+ | {'hgap', integer()}.
new(Cols, Options)
when is_integer(Cols),is_list(Options) ->
MOpts = fun({vgap, Vgap}, Acc) -> [<<1:32/?UI,Vgap:32/?UI>>|Acc];
@@ -84,7 +84,7 @@ new(Rows,Cols,Vgap,Hgap)
<<Rows:32/?UI,Cols:32/?UI,Vgap:32/?UI,Hgap:32/?UI>>).
%% @equiv addGrowableCol(This,Idx, [])
--spec addGrowableCol(This, Idx) -> ok when
+-spec addGrowableCol(This, Idx) -> 'ok' when
This::wxFlexGridSizer(), Idx::integer().
addGrowableCol(This,Idx)
@@ -92,9 +92,9 @@ addGrowableCol(This,Idx)
addGrowableCol(This,Idx, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizeraddgrowablecol">external documentation</a>.
--spec addGrowableCol(This, Idx, [Option]) -> ok when
+-spec addGrowableCol(This, Idx, [Option]) -> 'ok' when
This::wxFlexGridSizer(), Idx::integer(),
- Option :: {proportion, integer()}.
+ Option :: {'proportion', integer()}.
addGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
when is_integer(Idx),is_list(Options) ->
?CLASS(ThisT,wxFlexGridSizer),
@@ -105,7 +105,7 @@ addGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
<<ThisRef:32/?UI,Idx:32/?UI, BinOpt/binary>>).
%% @equiv addGrowableRow(This,Idx, [])
--spec addGrowableRow(This, Idx) -> ok when
+-spec addGrowableRow(This, Idx) -> 'ok' when
This::wxFlexGridSizer(), Idx::integer().
addGrowableRow(This,Idx)
@@ -113,9 +113,9 @@ addGrowableRow(This,Idx)
addGrowableRow(This,Idx, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizeraddgrowablerow">external documentation</a>.
--spec addGrowableRow(This, Idx, [Option]) -> ok when
+-spec addGrowableRow(This, Idx, [Option]) -> 'ok' when
This::wxFlexGridSizer(), Idx::integer(),
- Option :: {proportion, integer()}.
+ Option :: {'proportion', integer()}.
addGrowableRow(#wx_ref{type=ThisT,ref=ThisRef},Idx, Options)
when is_integer(Idx),is_list(Options) ->
?CLASS(ThisT,wxFlexGridSizer),
@@ -143,7 +143,7 @@ getNonFlexibleGrowMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizerremovegrowablecol">external documentation</a>.
--spec removeGrowableCol(This, Idx) -> ok when
+-spec removeGrowableCol(This, Idx) -> 'ok' when
This::wxFlexGridSizer(), Idx::integer().
removeGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx)
when is_integer(Idx) ->
@@ -152,7 +152,7 @@ removeGrowableCol(#wx_ref{type=ThisT,ref=ThisRef},Idx)
<<ThisRef:32/?UI,Idx:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizerremovegrowablerow">external documentation</a>.
--spec removeGrowableRow(This, Idx) -> ok when
+-spec removeGrowableRow(This, Idx) -> 'ok' when
This::wxFlexGridSizer(), Idx::integer().
removeGrowableRow(#wx_ref{type=ThisT,ref=ThisRef},Idx)
when is_integer(Idx) ->
@@ -161,7 +161,7 @@ removeGrowableRow(#wx_ref{type=ThisT,ref=ThisRef},Idx)
<<ThisRef:32/?UI,Idx:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizersetflexibledirection">external documentation</a>.
--spec setFlexibleDirection(This, Direction) -> ok when
+-spec setFlexibleDirection(This, Direction) -> 'ok' when
This::wxFlexGridSizer(), Direction::integer().
setFlexibleDirection(#wx_ref{type=ThisT,ref=ThisRef},Direction)
when is_integer(Direction) ->
@@ -171,7 +171,7 @@ setFlexibleDirection(#wx_ref{type=ThisT,ref=ThisRef},Direction)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxflexgridsizer.html#wxflexgridsizersetnonflexiblegrowmode">external documentation</a>.
%%<br /> Mode = ?wxFLEX_GROWMODE_NONE | ?wxFLEX_GROWMODE_SPECIFIED | ?wxFLEX_GROWMODE_ALL
--spec setNonFlexibleGrowMode(This, Mode) -> ok when
+-spec setNonFlexibleGrowMode(This, Mode) -> 'ok' when
This::wxFlexGridSizer(), Mode::wx:wx_enum().
setNonFlexibleGrowMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -180,7 +180,7 @@ setNonFlexibleGrowMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
<<ThisRef:32/?UI,Mode:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFlexGridSizer()) -> ok.
+-spec destroy(This::wxFlexGridSizer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFlexGridSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFont.erl b/lib/wx/src/gen/wxFont.erl
index 9b98f8b06e..56e6e96b6d 100644
--- a/lib/wx/src/gen/wxFont.erl
+++ b/lib/wx/src/gen/wxFont.erl
@@ -68,9 +68,9 @@ new(Size,Family,Style,Weight)
%%<br /> Style = ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
-spec new(Size, Family, Style, Weight, [Option]) -> wxFont() when
Size::integer(), Family::wx:wx_enum(), Style::wx:wx_enum(), Weight::integer(),
- Option :: {underlined, boolean()}
- | {face, unicode:chardata()}
- | {encoding, wx:wx_enum()}.
+ Option :: {'underlined', boolean()}
+ | {'face', unicode:chardata()}
+ | {'encoding', wx:wx_enum()}.
new(Size,Family,Style,Weight, Options)
when is_integer(Size),is_integer(Family),is_integer(Style),is_integer(Weight),is_list(Options) ->
MOpts = fun({underlined, Underlined}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Underlined)):32/?UI>>|Acc];
@@ -172,7 +172,7 @@ ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfont.html#wxfontsetdefaultencoding">external documentation</a>.
%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
--spec setDefaultEncoding(Encoding) -> ok when
+-spec setDefaultEncoding(Encoding) -> 'ok' when
Encoding::wx:wx_enum().
setDefaultEncoding(Encoding)
when is_integer(Encoding) ->
@@ -191,7 +191,7 @@ setFaceName(#wx_ref{type=ThisT,ref=ThisRef},FaceName)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfont.html#wxfontsetfamily">external documentation</a>.
%%<br /> Family = ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
--spec setFamily(This, Family) -> ok when
+-spec setFamily(This, Family) -> 'ok' when
This::wxFont(), Family::wx:wx_enum().
setFamily(#wx_ref{type=ThisT,ref=ThisRef},Family)
when is_integer(Family) ->
@@ -200,7 +200,7 @@ setFamily(#wx_ref{type=ThisT,ref=ThisRef},Family)
<<ThisRef:32/?UI,Family:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfont.html#wxfontsetpointsize">external documentation</a>.
--spec setPointSize(This, PointSize) -> ok when
+-spec setPointSize(This, PointSize) -> 'ok' when
This::wxFont(), PointSize::integer().
setPointSize(#wx_ref{type=ThisT,ref=ThisRef},PointSize)
when is_integer(PointSize) ->
@@ -210,7 +210,7 @@ setPointSize(#wx_ref{type=ThisT,ref=ThisRef},PointSize)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfont.html#wxfontsetstyle">external documentation</a>.
%%<br /> Style = ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
--spec setStyle(This, Style) -> ok when
+-spec setStyle(This, Style) -> 'ok' when
This::wxFont(), Style::wx:wx_enum().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
@@ -219,7 +219,7 @@ setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
<<ThisRef:32/?UI,Style:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfont.html#wxfontsetunderlined">external documentation</a>.
--spec setUnderlined(This, Underlined) -> ok when
+-spec setUnderlined(This, Underlined) -> 'ok' when
This::wxFont(), Underlined::boolean().
setUnderlined(#wx_ref{type=ThisT,ref=ThisRef},Underlined)
when is_boolean(Underlined) ->
@@ -228,7 +228,7 @@ setUnderlined(#wx_ref{type=ThisT,ref=ThisRef},Underlined)
<<ThisRef:32/?UI,(wxe_util:from_bool(Underlined)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfont.html#wxfontsetweight">external documentation</a>.
--spec setWeight(This, Weight) -> ok when
+-spec setWeight(This, Weight) -> 'ok' when
This::wxFont(), Weight::integer().
setWeight(#wx_ref{type=ThisT,ref=ThisRef},Weight)
when is_integer(Weight) ->
@@ -237,7 +237,7 @@ setWeight(#wx_ref{type=ThisT,ref=ThisRef},Weight)
<<ThisRef:32/?UI,Weight:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFont()) -> ok.
+-spec destroy(This::wxFont()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFont),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontData.erl b/lib/wx/src/gen/wxFontData.erl
index 066367862f..2d1a1b5568 100644
--- a/lib/wx/src/gen/wxFontData.erl
+++ b/lib/wx/src/gen/wxFontData.erl
@@ -52,7 +52,7 @@ new(#wx_ref{type=DataT,ref=DataRef}) ->
<<DataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdataenableeffects">external documentation</a>.
--spec enableEffects(This, Flag) -> ok when
+-spec enableEffects(This, Flag) -> 'ok' when
This::wxFontData(), Flag::boolean().
enableEffects(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -109,7 +109,7 @@ getShowHelp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdatasetallowsymbols">external documentation</a>.
--spec setAllowSymbols(This, Flag) -> ok when
+-spec setAllowSymbols(This, Flag) -> 'ok' when
This::wxFontData(), Flag::boolean().
setAllowSymbols(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -118,7 +118,7 @@ setAllowSymbols(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdatasetchosenfont">external documentation</a>.
--spec setChosenFont(This, Font) -> ok when
+-spec setChosenFont(This, Font) -> 'ok' when
This::wxFontData(), Font::wxFont:wxFont().
setChosenFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxFontData),
@@ -127,7 +127,7 @@ setChosenFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) -
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdatasetcolour">external documentation</a>.
--spec setColour(This, Colour) -> ok when
+-spec setColour(This, Colour) -> 'ok' when
This::wxFontData(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -136,7 +136,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdatasetinitialfont">external documentation</a>.
--spec setInitialFont(This, Font) -> ok when
+-spec setInitialFont(This, Font) -> 'ok' when
This::wxFontData(), Font::wxFont:wxFont().
setInitialFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxFontData),
@@ -145,7 +145,7 @@ setInitialFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef})
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdatasetrange">external documentation</a>.
--spec setRange(This, MinRange, MaxRange) -> ok when
+-spec setRange(This, MinRange, MaxRange) -> 'ok' when
This::wxFontData(), MinRange::integer(), MaxRange::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinRange,MaxRange)
when is_integer(MinRange),is_integer(MaxRange) ->
@@ -154,7 +154,7 @@ setRange(#wx_ref{type=ThisT,ref=ThisRef},MinRange,MaxRange)
<<ThisRef:32/?UI,MinRange:32/?UI,MaxRange:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontdata.html#wxfontdatasetshowhelp">external documentation</a>.
--spec setShowHelp(This, Flag) -> ok when
+-spec setShowHelp(This, Flag) -> 'ok' when
This::wxFontData(), Flag::boolean().
setShowHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -163,7 +163,7 @@ setShowHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFontData()) -> ok.
+-spec destroy(This::wxFontData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFontData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontDialog.erl b/lib/wx/src/gen/wxFontDialog.erl
index de199cfcce..3e6a913973 100644
--- a/lib/wx/src/gen/wxFontDialog.erl
+++ b/lib/wx/src/gen/wxFontDialog.erl
@@ -122,7 +122,7 @@ getFontData(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFontDialog()) -> ok.
+-spec destroy(This::wxFontDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFontDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFontPickerCtrl.erl b/lib/wx/src/gen/wxFontPickerCtrl.erl
index c21061e0fe..0356f795eb 100644
--- a/lib/wx/src/gen/wxFontPickerCtrl.erl
+++ b/lib/wx/src/gen/wxFontPickerCtrl.erl
@@ -103,11 +103,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontpickerctrl.html#wxfontpickerctrlwxfontpickerctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxFontPickerCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {initial, wxFont:wxFont()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'initial', wxFont:wxFont()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -132,11 +132,11 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontpickerctrl.html#wxfontpickerctrlcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxFontPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {initial, wxFont:wxFont()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'initial', wxFont:wxFont()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxFontPickerCtrl),
@@ -160,7 +160,7 @@ getSelectedFont(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontpickerctrl.html#wxfontpickerctrlsetselectedfont">external documentation</a>.
--spec setSelectedFont(This, F) -> ok when
+-spec setSelectedFont(This, F) -> 'ok' when
This::wxFontPickerCtrl(), F::wxFont:wxFont().
setSelectedFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FT,ref=FRef}) ->
?CLASS(ThisT,wxFontPickerCtrl),
@@ -177,7 +177,7 @@ getMaxPointSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxfontpickerctrl.html#wxfontpickerctrlsetmaxpointsize">external documentation</a>.
--spec setMaxPointSize(This, Max) -> ok when
+-spec setMaxPointSize(This, Max) -> 'ok' when
This::wxFontPickerCtrl(), Max::integer().
setMaxPointSize(#wx_ref{type=ThisT,ref=ThisRef},Max)
when is_integer(Max) ->
@@ -186,7 +186,7 @@ setMaxPointSize(#wx_ref{type=ThisT,ref=ThisRef},Max)
<<ThisRef:32/?UI,Max:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFontPickerCtrl()) -> ok.
+-spec destroy(This::wxFontPickerCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFontPickerCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxFrame.erl b/lib/wx/src/gen/wxFrame.erl
index 75860cd9b7..93aad5b235 100644
--- a/lib/wx/src/gen/wxFrame.erl
+++ b/lib/wx/src/gen/wxFrame.erl
@@ -105,9 +105,9 @@ new(Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframewxframe">external documentation</a>.
-spec new(Parent, Id, Title, [Option]) -> wxFrame() when
Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -131,9 +131,9 @@ create(This,Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframecreate">external documentation</a>.
-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
This::wxFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -158,9 +158,9 @@ createStatusBar(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframecreatestatusbar">external documentation</a>.
-spec createStatusBar(This, [Option]) -> wxStatusBar:wxStatusBar() when
This::wxFrame(),
- Option :: {number, integer()}
- | {style, integer()}
- | {id, integer()}.
+ Option :: {'number', integer()}
+ | {'style', integer()}
+ | {'id', integer()}.
createStatusBar(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -183,8 +183,8 @@ createToolBar(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframecreatetoolbar">external documentation</a>.
-spec createToolBar(This, [Option]) -> wxToolBar:wxToolBar() when
This::wxFrame(),
- Option :: {style, integer()}
- | {id, integer()}.
+ Option :: {'style', integer()}
+ | {'id', integer()}.
createToolBar(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -245,7 +245,7 @@ processCommand(#wx_ref{type=ThisT,ref=ThisRef},Winid)
<<ThisRef:32/?UI,Winid:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesendsizeevent">external documentation</a>.
--spec sendSizeEvent(This) -> ok when
+-spec sendSizeEvent(This) -> 'ok' when
This::wxFrame().
sendSizeEvent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxFrame),
@@ -253,7 +253,7 @@ sendSizeEvent(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesetmenubar">external documentation</a>.
--spec setMenuBar(This, Menubar) -> ok when
+-spec setMenuBar(This, Menubar) -> 'ok' when
This::wxFrame(), Menubar::wxMenuBar:wxMenuBar().
setMenuBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenubarT,ref=MenubarRef}) ->
?CLASS(ThisT,wxFrame),
@@ -262,7 +262,7 @@ setMenuBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenubarT,ref=MenubarRef}
<<ThisRef:32/?UI,MenubarRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesetstatusbar">external documentation</a>.
--spec setStatusBar(This, Statbar) -> ok when
+-spec setStatusBar(This, Statbar) -> 'ok' when
This::wxFrame(), Statbar::wxStatusBar:wxStatusBar().
setStatusBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StatbarT,ref=StatbarRef}) ->
?CLASS(ThisT,wxFrame),
@@ -271,7 +271,7 @@ setStatusBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StatbarT,ref=StatbarRe
<<ThisRef:32/?UI,StatbarRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesetstatusbarpane">external documentation</a>.
--spec setStatusBarPane(This, N) -> ok when
+-spec setStatusBarPane(This, N) -> 'ok' when
This::wxFrame(), N::integer().
setStatusBarPane(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -280,7 +280,7 @@ setStatusBarPane(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @equiv setStatusText(This,Text, [])
--spec setStatusText(This, Text) -> ok when
+-spec setStatusText(This, Text) -> 'ok' when
This::wxFrame(), Text::unicode:chardata().
setStatusText(This,Text)
@@ -288,9 +288,9 @@ setStatusText(This,Text)
setStatusText(This,Text, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesetstatustext">external documentation</a>.
--spec setStatusText(This, Text, [Option]) -> ok when
+-spec setStatusText(This, Text, [Option]) -> 'ok' when
This::wxFrame(), Text::unicode:chardata(),
- Option :: {number, integer()}.
+ Option :: {'number', integer()}.
setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxFrame),
@@ -302,7 +302,7 @@ setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesetstatuswidths">external documentation</a>.
--spec setStatusWidths(This, Widths_field) -> ok when
+-spec setStatusWidths(This, Widths_field) -> 'ok' when
This::wxFrame(), Widths_field::[integer()].
setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
when is_list(Widths_field) ->
@@ -312,7 +312,7 @@ setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
(<< <<C:32/?I>> || C <- Widths_field>>)/binary, 0:(((0+length(Widths_field)) rem 2)*32)>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxframe.html#wxframesettoolbar">external documentation</a>.
--spec setToolBar(This, Toolbar) -> ok when
+-spec setToolBar(This, Toolbar) -> 'ok' when
This::wxFrame(), Toolbar::wxToolBar:wxToolBar().
setToolBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ToolbarT,ref=ToolbarRef}) ->
?CLASS(ThisT,wxFrame),
@@ -321,7 +321,7 @@ setToolBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ToolbarT,ref=ToolbarRef}
<<ThisRef:32/?UI,ToolbarRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxFrame()) -> ok.
+-spec destroy(This::wxFrame()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGLCanvas.erl b/lib/wx/src/gen/wxGLCanvas.erl
index 9d3d13740d..2007047bd3 100644
--- a/lib/wx/src/gen/wxGLCanvas.erl
+++ b/lib/wx/src/gen/wxGLCanvas.erl
@@ -89,25 +89,25 @@ new(Parent)
%% <br /> Also:<br />
%% new(Parent, [Option]) -> wxGLCanvas() when<br />
%% Parent::wxWindow:wxWindow(),<br />
-%% Option :: {id, integer()}<br />
-%% | {pos, {X::integer(), Y::integer()}}<br />
-%% | {size, {W::integer(), H::integer()}}<br />
-%% | {style, integer()}<br />
-%% | {name, unicode:chardata()}<br />
-%% | {attribList, [integer()]}<br />
-%% | {palette, wxPalette:wxPalette()}.<br />
+%% Option :: {'id', integer()}<br />
+%% | {'pos', {X::integer(), Y::integer()}}<br />
+%% | {'size', {W::integer(), H::integer()}}<br />
+%% | {'style', integer()}<br />
+%% | {'name', unicode:chardata()}<br />
+%% | {'attribList', [integer()]}<br />
+%% | {'palette', wxPalette:wxPalette()}.<br />
%%
-spec new(Parent, Shared) -> wxGLCanvas() when
Parent::wxWindow:wxWindow(), Shared::wx:wx_object() | wxGLCanvas();
(Parent, [Option]) -> wxGLCanvas() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {name, unicode:chardata()}
- | {attribList, [integer()]}
- | {palette, wxPalette:wxPalette()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'name', unicode:chardata()}
+ | {'attribList', [integer()]}
+ | {'palette', wxPalette:wxPalette()}.
new(Parent,Shared)
when is_record(Parent, wx_ref),is_record(Shared, wx_ref) ->
@@ -131,13 +131,13 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxglcanvas.html#wxglcanvaswxglcanvas">external documentation</a>.
-spec new(Parent, Shared, [Option]) -> wxGLCanvas() when
Parent::wxWindow:wxWindow(), Shared::wx:wx_object() | wxGLCanvas(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {name, unicode:chardata()}
- | {attribList, [integer()]}
- | {palette, wxPalette:wxPalette()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'name', unicode:chardata()}
+ | {'attribList', [integer()]}
+ | {'palette', wxPalette:wxPalette()}.
new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=SharedT,ref=SharedRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -169,7 +169,7 @@ getContext(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxglcanvas.html#wxglcanvassetcurrent">external documentation</a>.
--spec setCurrent(This) -> ok when
+-spec setCurrent(This) -> 'ok' when
This::wxGLCanvas().
setCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGLCanvas),
@@ -179,7 +179,7 @@ setCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
_Result.
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxglcanvas.html#wxglcanvasswapbuffers">external documentation</a>.
--spec swapBuffers(This) -> ok when
+-spec swapBuffers(This) -> 'ok' when
This::wxGLCanvas().
swapBuffers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGLCanvas),
@@ -187,7 +187,7 @@ swapBuffers(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGLCanvas()) -> ok.
+-spec destroy(This::wxGLCanvas()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGLCanvas),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGauge.erl b/lib/wx/src/gen/wxGauge.erl
index 2745e251b4..fa2e7618e8 100644
--- a/lib/wx/src/gen/wxGauge.erl
+++ b/lib/wx/src/gen/wxGauge.erl
@@ -97,10 +97,10 @@ new(Parent,Id,Range)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgauge.html#wxgaugewxgauge">external documentation</a>.
-spec new(Parent, Id, Range, [Option]) -> wxGauge() when
Parent::wxWindow:wxWindow(), Id::integer(), Range::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Range, Options)
when is_integer(Id),is_integer(Range),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,10 +124,10 @@ create(This,Parent,Id,Range)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgauge.html#wxgaugecreate">external documentation</a>.
-spec create(This, Parent, Id, Range, [Option]) -> boolean() when
This::wxGauge(), Parent::wxWindow:wxWindow(), Id::integer(), Range::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Range, Options)
when is_integer(Id),is_integer(Range),is_list(Options) ->
?CLASS(ThisT,wxGauge),
@@ -166,7 +166,7 @@ isVertical(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgauge.html#wxgaugesetrange">external documentation</a>.
--spec setRange(This, R) -> ok when
+-spec setRange(This, R) -> 'ok' when
This::wxGauge(), R::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},R)
when is_integer(R) ->
@@ -175,7 +175,7 @@ setRange(#wx_ref{type=ThisT,ref=ThisRef},R)
<<ThisRef:32/?UI,R:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgauge.html#wxgaugesetvalue">external documentation</a>.
--spec setValue(This, Pos) -> ok when
+-spec setValue(This, Pos) -> 'ok' when
This::wxGauge(), Pos::integer().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -184,7 +184,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgauge.html#wxgaugepulse">external documentation</a>.
--spec pulse(This) -> ok when
+-spec pulse(This) -> 'ok' when
This::wxGauge().
pulse(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGauge),
@@ -192,7 +192,7 @@ pulse(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGauge()) -> ok.
+-spec destroy(This::wxGauge()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGauge),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGenericDirCtrl.erl b/lib/wx/src/gen/wxGenericDirCtrl.erl
index bc26a1645e..3ea99c682d 100644
--- a/lib/wx/src/gen/wxGenericDirCtrl.erl
+++ b/lib/wx/src/gen/wxGenericDirCtrl.erl
@@ -99,13 +99,13 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlwxgenericdirctrl">external documentation</a>.
-spec new(Parent, [Option]) -> wxGenericDirCtrl() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {dir, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {filter, unicode:chardata()}
- | {defaultFilter, integer()}.
+ Option :: {'id', integer()}
+ | {'dir', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'filter', unicode:chardata()}
+ | {'defaultFilter', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -132,13 +132,13 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxGenericDirCtrl(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {dir, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {filter, unicode:chardata()}
- | {defaultFilter, integer()}.
+ Option :: {'id', integer()}
+ | {'dir', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'filter', unicode:chardata()}
+ | {'defaultFilter', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -156,7 +156,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlinit">external documentation</a>.
--spec init(This) -> ok when
+-spec init(This) -> 'ok' when
This::wxGenericDirCtrl().
init(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -164,7 +164,7 @@ init(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlcollapsetree">external documentation</a>.
--spec collapseTree(This) -> ok when
+-spec collapseTree(This) -> 'ok' when
This::wxGenericDirCtrl().
collapseTree(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -238,7 +238,7 @@ getTreeCtrl(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlrecreatetree">external documentation</a>.
--spec reCreateTree(This) -> ok when
+-spec reCreateTree(This) -> 'ok' when
This::wxGenericDirCtrl().
reCreateTree(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGenericDirCtrl),
@@ -246,7 +246,7 @@ reCreateTree(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlsetdefaultpath">external documentation</a>.
--spec setDefaultPath(This, Path) -> ok when
+-spec setDefaultPath(This, Path) -> 'ok' when
This::wxGenericDirCtrl(), Path::unicode:chardata().
setDefaultPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
@@ -256,7 +256,7 @@ setDefaultPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlsetfilter">external documentation</a>.
--spec setFilter(This, Filter) -> ok when
+-spec setFilter(This, Filter) -> 'ok' when
This::wxGenericDirCtrl(), Filter::unicode:chardata().
setFilter(#wx_ref{type=ThisT,ref=ThisRef},Filter)
when is_list(Filter) ->
@@ -266,7 +266,7 @@ setFilter(#wx_ref{type=ThisT,ref=ThisRef},Filter)
<<ThisRef:32/?UI,(byte_size(Filter_UC)):32/?UI,(Filter_UC)/binary, 0:(((8- ((0+byte_size(Filter_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlsetfilterindex">external documentation</a>.
--spec setFilterIndex(This, N) -> ok when
+-spec setFilterIndex(This, N) -> 'ok' when
This::wxGenericDirCtrl(), N::integer().
setFilterIndex(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -275,7 +275,7 @@ setFilterIndex(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgenericdirctrl.html#wxgenericdirctrlsetpath">external documentation</a>.
--spec setPath(This, Path) -> ok when
+-spec setPath(This, Path) -> 'ok' when
This::wxGenericDirCtrl(), Path::unicode:chardata().
setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
when is_list(Path) ->
@@ -285,7 +285,7 @@ setPath(#wx_ref{type=ThisT,ref=ThisRef},Path)
<<ThisRef:32/?UI,(byte_size(Path_UC)):32/?UI,(Path_UC)/binary, 0:(((8- ((0+byte_size(Path_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGenericDirCtrl()) -> ok.
+-spec destroy(This::wxGenericDirCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGenericDirCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGraphicsContext.erl b/lib/wx/src/gen/wxGraphicsContext.erl
index bbb2cfc0ca..0aa2119210 100644
--- a/lib/wx/src/gen/wxGraphicsContext.erl
+++ b/lib/wx/src/gen/wxGraphicsContext.erl
@@ -114,7 +114,7 @@ createFont(This,Font)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextcreatefont">external documentation</a>.
-spec createFont(This, Font, [Option]) -> wxGraphicsFont:wxGraphicsFont() when
This::wxGraphicsContext(), Font::wxFont:wxFont(),
- Option :: {col, wx:wx_colour()}.
+ Option :: {'col', wx:wx_colour()}.
createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -136,12 +136,12 @@ createMatrix(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextcreatematrix">external documentation</a>.
-spec createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix() when
This::wxGraphicsContext(),
- Option :: {a, number()}
- | {b, number()}
- | {c, number()}
- | {d, number()}
- | {tx, number()}
- | {ty, number()}.
+ Option :: {'a', number()}
+ | {'b', number()}
+ | {'c', number()}
+ | {'d', number()}
+ | {'tx', number()}
+ | {'ty', number()}.
createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -165,7 +165,7 @@ createPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextclip">external documentation</a>.
--spec clip(This, Region) -> ok when
+-spec clip(This, Region) -> 'ok' when
This::wxGraphicsContext(), Region::wxRegion:wxRegion().
clip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -174,7 +174,7 @@ clip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
<<ThisRef:32/?UI,RegionRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextclip">external documentation</a>.
--spec clip(This, X, Y, W, H) -> ok when
+-spec clip(This, X, Y, W, H) -> 'ok' when
This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
clip(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -183,7 +183,7 @@ clip(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextresetclip">external documentation</a>.
--spec resetClip(This) -> ok when
+-spec resetClip(This) -> 'ok' when
This::wxGraphicsContext().
resetClip(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -191,7 +191,7 @@ resetClip(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawbitmap">external documentation</a>.
--spec drawBitmap(This, Bmp, X, Y, W, H) -> ok when
+-spec drawBitmap(This, Bmp, X, Y, W, H) -> 'ok' when
This::wxGraphicsContext(), Bmp::wxBitmap:wxBitmap(), X::number(), Y::number(), W::number(), H::number().
drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -201,7 +201,7 @@ drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},X,Y,W,H
<<ThisRef:32/?UI,BmpRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawellipse">external documentation</a>.
--spec drawEllipse(This, X, Y, W, H) -> ok when
+-spec drawEllipse(This, X, Y, W, H) -> 'ok' when
This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -210,7 +210,7 @@ drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawicon">external documentation</a>.
--spec drawIcon(This, Icon, X, Y, W, H) -> ok when
+-spec drawIcon(This, Icon, X, Y, W, H) -> 'ok' when
This::wxGraphicsContext(), Icon::wxIcon:wxIcon(), X::number(), Y::number(), W::number(), H::number().
drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -220,7 +220,7 @@ drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},X,Y,W,H
<<ThisRef:32/?UI,IconRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @equiv drawLines(This,Points, [])
--spec drawLines(This, Points) -> ok when
+-spec drawLines(This, Points) -> 'ok' when
This::wxGraphicsContext(), Points::[{X::float(), Y::float()}].
drawLines(This,Points)
@@ -229,9 +229,9 @@ drawLines(This,Points)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawlines">external documentation</a>.
%%<br /> FillStyle = integer
--spec drawLines(This, Points, [Option]) -> ok when
+-spec drawLines(This, Points, [Option]) -> 'ok' when
This::wxGraphicsContext(), Points::[{X::float(), Y::float()}],
- Option :: {fillStyle, wx:wx_enum()}.
+ Option :: {'fillStyle', wx:wx_enum()}.
drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -243,7 +243,7 @@ drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
(<< <<X:64/?F,Y:64/?F>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
%% @equiv drawPath(This,Path, [])
--spec drawPath(This, Path) -> ok when
+-spec drawPath(This, Path) -> 'ok' when
This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
drawPath(This,Path)
@@ -252,9 +252,9 @@ drawPath(This,Path)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawpath">external documentation</a>.
%%<br /> FillStyle = integer
--spec drawPath(This, Path, [Option]) -> ok when
+-spec drawPath(This, Path, [Option]) -> 'ok' when
This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(),
- Option :: {fillStyle, wx:wx_enum()}.
+ Option :: {'fillStyle', wx:wx_enum()}.
drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -266,7 +266,7 @@ drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
<<ThisRef:32/?UI,PathRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawrectangle">external documentation</a>.
--spec drawRectangle(This, X, Y, W, H) -> ok when
+-spec drawRectangle(This, X, Y, W, H) -> 'ok' when
This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -275,7 +275,7 @@ drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawroundedrectangle">external documentation</a>.
--spec drawRoundedRectangle(This, X, Y, W, H, Radius) -> ok when
+-spec drawRoundedRectangle(This, X, Y, W, H, Radius) -> 'ok' when
This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number(), Radius::number().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
when is_number(X),is_number(Y),is_number(W),is_number(H),is_number(Radius) ->
@@ -284,7 +284,7 @@ drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F,Radius:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
--spec drawText(This, Str, X, Y) -> ok when
+-spec drawText(This, Str, X, Y) -> 'ok' when
This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
when is_list(Str),is_number(X),is_number(Y) ->
@@ -295,12 +295,12 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
%% <br /> Also:<br />
-%% drawText(This, Str, X, Y, BackgroundBrush) -> ok when<br />
+%% drawText(This, Str, X, Y, BackgroundBrush) -> 'ok' when<br />
%% This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().<br />
%%
--spec drawText(This, Str, X, Y, Angle) -> ok when
+-spec drawText(This, Str, X, Y, Angle) -> 'ok' when
This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), Angle::number();
- (This, Str, X, Y, BackgroundBrush) -> ok when
+ (This, Str, X, Y, BackgroundBrush) -> 'ok' when
This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle)
when is_list(Str),is_number(X),is_number(Y),is_number(Angle) ->
@@ -317,7 +317,7 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,#wx_ref{type=BackgroundBrushT,r
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,BackgroundBrushRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
--spec drawText(This, Str, X, Y, Angle, BackgroundBrush) -> ok when
+-spec drawText(This, Str, X, Y, Angle, BackgroundBrush) -> 'ok' when
This::wxGraphicsContext(), Str::unicode:chardata(), X::number(), Y::number(), Angle::number(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle,#wx_ref{type=BackgroundBrushT,ref=BackgroundBrushRef})
when is_list(Str),is_number(X),is_number(Y),is_number(Angle) ->
@@ -328,7 +328,7 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle,#wx_ref{type=BackgroundBr
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,Angle:64/?F,BackgroundBrushRef:32/?UI>>).
%% @equiv fillPath(This,Path, [])
--spec fillPath(This, Path) -> ok when
+-spec fillPath(This, Path) -> 'ok' when
This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
fillPath(This,Path)
@@ -337,9 +337,9 @@ fillPath(This,Path)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextfillpath">external documentation</a>.
%%<br /> FillStyle = integer
--spec fillPath(This, Path, [Option]) -> ok when
+-spec fillPath(This, Path, [Option]) -> 'ok' when
This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(),
- Option :: {fillStyle, wx:wx_enum()}.
+ Option :: {'fillStyle', wx:wx_enum()}.
fillPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -351,7 +351,7 @@ fillPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
<<ThisRef:32/?UI,PathRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextstrokepath">external documentation</a>.
--spec strokePath(This, Path) -> ok when
+-spec strokePath(This, Path) -> 'ok' when
This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
strokePath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -381,7 +381,7 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextrotate">external documentation</a>.
--spec rotate(This, Angle) -> ok when
+-spec rotate(This, Angle) -> 'ok' when
This::wxGraphicsContext(), Angle::number().
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
when is_number(Angle) ->
@@ -390,7 +390,7 @@ rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextscale">external documentation</a>.
--spec scale(This, XScale, YScale) -> ok when
+-spec scale(This, XScale, YScale) -> 'ok' when
This::wxGraphicsContext(), XScale::number(), YScale::number().
scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
when is_number(XScale),is_number(YScale) ->
@@ -399,7 +399,7 @@ scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
<<ThisRef:32/?UI,0:32,XScale:64/?F,YScale:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontexttranslate">external documentation</a>.
--spec translate(This, Dx, Dy) -> ok when
+-spec translate(This, Dx, Dy) -> 'ok' when
This::wxGraphicsContext(), Dx::number(), Dy::number().
translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
when is_number(Dx),is_number(Dy) ->
@@ -416,7 +416,7 @@ getTransform(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextsettransform">external documentation</a>.
--spec setTransform(This, Matrix) -> ok when
+-spec setTransform(This, Matrix) -> 'ok' when
This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
setTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -425,7 +425,7 @@ setTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}
<<ThisRef:32/?UI,MatrixRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextconcattransform">external documentation</a>.
--spec concatTransform(This, Matrix) -> ok when
+-spec concatTransform(This, Matrix) -> 'ok' when
This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
concatTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -434,7 +434,7 @@ concatTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixR
<<ThisRef:32/?UI,MatrixRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextsetbrush">external documentation</a>.
--spec setBrush(This, Brush) -> ok when
+-spec setBrush(This, Brush) -> 'ok' when
This::wxGraphicsContext(), Brush::wxGraphicsBrush:wxGraphicsBrush() | wxBrush:wxBrush().
setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -448,7 +448,7 @@ setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextsetfont">external documentation</a>.
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxGraphicsContext(), Font::wxGraphicsFont:wxGraphicsFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -457,7 +457,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextsetfont">external documentation</a>.
--spec setFont(This, Font, Colour) -> ok when
+-spec setFont(This, Font, Colour) -> 'ok' when
This::wxGraphicsContext(), Font::wxFont:wxFont(), Colour::wx:wx_colour().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -467,7 +467,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef},Colour)
<<ThisRef:32/?UI,FontRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextsetpen">external documentation</a>.
--spec setPen(This, Pen) -> ok when
+-spec setPen(This, Pen) -> 'ok' when
This::wxGraphicsContext(), Pen::wxPen:wxPen() | wxGraphicsPen:wxGraphicsPen().
setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -481,7 +481,7 @@ setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
<<ThisRef:32/?UI,PenRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextstrokeline">external documentation</a>.
--spec strokeLine(This, X1, Y1, X2, Y2) -> ok when
+-spec strokeLine(This, X1, Y1, X2, Y2) -> 'ok' when
This::wxGraphicsContext(), X1::number(), Y1::number(), X2::number(), Y2::number().
strokeLine(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2)
when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2) ->
@@ -490,7 +490,7 @@ strokeLine(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2)
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicscontext.html#wxgraphicscontextstrokelines">external documentation</a>.
--spec strokeLines(This, Points) -> ok when
+-spec strokeLines(This, Points) -> 'ok' when
This::wxGraphicsContext(), Points::[{X::float(), Y::float()}].
strokeLines(#wx_ref{type=ThisT,ref=ThisRef},Points)
when is_list(Points) ->
@@ -500,7 +500,7 @@ strokeLines(#wx_ref{type=ThisT,ref=ThisRef},Points)
(<< <<X:64/?F,Y:64/?F>> || {X,Y} <- Points>>)/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGraphicsContext()) -> ok.
+-spec destroy(This::wxGraphicsContext()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGraphicsContext),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGraphicsMatrix.erl b/lib/wx/src/gen/wxGraphicsMatrix.erl
index b22e667fed..d388643ef7 100644
--- a/lib/wx/src/gen/wxGraphicsMatrix.erl
+++ b/lib/wx/src/gen/wxGraphicsMatrix.erl
@@ -41,7 +41,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxGraphicsMatrix() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsmatrix.html#wxgraphicsmatrixconcat">external documentation</a>.
--spec concat(This, T) -> ok when
+-spec concat(This, T) -> 'ok' when
This::wxGraphicsMatrix(), T::wxGraphicsMatrix().
concat(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TT,ref=TRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
@@ -59,7 +59,7 @@ get(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsmatrix.html#wxgraphicsmatrixinvert">external documentation</a>.
--spec invert(This) -> ok when
+-spec invert(This) -> 'ok' when
This::wxGraphicsMatrix().
invert(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsMatrix),
@@ -84,7 +84,7 @@ isIdentity(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsmatrix.html#wxgraphicsmatrixrotate">external documentation</a>.
--spec rotate(This, Angle) -> ok when
+-spec rotate(This, Angle) -> 'ok' when
This::wxGraphicsMatrix(), Angle::number().
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
when is_number(Angle) ->
@@ -93,7 +93,7 @@ rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsmatrix.html#wxgraphicsmatrixscale">external documentation</a>.
--spec scale(This, XScale, YScale) -> ok when
+-spec scale(This, XScale, YScale) -> 'ok' when
This::wxGraphicsMatrix(), XScale::number(), YScale::number().
scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
when is_number(XScale),is_number(YScale) ->
@@ -102,7 +102,7 @@ scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
<<ThisRef:32/?UI,0:32,XScale:64/?F,YScale:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsmatrix.html#wxgraphicsmatrixtranslate">external documentation</a>.
--spec translate(This, Dx, Dy) -> ok when
+-spec translate(This, Dx, Dy) -> 'ok' when
This::wxGraphicsMatrix(), Dx::number(), Dy::number().
translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
when is_number(Dx),is_number(Dy) ->
@@ -111,7 +111,7 @@ translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
<<ThisRef:32/?UI,0:32,Dx:64/?F,Dy:64/?F>>).
%% @equiv set(This, [])
--spec set(This) -> ok when
+-spec set(This) -> 'ok' when
This::wxGraphicsMatrix().
set(This)
@@ -119,14 +119,14 @@ set(This)
set(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsmatrix.html#wxgraphicsmatrixset">external documentation</a>.
--spec set(This, [Option]) -> ok when
+-spec set(This, [Option]) -> 'ok' when
This::wxGraphicsMatrix(),
- Option :: {a, number()}
- | {b, number()}
- | {c, number()}
- | {d, number()}
- | {tx, number()}
- | {ty, number()}.
+ Option :: {'a', number()}
+ | {'b', number()}
+ | {'c', number()}
+ | {'d', number()}
+ | {'tx', number()}
+ | {'ty', number()}.
set(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsMatrix),
diff --git a/lib/wx/src/gen/wxGraphicsObject.erl b/lib/wx/src/gen/wxGraphicsObject.erl
index f0e4d94785..8657b8d2eb 100644
--- a/lib/wx/src/gen/wxGraphicsObject.erl
+++ b/lib/wx/src/gen/wxGraphicsObject.erl
@@ -52,7 +52,7 @@ isNull(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGraphicsObject()) -> ok.
+-spec destroy(This::wxGraphicsObject()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGraphicsObject),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGraphicsPath.erl b/lib/wx/src/gen/wxGraphicsPath.erl
index b2f7cd1785..266271d537 100644
--- a/lib/wx/src/gen/wxGraphicsPath.erl
+++ b/lib/wx/src/gen/wxGraphicsPath.erl
@@ -44,7 +44,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxGraphicsPath() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathmovetopoint">external documentation</a>.
--spec moveToPoint(This, P) -> ok when
+-spec moveToPoint(This, P) -> 'ok' when
This::wxGraphicsPath(), P::{X::float(), Y::float()}.
moveToPoint(#wx_ref{type=ThisT,ref=ThisRef},{PX,PY})
when is_number(PX),is_number(PY) ->
@@ -53,7 +53,7 @@ moveToPoint(#wx_ref{type=ThisT,ref=ThisRef},{PX,PY})
<<ThisRef:32/?UI,0:32,PX:64/?F,PY:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathmovetopoint">external documentation</a>.
--spec moveToPoint(This, X, Y) -> ok when
+-spec moveToPoint(This, X, Y) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number().
moveToPoint(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_number(X),is_number(Y) ->
@@ -62,7 +62,7 @@ moveToPoint(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddarc">external documentation</a>.
--spec addArc(This, C, R, StartAngle, EndAngle, Clockwise) -> ok when
+-spec addArc(This, C, R, StartAngle, EndAngle, Clockwise) -> 'ok' when
This::wxGraphicsPath(), C::{X::float(), Y::float()}, R::number(), StartAngle::number(), EndAngle::number(), Clockwise::boolean().
addArc(#wx_ref{type=ThisT,ref=ThisRef},{CX,CY},R,StartAngle,EndAngle,Clockwise)
when is_number(CX),is_number(CY),is_number(R),is_number(StartAngle),is_number(EndAngle),is_boolean(Clockwise) ->
@@ -71,7 +71,7 @@ addArc(#wx_ref{type=ThisT,ref=ThisRef},{CX,CY},R,StartAngle,EndAngle,Clockwise)
<<ThisRef:32/?UI,0:32,CX:64/?F,CY:64/?F,R:64/?F,StartAngle:64/?F,EndAngle:64/?F,(wxe_util:from_bool(Clockwise)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddarc">external documentation</a>.
--spec addArc(This, X, Y, R, StartAngle, EndAngle, Clockwise) -> ok when
+-spec addArc(This, X, Y, R, StartAngle, EndAngle, Clockwise) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number(), R::number(), StartAngle::number(), EndAngle::number(), Clockwise::boolean().
addArc(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,StartAngle,EndAngle,Clockwise)
when is_number(X),is_number(Y),is_number(R),is_number(StartAngle),is_number(EndAngle),is_boolean(Clockwise) ->
@@ -80,7 +80,7 @@ addArc(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,StartAngle,EndAngle,Clockwise)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,R:64/?F,StartAngle:64/?F,EndAngle:64/?F,(wxe_util:from_bool(Clockwise)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddarctopoint">external documentation</a>.
--spec addArcToPoint(This, X1, Y1, X2, Y2, R) -> ok when
+-spec addArcToPoint(This, X1, Y1, X2, Y2, R) -> 'ok' when
This::wxGraphicsPath(), X1::number(), Y1::number(), X2::number(), Y2::number(), R::number().
addArcToPoint(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2,R)
when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2),is_number(R) ->
@@ -89,7 +89,7 @@ addArcToPoint(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2,R)
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F,R:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddcircle">external documentation</a>.
--spec addCircle(This, X, Y, R) -> ok when
+-spec addCircle(This, X, Y, R) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number(), R::number().
addCircle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R)
when is_number(X),is_number(Y),is_number(R) ->
@@ -98,7 +98,7 @@ addCircle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,R:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddcurvetopoint">external documentation</a>.
--spec addCurveToPoint(This, C1, C2, E) -> ok when
+-spec addCurveToPoint(This, C1, C2, E) -> 'ok' when
This::wxGraphicsPath(), C1::{X::float(), Y::float()}, C2::{X::float(), Y::float()}, E::{X::float(), Y::float()}.
addCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},{C1X,C1Y},{C2X,C2Y},{EX,EY})
when is_number(C1X),is_number(C1Y),is_number(C2X),is_number(C2Y),is_number(EX),is_number(EY) ->
@@ -107,7 +107,7 @@ addCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},{C1X,C1Y},{C2X,C2Y},{EX,EY})
<<ThisRef:32/?UI,0:32,C1X:64/?F,C1Y:64/?F,C2X:64/?F,C2Y:64/?F,EX:64/?F,EY:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddcurvetopoint">external documentation</a>.
--spec addCurveToPoint(This, Cx1, Cy1, Cx2, Cy2, X, Y) -> ok when
+-spec addCurveToPoint(This, Cx1, Cy1, Cx2, Cy2, X, Y) -> 'ok' when
This::wxGraphicsPath(), Cx1::number(), Cy1::number(), Cx2::number(), Cy2::number(), X::number(), Y::number().
addCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},Cx1,Cy1,Cx2,Cy2,X,Y)
when is_number(Cx1),is_number(Cy1),is_number(Cx2),is_number(Cy2),is_number(X),is_number(Y) ->
@@ -116,7 +116,7 @@ addCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},Cx1,Cy1,Cx2,Cy2,X,Y)
<<ThisRef:32/?UI,0:32,Cx1:64/?F,Cy1:64/?F,Cx2:64/?F,Cy2:64/?F,X:64/?F,Y:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddellipse">external documentation</a>.
--spec addEllipse(This, X, Y, W, H) -> ok when
+-spec addEllipse(This, X, Y, W, H) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number(), W::number(), H::number().
addEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -125,7 +125,7 @@ addEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddlinetopoint">external documentation</a>.
--spec addLineToPoint(This, P) -> ok when
+-spec addLineToPoint(This, P) -> 'ok' when
This::wxGraphicsPath(), P::{X::float(), Y::float()}.
addLineToPoint(#wx_ref{type=ThisT,ref=ThisRef},{PX,PY})
when is_number(PX),is_number(PY) ->
@@ -134,7 +134,7 @@ addLineToPoint(#wx_ref{type=ThisT,ref=ThisRef},{PX,PY})
<<ThisRef:32/?UI,0:32,PX:64/?F,PY:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddlinetopoint">external documentation</a>.
--spec addLineToPoint(This, X, Y) -> ok when
+-spec addLineToPoint(This, X, Y) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number().
addLineToPoint(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_number(X),is_number(Y) ->
@@ -143,7 +143,7 @@ addLineToPoint(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddpath">external documentation</a>.
--spec addPath(This, Path) -> ok when
+-spec addPath(This, Path) -> 'ok' when
This::wxGraphicsPath(), Path::wxGraphicsPath().
addPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}) ->
?CLASS(ThisT,wxGraphicsPath),
@@ -152,7 +152,7 @@ addPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}) ->
<<ThisRef:32/?UI,PathRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddquadcurvetopoint">external documentation</a>.
--spec addQuadCurveToPoint(This, Cx, Cy, X, Y) -> ok when
+-spec addQuadCurveToPoint(This, Cx, Cy, X, Y) -> 'ok' when
This::wxGraphicsPath(), Cx::number(), Cy::number(), X::number(), Y::number().
addQuadCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},Cx,Cy,X,Y)
when is_number(Cx),is_number(Cy),is_number(X),is_number(Y) ->
@@ -161,7 +161,7 @@ addQuadCurveToPoint(#wx_ref{type=ThisT,ref=ThisRef},Cx,Cy,X,Y)
<<ThisRef:32/?UI,0:32,Cx:64/?F,Cy:64/?F,X:64/?F,Y:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddrectangle">external documentation</a>.
--spec addRectangle(This, X, Y, W, H) -> ok when
+-spec addRectangle(This, X, Y, W, H) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number(), W::number(), H::number().
addRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_number(X),is_number(Y),is_number(W),is_number(H) ->
@@ -170,7 +170,7 @@ addRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathaddroundedrectangle">external documentation</a>.
--spec addRoundedRectangle(This, X, Y, W, H, Radius) -> ok when
+-spec addRoundedRectangle(This, X, Y, W, H, Radius) -> 'ok' when
This::wxGraphicsPath(), X::number(), Y::number(), W::number(), H::number(), Radius::number().
addRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
when is_number(X),is_number(Y),is_number(W),is_number(H),is_number(Radius) ->
@@ -179,7 +179,7 @@ addRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F,Radius:64/?F>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathclosesubpath">external documentation</a>.
--spec closeSubpath(This) -> ok when
+-spec closeSubpath(This) -> 'ok' when
This::wxGraphicsPath().
closeSubpath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsPath),
@@ -198,14 +198,14 @@ contains(This,C={CX,CY})
%% <br /> Also:<br />
%% contains(This, C, [Option]) -> boolean() when<br />
%% This::wxGraphicsPath(), C::{X::float(), Y::float()},<br />
-%% Option :: {fillStyle, wx:wx_enum()}.<br />
+%% Option :: {'fillStyle', wx:wx_enum()}.<br />
%%
%%<br /> FillStyle = integer
-spec contains(This, X, Y) -> boolean() when
This::wxGraphicsPath(), X::number(), Y::number();
(This, C, [Option]) -> boolean() when
This::wxGraphicsPath(), C::{X::float(), Y::float()},
- Option :: {fillStyle, wx:wx_enum()}.
+ Option :: {'fillStyle', wx:wx_enum()}.
contains(This,X,Y)
when is_record(This, wx_ref),is_number(X),is_number(Y) ->
@@ -223,7 +223,7 @@ contains(#wx_ref{type=ThisT,ref=ThisRef},{CX,CY}, Options)
%%<br /> FillStyle = integer
-spec contains(This, X, Y, [Option]) -> boolean() when
This::wxGraphicsPath(), X::number(), Y::number(),
- Option :: {fillStyle, wx:wx_enum()}.
+ Option :: {'fillStyle', wx:wx_enum()}.
contains(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
when is_number(X),is_number(Y),is_list(Options) ->
?CLASS(ThisT,wxGraphicsPath),
@@ -250,7 +250,7 @@ getCurrentPoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicspath.html#wxgraphicspathtransform">external documentation</a>.
--spec transform(This, Matrix) -> ok when
+-spec transform(This, Matrix) -> 'ok' when
This::wxGraphicsPath(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
transform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsPath),
diff --git a/lib/wx/src/gen/wxGraphicsRenderer.erl b/lib/wx/src/gen/wxGraphicsRenderer.erl
index c28222fe24..a1b67476e3 100644
--- a/lib/wx/src/gen/wxGraphicsRenderer.erl
+++ b/lib/wx/src/gen/wxGraphicsRenderer.erl
@@ -106,7 +106,7 @@ createFont(This,Font)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatefont">external documentation</a>.
-spec createFont(This, Font, [Option]) -> wxGraphicsFont:wxGraphicsFont() when
This::wxGraphicsRenderer(), Font::wxFont:wxFont(),
- Option :: {col, wx:wx_colour()}.
+ Option :: {'col', wx:wx_colour()}.
createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsRenderer),
@@ -128,12 +128,12 @@ createMatrix(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatematrix">external documentation</a>.
-spec createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix() when
This::wxGraphicsRenderer(),
- Option :: {a, number()}
- | {b, number()}
- | {c, number()}
- | {d, number()}
- | {tx, number()}
- | {ty, number()}.
+ Option :: {'a', number()}
+ | {'b', number()}
+ | {'c', number()}
+ | {'d', number()}
+ | {'tx', number()}
+ | {'ty', number()}.
createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsRenderer),
diff --git a/lib/wx/src/gen/wxGrid.erl b/lib/wx/src/gen/wxGrid.erl
index 49bd89f188..a1533cbd9f 100644
--- a/lib/wx/src/gen/wxGrid.erl
+++ b/lib/wx/src/gen/wxGrid.erl
@@ -154,17 +154,17 @@ new(Parent,Id)
%% <br /> Also:<br />
%% new(Parent, Id, [Option]) -> wxGrid() when<br />
%% Parent::wxWindow:wxWindow(), Id::integer(),<br />
-%% Option :: {pos, {X::integer(), Y::integer()}}<br />
-%% | {size, {W::integer(), H::integer()}}<br />
-%% | {style, integer()}.<br />
+%% Option :: {'pos', {X::integer(), Y::integer()}}<br />
+%% | {'size', {W::integer(), H::integer()}}<br />
+%% | {'style', integer()}.<br />
%%
-spec new(Parent, X, Y) -> wxGrid() when
Parent::wxWindow:wxWindow(), X::integer(), Y::integer();
(Parent, Id, [Option]) -> wxGrid() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(Parent,X,Y)
when is_record(Parent, wx_ref),is_integer(X),is_integer(Y) ->
@@ -183,9 +183,9 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridwxgrid">external documentation</a>.
-spec new(Parent, X, Y, [Option]) -> wxGrid() when
Parent::wxWindow:wxWindow(), X::integer(), Y::integer(),
- Option :: {w, integer()}
- | {h, integer()}
- | {style, integer()}.
+ Option :: {'w', integer()}
+ | {'h', integer()}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},X,Y, Options)
when is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -208,8 +208,8 @@ appendCols(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridappendcols">external documentation</a>.
-spec appendCols(This, [Option]) -> boolean() when
This::wxGrid(),
- Option :: {numCols, integer()}
- | {updateLabels, boolean()}.
+ Option :: {'numCols', integer()}
+ | {'updateLabels', boolean()}.
appendCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -231,8 +231,8 @@ appendRows(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridappendrows">external documentation</a>.
-spec appendRows(This, [Option]) -> boolean() when
This::wxGrid(),
- Option :: {numRows, integer()}
- | {updateLabels, boolean()}.
+ Option :: {'numRows', integer()}
+ | {'updateLabels', boolean()}.
appendRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -244,7 +244,7 @@ appendRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridautosize">external documentation</a>.
--spec autoSize(This) -> ok when
+-spec autoSize(This) -> 'ok' when
This::wxGrid().
autoSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -252,7 +252,7 @@ autoSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv autoSizeColumn(This,Col, [])
--spec autoSizeColumn(This, Col) -> ok when
+-spec autoSizeColumn(This, Col) -> 'ok' when
This::wxGrid(), Col::integer().
autoSizeColumn(This,Col)
@@ -260,9 +260,9 @@ autoSizeColumn(This,Col)
autoSizeColumn(This,Col, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridautosizecolumn">external documentation</a>.
--spec autoSizeColumn(This, Col, [Option]) -> ok when
+-spec autoSizeColumn(This, Col, [Option]) -> 'ok' when
This::wxGrid(), Col::integer(),
- Option :: {setAsMin, boolean()}.
+ Option :: {'setAsMin', boolean()}.
autoSizeColumn(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
when is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -273,7 +273,7 @@ autoSizeColumn(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
<<ThisRef:32/?UI,Col:32/?UI, BinOpt/binary>>).
%% @equiv autoSizeColumns(This, [])
--spec autoSizeColumns(This) -> ok when
+-spec autoSizeColumns(This) -> 'ok' when
This::wxGrid().
autoSizeColumns(This)
@@ -281,9 +281,9 @@ autoSizeColumns(This)
autoSizeColumns(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridautosizecolumns">external documentation</a>.
--spec autoSizeColumns(This, [Option]) -> ok when
+-spec autoSizeColumns(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {setAsMin, boolean()}.
+ Option :: {'setAsMin', boolean()}.
autoSizeColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -294,7 +294,7 @@ autoSizeColumns(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv autoSizeRow(This,Row, [])
--spec autoSizeRow(This, Row) -> ok when
+-spec autoSizeRow(This, Row) -> 'ok' when
This::wxGrid(), Row::integer().
autoSizeRow(This,Row)
@@ -302,9 +302,9 @@ autoSizeRow(This,Row)
autoSizeRow(This,Row, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridautosizerow">external documentation</a>.
--spec autoSizeRow(This, Row, [Option]) -> ok when
+-spec autoSizeRow(This, Row, [Option]) -> 'ok' when
This::wxGrid(), Row::integer(),
- Option :: {setAsMin, boolean()}.
+ Option :: {'setAsMin', boolean()}.
autoSizeRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
when is_integer(Row),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -315,7 +315,7 @@ autoSizeRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
<<ThisRef:32/?UI,Row:32/?UI, BinOpt/binary>>).
%% @equiv autoSizeRows(This, [])
--spec autoSizeRows(This) -> ok when
+-spec autoSizeRows(This) -> 'ok' when
This::wxGrid().
autoSizeRows(This)
@@ -323,9 +323,9 @@ autoSizeRows(This)
autoSizeRows(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridautosizerows">external documentation</a>.
--spec autoSizeRows(This, [Option]) -> ok when
+-spec autoSizeRows(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {setAsMin, boolean()}.
+ Option :: {'setAsMin', boolean()}.
autoSizeRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -336,7 +336,7 @@ autoSizeRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridbeginbatch">external documentation</a>.
--spec beginBatch(This) -> ok when
+-spec beginBatch(This) -> 'ok' when
This::wxGrid().
beginBatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -403,7 +403,7 @@ cellToRect(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridcleargrid">external documentation</a>.
--spec clearGrid(This) -> ok when
+-spec clearGrid(This) -> 'ok' when
This::wxGrid().
clearGrid(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -411,7 +411,7 @@ clearGrid(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridclearselection">external documentation</a>.
--spec clearSelection(This) -> ok when
+-spec clearSelection(This) -> 'ok' when
This::wxGrid().
clearSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -430,7 +430,7 @@ createGrid(This,NumRows,NumCols)
%%<br /> Selmode = ?wxGrid_wxGridSelectCells | ?wxGrid_wxGridSelectRows | ?wxGrid_wxGridSelectColumns
-spec createGrid(This, NumRows, NumCols, [Option]) -> boolean() when
This::wxGrid(), NumRows::integer(), NumCols::integer(),
- Option :: {selmode, wx:wx_enum()}.
+ Option :: {'selmode', wx:wx_enum()}.
createGrid(#wx_ref{type=ThisT,ref=ThisRef},NumRows,NumCols, Options)
when is_integer(NumRows),is_integer(NumCols),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -451,9 +451,9 @@ deleteCols(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgriddeletecols">external documentation</a>.
-spec deleteCols(This, [Option]) -> boolean() when
This::wxGrid(),
- Option :: {pos, integer()}
- | {numCols, integer()}
- | {updateLabels, boolean()}.
+ Option :: {'pos', integer()}
+ | {'numCols', integer()}
+ | {'updateLabels', boolean()}.
deleteCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -476,9 +476,9 @@ deleteRows(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgriddeleterows">external documentation</a>.
-spec deleteRows(This, [Option]) -> boolean() when
This::wxGrid(),
- Option :: {pos, integer()}
- | {numRows, integer()}
- | {updateLabels, boolean()}.
+ Option :: {'pos', integer()}
+ | {'numRows', integer()}
+ | {'updateLabels', boolean()}.
deleteRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -491,7 +491,7 @@ deleteRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgriddisablecelleditcontrol">external documentation</a>.
--spec disableCellEditControl(This) -> ok when
+-spec disableCellEditControl(This) -> 'ok' when
This::wxGrid().
disableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -499,7 +499,7 @@ disableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgriddisabledragcolsize">external documentation</a>.
--spec disableDragColSize(This) -> ok when
+-spec disableDragColSize(This) -> 'ok' when
This::wxGrid().
disableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -507,7 +507,7 @@ disableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgriddisabledraggridsize">external documentation</a>.
--spec disableDragGridSize(This) -> ok when
+-spec disableDragGridSize(This) -> 'ok' when
This::wxGrid().
disableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -515,7 +515,7 @@ disableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgriddisabledragrowsize">external documentation</a>.
--spec disableDragRowSize(This) -> ok when
+-spec disableDragRowSize(This) -> 'ok' when
This::wxGrid().
disableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -523,7 +523,7 @@ disableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv enableCellEditControl(This, [])
--spec enableCellEditControl(This) -> ok when
+-spec enableCellEditControl(This) -> 'ok' when
This::wxGrid().
enableCellEditControl(This)
@@ -531,9 +531,9 @@ enableCellEditControl(This)
enableCellEditControl(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridenablecelleditcontrol">external documentation</a>.
--spec enableCellEditControl(This, [Option]) -> ok when
+-spec enableCellEditControl(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -544,7 +544,7 @@ enableCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv enableDragColSize(This, [])
--spec enableDragColSize(This) -> ok when
+-spec enableDragColSize(This) -> 'ok' when
This::wxGrid().
enableDragColSize(This)
@@ -552,9 +552,9 @@ enableDragColSize(This)
enableDragColSize(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridenabledragcolsize">external documentation</a>.
--spec enableDragColSize(This, [Option]) -> ok when
+-spec enableDragColSize(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -565,7 +565,7 @@ enableDragColSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv enableDragGridSize(This, [])
--spec enableDragGridSize(This) -> ok when
+-spec enableDragGridSize(This) -> 'ok' when
This::wxGrid().
enableDragGridSize(This)
@@ -573,9 +573,9 @@ enableDragGridSize(This)
enableDragGridSize(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridenabledraggridsize">external documentation</a>.
--spec enableDragGridSize(This, [Option]) -> ok when
+-spec enableDragGridSize(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -586,7 +586,7 @@ enableDragGridSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv enableDragRowSize(This, [])
--spec enableDragRowSize(This) -> ok when
+-spec enableDragRowSize(This) -> 'ok' when
This::wxGrid().
enableDragRowSize(This)
@@ -594,9 +594,9 @@ enableDragRowSize(This)
enableDragRowSize(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridenabledragrowsize">external documentation</a>.
--spec enableDragRowSize(This, [Option]) -> ok when
+-spec enableDragRowSize(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -607,7 +607,7 @@ enableDragRowSize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridenableediting">external documentation</a>.
--spec enableEditing(This, Edit) -> ok when
+-spec enableEditing(This, Edit) -> 'ok' when
This::wxGrid(), Edit::boolean().
enableEditing(#wx_ref{type=ThisT,ref=ThisRef},Edit)
when is_boolean(Edit) ->
@@ -616,7 +616,7 @@ enableEditing(#wx_ref{type=ThisT,ref=ThisRef},Edit)
<<ThisRef:32/?UI,(wxe_util:from_bool(Edit)):32/?UI>>).
%% @equiv enableGridLines(This, [])
--spec enableGridLines(This) -> ok when
+-spec enableGridLines(This) -> 'ok' when
This::wxGrid().
enableGridLines(This)
@@ -624,9 +624,9 @@ enableGridLines(This)
enableGridLines(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridenablegridlines">external documentation</a>.
--spec enableGridLines(This, [Option]) -> ok when
+-spec enableGridLines(This, [Option]) -> 'ok' when
This::wxGrid(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enableGridLines(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -637,7 +637,7 @@ enableGridLines(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridendbatch">external documentation</a>.
--spec endBatch(This) -> ok when
+-spec endBatch(This) -> 'ok' when
This::wxGrid().
endBatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -645,7 +645,7 @@ endBatch(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridfit">external documentation</a>.
--spec fit(This) -> ok when
+-spec fit(This) -> 'ok' when
This::wxGrid().
fit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -653,7 +653,7 @@ fit(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridforcerefresh">external documentation</a>.
--spec forceRefresh(This) -> ok when
+-spec forceRefresh(This) -> 'ok' when
This::wxGrid().
forceRefresh(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1136,7 +1136,7 @@ getGridCornerLabelWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridhidecelleditcontrol">external documentation</a>.
--spec hideCellEditControl(This) -> ok when
+-spec hideCellEditControl(This) -> 'ok' when
This::wxGrid().
hideCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1154,9 +1154,9 @@ insertCols(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridinsertcols">external documentation</a>.
-spec insertCols(This, [Option]) -> boolean() when
This::wxGrid(),
- Option :: {pos, integer()}
- | {numCols, integer()}
- | {updateLabels, boolean()}.
+ Option :: {'pos', integer()}
+ | {'numCols', integer()}
+ | {'updateLabels', boolean()}.
insertCols(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1179,9 +1179,9 @@ insertRows(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridinsertrows">external documentation</a>.
-spec insertRows(This, [Option]) -> boolean() when
This::wxGrid(),
- Option :: {pos, integer()}
- | {numRows, integer()}
- | {updateLabels, boolean()}.
+ Option :: {'pos', integer()}
+ | {'numRows', integer()}
+ | {'updateLabels', boolean()}.
insertRows(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1264,13 +1264,13 @@ isVisible(This,Coords={CoordsR,CoordsC})
%% <br /> Also:<br />
%% isVisible(This, Coords, [Option]) -> boolean() when<br />
%% This::wxGrid(), Coords::{R::integer(), C::integer()},<br />
-%% Option :: {wholeCellVisible, boolean()}.<br />
+%% Option :: {'wholeCellVisible', boolean()}.<br />
%%
-spec isVisible(This, Row, Col) -> boolean() when
This::wxGrid(), Row::integer(), Col::integer();
(This, Coords, [Option]) -> boolean() when
This::wxGrid(), Coords::{R::integer(), C::integer()},
- Option :: {wholeCellVisible, boolean()}.
+ Option :: {'wholeCellVisible', boolean()}.
isVisible(This,Row,Col)
when is_record(This, wx_ref),is_integer(Row),is_integer(Col) ->
@@ -1287,7 +1287,7 @@ isVisible(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC}, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridisvisible">external documentation</a>.
-spec isVisible(This, Row, Col, [Option]) -> boolean() when
This::wxGrid(), Row::integer(), Col::integer(),
- Option :: {wholeCellVisible, boolean()}.
+ Option :: {'wholeCellVisible', boolean()}.
isVisible(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
when is_integer(Row),is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1298,7 +1298,7 @@ isVisible(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridmakecellvisible">external documentation</a>.
--spec makeCellVisible(This, Coords) -> ok when
+-spec makeCellVisible(This, Coords) -> 'ok' when
This::wxGrid(), Coords::{R::integer(), C::integer()}.
makeCellVisible(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC})
when is_integer(CoordsR),is_integer(CoordsC) ->
@@ -1307,7 +1307,7 @@ makeCellVisible(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC})
<<ThisRef:32/?UI,CoordsR:32/?UI,CoordsC:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridmakecellvisible">external documentation</a>.
--spec makeCellVisible(This, Row, Col) -> ok when
+-spec makeCellVisible(This, Row, Col) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer().
makeCellVisible(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
@@ -1404,7 +1404,7 @@ movePageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridregisterdatatype">external documentation</a>.
--spec registerDataType(This, TypeName, Renderer, Editor) -> ok when
+-spec registerDataType(This, TypeName, Renderer, Editor) -> 'ok' when
This::wxGrid(), TypeName::unicode:chardata(), Renderer::wxGridCellRenderer:wxGridCellRenderer(), Editor::wxGridCellEditor:wxGridCellEditor().
registerDataType(#wx_ref{type=ThisT,ref=ThisRef},TypeName,#wx_ref{type=RendererT,ref=RendererRef},#wx_ref{type=EditorT,ref=EditorRef})
when is_list(TypeName) ->
@@ -1416,7 +1416,7 @@ registerDataType(#wx_ref{type=ThisT,ref=ThisRef},TypeName,#wx_ref{type=RendererT
<<ThisRef:32/?UI,(byte_size(TypeName_UC)):32/?UI,(TypeName_UC)/binary, 0:(((8- ((0+byte_size(TypeName_UC)) band 16#7)) band 16#7))/unit:8,RendererRef:32/?UI,EditorRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsaveeditcontrolvalue">external documentation</a>.
--spec saveEditControlValue(This) -> ok when
+-spec saveEditControlValue(This) -> 'ok' when
This::wxGrid().
saveEditControlValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1424,7 +1424,7 @@ saveEditControlValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridselectall">external documentation</a>.
--spec selectAll(This) -> ok when
+-spec selectAll(This) -> 'ok' when
This::wxGrid().
selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1432,7 +1432,7 @@ selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv selectBlock(This,TopLeft,BottomRight, [])
--spec selectBlock(This, TopLeft, BottomRight) -> ok when
+-spec selectBlock(This, TopLeft, BottomRight) -> 'ok' when
This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()}.
selectBlock(This,TopLeft={TopLeftR,TopLeftC},BottomRight={BottomRightR,BottomRightC})
@@ -1440,9 +1440,9 @@ selectBlock(This,TopLeft={TopLeftR,TopLeftC},BottomRight={BottomRightR,BottomRig
selectBlock(This,TopLeft,BottomRight, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridselectblock">external documentation</a>.
--spec selectBlock(This, TopLeft, BottomRight, [Option]) -> ok when
+-spec selectBlock(This, TopLeft, BottomRight, [Option]) -> 'ok' when
This::wxGrid(), TopLeft::{R::integer(), C::integer()}, BottomRight::{R::integer(), C::integer()},
- Option :: {addToSelected, boolean()}.
+ Option :: {'addToSelected', boolean()}.
selectBlock(#wx_ref{type=ThisT,ref=ThisRef},{TopLeftR,TopLeftC},{BottomRightR,BottomRightC}, Options)
when is_integer(TopLeftR),is_integer(TopLeftC),is_integer(BottomRightR),is_integer(BottomRightC),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1453,7 +1453,7 @@ selectBlock(#wx_ref{type=ThisT,ref=ThisRef},{TopLeftR,TopLeftC},{BottomRightR,Bo
<<ThisRef:32/?UI,TopLeftR:32/?UI,TopLeftC:32/?UI,BottomRightR:32/?UI,BottomRightC:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv selectBlock(This,TopRow,LeftCol,BottomRow,RightCol, [])
--spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol) -> ok when
+-spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol) -> 'ok' when
This::wxGrid(), TopRow::integer(), LeftCol::integer(), BottomRow::integer(), RightCol::integer().
selectBlock(This,TopRow,LeftCol,BottomRow,RightCol)
@@ -1461,9 +1461,9 @@ selectBlock(This,TopRow,LeftCol,BottomRow,RightCol)
selectBlock(This,TopRow,LeftCol,BottomRow,RightCol, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridselectblock">external documentation</a>.
--spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol, [Option]) -> ok when
+-spec selectBlock(This, TopRow, LeftCol, BottomRow, RightCol, [Option]) -> 'ok' when
This::wxGrid(), TopRow::integer(), LeftCol::integer(), BottomRow::integer(), RightCol::integer(),
- Option :: {addToSelected, boolean()}.
+ Option :: {'addToSelected', boolean()}.
selectBlock(#wx_ref{type=ThisT,ref=ThisRef},TopRow,LeftCol,BottomRow,RightCol, Options)
when is_integer(TopRow),is_integer(LeftCol),is_integer(BottomRow),is_integer(RightCol),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1474,7 +1474,7 @@ selectBlock(#wx_ref{type=ThisT,ref=ThisRef},TopRow,LeftCol,BottomRow,RightCol, O
<<ThisRef:32/?UI,TopRow:32/?UI,LeftCol:32/?UI,BottomRow:32/?UI,RightCol:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv selectCol(This,Col, [])
--spec selectCol(This, Col) -> ok when
+-spec selectCol(This, Col) -> 'ok' when
This::wxGrid(), Col::integer().
selectCol(This,Col)
@@ -1482,9 +1482,9 @@ selectCol(This,Col)
selectCol(This,Col, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridselectcol">external documentation</a>.
--spec selectCol(This, Col, [Option]) -> ok when
+-spec selectCol(This, Col, [Option]) -> 'ok' when
This::wxGrid(), Col::integer(),
- Option :: {addToSelected, boolean()}.
+ Option :: {'addToSelected', boolean()}.
selectCol(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
when is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1495,7 +1495,7 @@ selectCol(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
<<ThisRef:32/?UI,Col:32/?UI, BinOpt/binary>>).
%% @equiv selectRow(This,Row, [])
--spec selectRow(This, Row) -> ok when
+-spec selectRow(This, Row) -> 'ok' when
This::wxGrid(), Row::integer().
selectRow(This,Row)
@@ -1503,9 +1503,9 @@ selectRow(This,Row)
selectRow(This,Row, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridselectrow">external documentation</a>.
--spec selectRow(This, Row, [Option]) -> ok when
+-spec selectRow(This, Row, [Option]) -> 'ok' when
This::wxGrid(), Row::integer(),
- Option :: {addToSelected, boolean()}.
+ Option :: {'addToSelected', boolean()}.
selectRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
when is_integer(Row),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1516,7 +1516,7 @@ selectRow(#wx_ref{type=ThisT,ref=ThisRef},Row, Options)
<<ThisRef:32/?UI,Row:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellalignment">external documentation</a>.
--spec setCellAlignment(This, Align) -> ok when
+-spec setCellAlignment(This, Align) -> 'ok' when
This::wxGrid(), Align::integer().
setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align)
when is_integer(Align) ->
@@ -1525,7 +1525,7 @@ setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align)
<<ThisRef:32/?UI,Align:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellalignment">external documentation</a>.
--spec setCellAlignment(This, Align, Row, Col) -> ok when
+-spec setCellAlignment(This, Align, Row, Col) -> 'ok' when
This::wxGrid(), Align::integer(), Row::integer(), Col::integer().
setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align,Row,Col)
when is_integer(Align),is_integer(Row),is_integer(Col) ->
@@ -1534,7 +1534,7 @@ setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align,Row,Col)
<<ThisRef:32/?UI,Align:32/?UI,Row:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellalignment">external documentation</a>.
--spec setCellAlignment(This, Row, Col, Horiz, Vert) -> ok when
+-spec setCellAlignment(This, Row, Col, Horiz, Vert) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), Horiz::integer(), Vert::integer().
setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Horiz,Vert)
when is_integer(Row),is_integer(Col),is_integer(Horiz),is_integer(Vert) ->
@@ -1543,7 +1543,7 @@ setCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Horiz,Vert)
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellbackgroundcolour">external documentation</a>.
--spec setCellBackgroundColour(This, Col) -> ok when
+-spec setCellBackgroundColour(This, Col) -> 'ok' when
This::wxGrid(), Col::wx:wx_colour().
setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -1553,12 +1553,12 @@ setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellbackgroundcolour">external documentation</a>.
%% <br /> Also:<br />
-%% setCellBackgroundColour(This, Colour, Row, Col) -> ok when<br />
+%% setCellBackgroundColour(This, Colour, Row, Col) -> 'ok' when<br />
%% This::wxGrid(), Colour::wx:wx_colour(), Row::integer(), Col::integer().<br />
%%
--spec setCellBackgroundColour(This, Row, Col, Val) -> ok when
+-spec setCellBackgroundColour(This, Row, Col, Val) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), Val::wx:wx_colour();
- (This, Colour, Row, Col) -> ok when
+ (This, Colour, Row, Col) -> 'ok' when
This::wxGrid(), Colour::wx:wx_colour(), Row::integer(), Col::integer().
setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Val)
when is_integer(Row),is_integer(Col),tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1572,7 +1572,7 @@ setCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour,Row,Col)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary,Row:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcelleditor">external documentation</a>.
--spec setCellEditor(This, Row, Col, Editor) -> ok when
+-spec setCellEditor(This, Row, Col, Editor) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), Editor::wxGridCellEditor:wxGridCellEditor().
setCellEditor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=EditorT,ref=EditorRef})
when is_integer(Row),is_integer(Col) ->
@@ -1582,7 +1582,7 @@ setCellEditor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=EditorT,ref=E
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,EditorRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellfont">external documentation</a>.
--spec setCellFont(This, Row, Col, Val) -> ok when
+-spec setCellFont(This, Row, Col, Val) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), Val::wxFont:wxFont().
setCellFont(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=ValT,ref=ValRef})
when is_integer(Row),is_integer(Col) ->
@@ -1592,7 +1592,7 @@ setCellFont(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=ValT,ref=ValRef
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,ValRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellrenderer">external documentation</a>.
--spec setCellRenderer(This, Row, Col, Renderer) -> ok when
+-spec setCellRenderer(This, Row, Col, Renderer) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), Renderer::wxGridCellRenderer:wxGridCellRenderer().
setCellRenderer(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=RendererT,ref=RendererRef})
when is_integer(Row),is_integer(Col) ->
@@ -1602,7 +1602,7 @@ setCellRenderer(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=RendererT,r
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,RendererRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcelltextcolour">external documentation</a>.
--spec setCellTextColour(This, Col) -> ok when
+-spec setCellTextColour(This, Col) -> 'ok' when
This::wxGrid(), Col::wx:wx_colour().
setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -1612,12 +1612,12 @@ setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcelltextcolour">external documentation</a>.
%% <br /> Also:<br />
-%% setCellTextColour(This, Val, Row, Col) -> ok when<br />
+%% setCellTextColour(This, Val, Row, Col) -> 'ok' when<br />
%% This::wxGrid(), Val::wx:wx_colour(), Row::integer(), Col::integer().<br />
%%
--spec setCellTextColour(This, Row, Col, Val) -> ok when
+-spec setCellTextColour(This, Row, Col, Val) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), Val::wx:wx_colour();
- (This, Val, Row, Col) -> ok when
+ (This, Val, Row, Col) -> 'ok' when
This::wxGrid(), Val::wx:wx_colour(), Row::integer(), Col::integer().
setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,Val)
when is_integer(Row),is_integer(Col),tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1631,7 +1631,7 @@ setCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val,Row,Col)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary,Row:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellvalue">external documentation</a>.
--spec setCellValue(This, Coords, S) -> ok when
+-spec setCellValue(This, Coords, S) -> 'ok' when
This::wxGrid(), Coords::{R::integer(), C::integer()}, S::unicode:chardata().
setCellValue(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC},S)
when is_integer(CoordsR),is_integer(CoordsC),is_list(S) ->
@@ -1642,12 +1642,12 @@ setCellValue(#wx_ref{type=ThisT,ref=ThisRef},{CoordsR,CoordsC},S)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcellvalue">external documentation</a>.
%% <br /> Also:<br />
-%% setCellValue(This, Val, Row, Col) -> ok when<br />
+%% setCellValue(This, Val, Row, Col) -> 'ok' when<br />
%% This::wxGrid(), Val::unicode:chardata(), Row::integer(), Col::integer().<br />
%%
--spec setCellValue(This, Row, Col, S) -> ok when
+-spec setCellValue(This, Row, Col, S) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(), S::unicode:chardata();
- (This, Val, Row, Col) -> ok when
+ (This, Val, Row, Col) -> 'ok' when
This::wxGrid(), Val::unicode:chardata(), Row::integer(), Col::integer().
setCellValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,S)
when is_integer(Row),is_integer(Col),is_list(S) ->
@@ -1663,7 +1663,7 @@ setCellValue(#wx_ref{type=ThisT,ref=ThisRef},Val,Row,Col)
<<ThisRef:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((0+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8,Row:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolattr">external documentation</a>.
--spec setColAttr(This, Col, Attr) -> ok when
+-spec setColAttr(This, Col, Attr) -> 'ok' when
This::wxGrid(), Col::integer(), Attr::wxGridCellAttr:wxGridCellAttr().
setColAttr(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(Col) ->
@@ -1673,7 +1673,7 @@ setColAttr(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=AttrT,ref=AttrRef})
<<ThisRef:32/?UI,Col:32/?UI,AttrRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolformatbool">external documentation</a>.
--spec setColFormatBool(This, Col) -> ok when
+-spec setColFormatBool(This, Col) -> 'ok' when
This::wxGrid(), Col::integer().
setColFormatBool(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
@@ -1682,7 +1682,7 @@ setColFormatBool(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolformatnumber">external documentation</a>.
--spec setColFormatNumber(This, Col) -> ok when
+-spec setColFormatNumber(This, Col) -> 'ok' when
This::wxGrid(), Col::integer().
setColFormatNumber(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
@@ -1691,7 +1691,7 @@ setColFormatNumber(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,Col:32/?UI>>).
%% @equiv setColFormatFloat(This,Col, [])
--spec setColFormatFloat(This, Col) -> ok when
+-spec setColFormatFloat(This, Col) -> 'ok' when
This::wxGrid(), Col::integer().
setColFormatFloat(This,Col)
@@ -1699,10 +1699,10 @@ setColFormatFloat(This,Col)
setColFormatFloat(This,Col, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolformatfloat">external documentation</a>.
--spec setColFormatFloat(This, Col, [Option]) -> ok when
+-spec setColFormatFloat(This, Col, [Option]) -> 'ok' when
This::wxGrid(), Col::integer(),
- Option :: {width, integer()}
- | {precision, integer()}.
+ Option :: {'width', integer()}
+ | {'precision', integer()}.
setColFormatFloat(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
when is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1714,7 +1714,7 @@ setColFormatFloat(#wx_ref{type=ThisT,ref=ThisRef},Col, Options)
<<ThisRef:32/?UI,Col:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolformatcustom">external documentation</a>.
--spec setColFormatCustom(This, Col, TypeName) -> ok when
+-spec setColFormatCustom(This, Col, TypeName) -> 'ok' when
This::wxGrid(), Col::integer(), TypeName::unicode:chardata().
setColFormatCustom(#wx_ref{type=ThisT,ref=ThisRef},Col,TypeName)
when is_integer(Col),is_list(TypeName) ->
@@ -1724,7 +1724,7 @@ setColFormatCustom(#wx_ref{type=ThisT,ref=ThisRef},Col,TypeName)
<<ThisRef:32/?UI,Col:32/?UI,(byte_size(TypeName_UC)):32/?UI,(TypeName_UC)/binary, 0:(((8- ((4+byte_size(TypeName_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcollabelalignment">external documentation</a>.
--spec setColLabelAlignment(This, Horiz, Vert) -> ok when
+-spec setColLabelAlignment(This, Horiz, Vert) -> 'ok' when
This::wxGrid(), Horiz::integer(), Vert::integer().
setColLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
when is_integer(Horiz),is_integer(Vert) ->
@@ -1733,7 +1733,7 @@ setColLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
<<ThisRef:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcollabelsize">external documentation</a>.
--spec setColLabelSize(This, Height) -> ok when
+-spec setColLabelSize(This, Height) -> 'ok' when
This::wxGrid(), Height::integer().
setColLabelSize(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
@@ -1742,7 +1742,7 @@ setColLabelSize(#wx_ref{type=ThisT,ref=ThisRef},Height)
<<ThisRef:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcollabelvalue">external documentation</a>.
--spec setColLabelValue(This, Col, Val) -> ok when
+-spec setColLabelValue(This, Col, Val) -> 'ok' when
This::wxGrid(), Col::integer(), Val::unicode:chardata().
setColLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Col,Val)
when is_integer(Col),is_list(Val) ->
@@ -1752,7 +1752,7 @@ setColLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Col,Val)
<<ThisRef:32/?UI,Col:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((4+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolminimalwidth">external documentation</a>.
--spec setColMinimalWidth(This, Col, Width) -> ok when
+-spec setColMinimalWidth(This, Col, Width) -> 'ok' when
This::wxGrid(), Col::integer(), Width::integer().
setColMinimalWidth(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
when is_integer(Col),is_integer(Width) ->
@@ -1761,7 +1761,7 @@ setColMinimalWidth(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
<<ThisRef:32/?UI,Col:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolminimalacceptablewidth">external documentation</a>.
--spec setColMinimalAcceptableWidth(This, Width) -> ok when
+-spec setColMinimalAcceptableWidth(This, Width) -> 'ok' when
This::wxGrid(), Width::integer().
setColMinimalAcceptableWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -1770,7 +1770,7 @@ setColMinimalAcceptableWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetcolsize">external documentation</a>.
--spec setColSize(This, Col, Width) -> ok when
+-spec setColSize(This, Col, Width) -> 'ok' when
This::wxGrid(), Col::integer(), Width::integer().
setColSize(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
when is_integer(Col),is_integer(Width) ->
@@ -1779,7 +1779,7 @@ setColSize(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
<<ThisRef:32/?UI,Col:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultcellalignment">external documentation</a>.
--spec setDefaultCellAlignment(This, Horiz, Vert) -> ok when
+-spec setDefaultCellAlignment(This, Horiz, Vert) -> 'ok' when
This::wxGrid(), Horiz::integer(), Vert::integer().
setDefaultCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
when is_integer(Horiz),is_integer(Vert) ->
@@ -1788,7 +1788,7 @@ setDefaultCellAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
<<ThisRef:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultcellbackgroundcolour">external documentation</a>.
--spec setDefaultCellBackgroundColour(This, Val) -> ok when
+-spec setDefaultCellBackgroundColour(This, Val) -> 'ok' when
This::wxGrid(), Val::wx:wx_colour().
setDefaultCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1797,7 +1797,7 @@ setDefaultCellBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultcellfont">external documentation</a>.
--spec setDefaultCellFont(This, Val) -> ok when
+-spec setDefaultCellFont(This, Val) -> 'ok' when
This::wxGrid(), Val::wxFont:wxFont().
setDefaultCellFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ValT,ref=ValRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1806,7 +1806,7 @@ setDefaultCellFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ValT,ref=ValRef}
<<ThisRef:32/?UI,ValRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultcelltextcolour">external documentation</a>.
--spec setDefaultCellTextColour(This, Val) -> ok when
+-spec setDefaultCellTextColour(This, Val) -> 'ok' when
This::wxGrid(), Val::wx:wx_colour().
setDefaultCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1815,7 +1815,7 @@ setDefaultCellTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaulteditor">external documentation</a>.
--spec setDefaultEditor(This, Editor) -> ok when
+-spec setDefaultEditor(This, Editor) -> 'ok' when
This::wxGrid(), Editor::wxGridCellEditor:wxGridCellEditor().
setDefaultEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EditorT,ref=EditorRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1824,7 +1824,7 @@ setDefaultEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EditorT,ref=Editor
<<ThisRef:32/?UI,EditorRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultrenderer">external documentation</a>.
--spec setDefaultRenderer(This, Renderer) -> ok when
+-spec setDefaultRenderer(This, Renderer) -> 'ok' when
This::wxGrid(), Renderer::wxGridCellRenderer:wxGridCellRenderer().
setDefaultRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RendererT,ref=RendererRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1833,7 +1833,7 @@ setDefaultRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RendererT,ref=Re
<<ThisRef:32/?UI,RendererRef:32/?UI>>).
%% @equiv setDefaultColSize(This,Width, [])
--spec setDefaultColSize(This, Width) -> ok when
+-spec setDefaultColSize(This, Width) -> 'ok' when
This::wxGrid(), Width::integer().
setDefaultColSize(This,Width)
@@ -1841,9 +1841,9 @@ setDefaultColSize(This,Width)
setDefaultColSize(This,Width, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultcolsize">external documentation</a>.
--spec setDefaultColSize(This, Width, [Option]) -> ok when
+-spec setDefaultColSize(This, Width, [Option]) -> 'ok' when
This::wxGrid(), Width::integer(),
- Option :: {resizeExistingCols, boolean()}.
+ Option :: {'resizeExistingCols', boolean()}.
setDefaultColSize(#wx_ref{type=ThisT,ref=ThisRef},Width, Options)
when is_integer(Width),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1854,7 +1854,7 @@ setDefaultColSize(#wx_ref{type=ThisT,ref=ThisRef},Width, Options)
<<ThisRef:32/?UI,Width:32/?UI, BinOpt/binary>>).
%% @equiv setDefaultRowSize(This,Height, [])
--spec setDefaultRowSize(This, Height) -> ok when
+-spec setDefaultRowSize(This, Height) -> 'ok' when
This::wxGrid(), Height::integer().
setDefaultRowSize(This,Height)
@@ -1862,9 +1862,9 @@ setDefaultRowSize(This,Height)
setDefaultRowSize(This,Height, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetdefaultrowsize">external documentation</a>.
--spec setDefaultRowSize(This, Height, [Option]) -> ok when
+-spec setDefaultRowSize(This, Height, [Option]) -> 'ok' when
This::wxGrid(), Height::integer(),
- Option :: {resizeExistingRows, boolean()}.
+ Option :: {'resizeExistingRows', boolean()}.
setDefaultRowSize(#wx_ref{type=ThisT,ref=ThisRef},Height, Options)
when is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1875,7 +1875,7 @@ setDefaultRowSize(#wx_ref{type=ThisT,ref=ThisRef},Height, Options)
<<ThisRef:32/?UI,Height:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetgridcursor">external documentation</a>.
--spec setGridCursor(This, Row, Col) -> ok when
+-spec setGridCursor(This, Row, Col) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer().
setGridCursor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
when is_integer(Row),is_integer(Col) ->
@@ -1884,7 +1884,7 @@ setGridCursor(#wx_ref{type=ThisT,ref=ThisRef},Row,Col)
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetgridlinecolour">external documentation</a>.
--spec setGridLineColour(This, Val) -> ok when
+-spec setGridLineColour(This, Val) -> 'ok' when
This::wxGrid(), Val::wx:wx_colour().
setGridLineColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1893,7 +1893,7 @@ setGridLineColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetlabelbackgroundcolour">external documentation</a>.
--spec setLabelBackgroundColour(This, Val) -> ok when
+-spec setLabelBackgroundColour(This, Val) -> 'ok' when
This::wxGrid(), Val::wx:wx_colour().
setLabelBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1902,7 +1902,7 @@ setLabelBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetlabelfont">external documentation</a>.
--spec setLabelFont(This, Val) -> ok when
+-spec setLabelFont(This, Val) -> 'ok' when
This::wxGrid(), Val::wxFont:wxFont().
setLabelFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ValT,ref=ValRef}) ->
?CLASS(ThisT,wxGrid),
@@ -1911,7 +1911,7 @@ setLabelFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ValT,ref=ValRef}) ->
<<ThisRef:32/?UI,ValRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetlabeltextcolour">external documentation</a>.
--spec setLabelTextColour(This, Val) -> ok when
+-spec setLabelTextColour(This, Val) -> 'ok' when
This::wxGrid(), Val::wx:wx_colour().
setLabelTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
when tuple_size(Val) =:= 3; tuple_size(Val) =:= 4 ->
@@ -1920,7 +1920,7 @@ setLabelTextColour(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Val)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetmargins">external documentation</a>.
--spec setMargins(This, ExtraWidth, ExtraHeight) -> ok when
+-spec setMargins(This, ExtraWidth, ExtraHeight) -> 'ok' when
This::wxGrid(), ExtraWidth::integer(), ExtraHeight::integer().
setMargins(#wx_ref{type=ThisT,ref=ThisRef},ExtraWidth,ExtraHeight)
when is_integer(ExtraWidth),is_integer(ExtraHeight) ->
@@ -1929,7 +1929,7 @@ setMargins(#wx_ref{type=ThisT,ref=ThisRef},ExtraWidth,ExtraHeight)
<<ThisRef:32/?UI,ExtraWidth:32/?UI,ExtraHeight:32/?UI>>).
%% @equiv setReadOnly(This,Row,Col, [])
--spec setReadOnly(This, Row, Col) -> ok when
+-spec setReadOnly(This, Row, Col) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer().
setReadOnly(This,Row,Col)
@@ -1937,9 +1937,9 @@ setReadOnly(This,Row,Col)
setReadOnly(This,Row,Col, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetreadonly">external documentation</a>.
--spec setReadOnly(This, Row, Col, [Option]) -> ok when
+-spec setReadOnly(This, Row, Col, [Option]) -> 'ok' when
This::wxGrid(), Row::integer(), Col::integer(),
- Option :: {isReadOnly, boolean()}.
+ Option :: {'isReadOnly', boolean()}.
setReadOnly(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
when is_integer(Row),is_integer(Col),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -1950,7 +1950,7 @@ setReadOnly(#wx_ref{type=ThisT,ref=ThisRef},Row,Col, Options)
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowattr">external documentation</a>.
--spec setRowAttr(This, Row, Attr) -> ok when
+-spec setRowAttr(This, Row, Attr) -> 'ok' when
This::wxGrid(), Row::integer(), Attr::wxGridCellAttr:wxGridCellAttr().
setRowAttr(#wx_ref{type=ThisT,ref=ThisRef},Row,#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(Row) ->
@@ -1960,7 +1960,7 @@ setRowAttr(#wx_ref{type=ThisT,ref=ThisRef},Row,#wx_ref{type=AttrT,ref=AttrRef})
<<ThisRef:32/?UI,Row:32/?UI,AttrRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowlabelalignment">external documentation</a>.
--spec setRowLabelAlignment(This, Horiz, Vert) -> ok when
+-spec setRowLabelAlignment(This, Horiz, Vert) -> 'ok' when
This::wxGrid(), Horiz::integer(), Vert::integer().
setRowLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
when is_integer(Horiz),is_integer(Vert) ->
@@ -1969,7 +1969,7 @@ setRowLabelAlignment(#wx_ref{type=ThisT,ref=ThisRef},Horiz,Vert)
<<ThisRef:32/?UI,Horiz:32/?UI,Vert:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowlabelsize">external documentation</a>.
--spec setRowLabelSize(This, Width) -> ok when
+-spec setRowLabelSize(This, Width) -> 'ok' when
This::wxGrid(), Width::integer().
setRowLabelSize(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -1978,7 +1978,7 @@ setRowLabelSize(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowlabelvalue">external documentation</a>.
--spec setRowLabelValue(This, Row, Val) -> ok when
+-spec setRowLabelValue(This, Row, Val) -> 'ok' when
This::wxGrid(), Row::integer(), Val::unicode:chardata().
setRowLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Val)
when is_integer(Row),is_list(Val) ->
@@ -1988,7 +1988,7 @@ setRowLabelValue(#wx_ref{type=ThisT,ref=ThisRef},Row,Val)
<<ThisRef:32/?UI,Row:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((4+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowminimalheight">external documentation</a>.
--spec setRowMinimalHeight(This, Row, Width) -> ok when
+-spec setRowMinimalHeight(This, Row, Width) -> 'ok' when
This::wxGrid(), Row::integer(), Width::integer().
setRowMinimalHeight(#wx_ref{type=ThisT,ref=ThisRef},Row,Width)
when is_integer(Row),is_integer(Width) ->
@@ -1997,7 +1997,7 @@ setRowMinimalHeight(#wx_ref{type=ThisT,ref=ThisRef},Row,Width)
<<ThisRef:32/?UI,Row:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowminimalacceptableheight">external documentation</a>.
--spec setRowMinimalAcceptableHeight(This, Width) -> ok when
+-spec setRowMinimalAcceptableHeight(This, Width) -> 'ok' when
This::wxGrid(), Width::integer().
setRowMinimalAcceptableHeight(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -2006,7 +2006,7 @@ setRowMinimalAcceptableHeight(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetrowsize">external documentation</a>.
--spec setRowSize(This, Row, Height) -> ok when
+-spec setRowSize(This, Row, Height) -> 'ok' when
This::wxGrid(), Row::integer(), Height::integer().
setRowSize(#wx_ref{type=ThisT,ref=ThisRef},Row,Height)
when is_integer(Row),is_integer(Height) ->
@@ -2015,7 +2015,7 @@ setRowSize(#wx_ref{type=ThisT,ref=ThisRef},Row,Height)
<<ThisRef:32/?UI,Row:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetscrolllinex">external documentation</a>.
--spec setScrollLineX(This, X) -> ok when
+-spec setScrollLineX(This, X) -> 'ok' when
This::wxGrid(), X::integer().
setScrollLineX(#wx_ref{type=ThisT,ref=ThisRef},X)
when is_integer(X) ->
@@ -2024,7 +2024,7 @@ setScrollLineX(#wx_ref{type=ThisT,ref=ThisRef},X)
<<ThisRef:32/?UI,X:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetscrollliney">external documentation</a>.
--spec setScrollLineY(This, Y) -> ok when
+-spec setScrollLineY(This, Y) -> 'ok' when
This::wxGrid(), Y::integer().
setScrollLineY(#wx_ref{type=ThisT,ref=ThisRef},Y)
when is_integer(Y) ->
@@ -2033,7 +2033,7 @@ setScrollLineY(#wx_ref{type=ThisT,ref=ThisRef},Y)
<<ThisRef:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetselectionbackground">external documentation</a>.
--spec setSelectionBackground(This, C) -> ok when
+-spec setSelectionBackground(This, C) -> 'ok' when
This::wxGrid(), C::wx:wx_colour().
setSelectionBackground(#wx_ref{type=ThisT,ref=ThisRef},C)
when tuple_size(C) =:= 3; tuple_size(C) =:= 4 ->
@@ -2042,7 +2042,7 @@ setSelectionBackground(#wx_ref{type=ThisT,ref=ThisRef},C)
<<ThisRef:32/?UI,(wxe_util:colour_bin(C)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetselectionforeground">external documentation</a>.
--spec setSelectionForeground(This, C) -> ok when
+-spec setSelectionForeground(This, C) -> 'ok' when
This::wxGrid(), C::wx:wx_colour().
setSelectionForeground(#wx_ref{type=ThisT,ref=ThisRef},C)
when tuple_size(C) =:= 3; tuple_size(C) =:= 4 ->
@@ -2052,7 +2052,7 @@ setSelectionForeground(#wx_ref{type=ThisT,ref=ThisRef},C)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridsetselectionmode">external documentation</a>.
%%<br /> Selmode = ?wxGrid_wxGridSelectCells | ?wxGrid_wxGridSelectRows | ?wxGrid_wxGridSelectColumns
--spec setSelectionMode(This, Selmode) -> ok when
+-spec setSelectionMode(This, Selmode) -> 'ok' when
This::wxGrid(), Selmode::wx:wx_enum().
setSelectionMode(#wx_ref{type=ThisT,ref=ThisRef},Selmode)
when is_integer(Selmode) ->
@@ -2061,7 +2061,7 @@ setSelectionMode(#wx_ref{type=ThisT,ref=ThisRef},Selmode)
<<ThisRef:32/?UI,Selmode:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridshowcelleditcontrol">external documentation</a>.
--spec showCellEditControl(This) -> ok when
+-spec showCellEditControl(This) -> 'ok' when
This::wxGrid().
showCellEditControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGrid),
@@ -2079,7 +2079,7 @@ xToCol(This,X)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgrid.html#wxgridxtocol">external documentation</a>.
-spec xToCol(This, X, [Option]) -> integer() when
This::wxGrid(), X::integer(),
- Option :: {clipToMinMax, boolean()}.
+ Option :: {'clipToMinMax', boolean()}.
xToCol(#wx_ref{type=ThisT,ref=ThisRef},X, Options)
when is_integer(X),is_list(Options) ->
?CLASS(ThisT,wxGrid),
@@ -2117,7 +2117,7 @@ yToRow(#wx_ref{type=ThisT,ref=ThisRef},Y)
<<ThisRef:32/?UI,Y:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGrid()) -> ok.
+-spec destroy(This::wxGrid()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGrid),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGridBagSizer.erl b/lib/wx/src/gen/wxGridBagSizer.erl
index 521bf7d5de..93ed002d6c 100644
--- a/lib/wx/src/gen/wxGridBagSizer.erl
+++ b/lib/wx/src/gen/wxGridBagSizer.erl
@@ -65,8 +65,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridbagsizer.html#wxgridbagsizerwxgridbagsizer">external documentation</a>.
-spec new([Option]) -> wxGridBagSizer() when
- Option :: {vgap, integer()}
- | {hgap, integer()}.
+ Option :: {'vgap', integer()}
+ | {'hgap', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({vgap, Vgap}, Acc) -> [<<1:32/?UI,Vgap:32/?UI>>|Acc];
@@ -96,10 +96,10 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()};<br />
%% (This, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(),<br />
-%% Option :: {proportion, integer()}<br />
-%% | {flag, integer()}<br />
-%% | {border, integer()}<br />
-%% | {userData, wx:wx_object()}.<br />
+%% Option :: {'proportion', integer()}<br />
+%% | {'flag', integer()}<br />
+%% | {'border', integer()}<br />
+%% | {'userData', wx:wx_object()}.<br />
%%
-spec add(This, Width, Height) -> wxSizerItem:wxSizerItem() when
This::wxGridBagSizer(), Width::integer(), Height::integer();
@@ -107,10 +107,10 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()};
(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()}.
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()}.
add(This,Width,Height)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
@@ -141,31 +141,31 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options
%% <br /> Also:<br />
%% add(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxGridBagSizer(), Width::integer(), Height::integer(),<br />
-%% Option :: {proportion, integer()}<br />
-%% | {flag, integer()}<br />
-%% | {border, integer()}<br />
-%% | {userData, wx:wx_object()};<br />
+%% Option :: {'proportion', integer()}<br />
+%% | {'flag', integer()}<br />
+%% | {'border', integer()}<br />
+%% | {'userData', wx:wx_object()};<br />
%% (This, Window, Pos, [Option]) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()},<br />
-%% Option :: {span, {RS::integer(), CS::integer()}}<br />
-%% | {flag, integer()}<br />
-%% | {border, integer()}<br />
-%% | {userData, wx:wx_object()}.<br />
+%% Option :: {'span', {RS::integer(), CS::integer()}}<br />
+%% | {'flag', integer()}<br />
+%% | {'border', integer()}<br />
+%% | {'userData', wx:wx_object()}.<br />
%%
-spec add(This, Width, Height, Pos) -> wxSizerItem:wxSizerItem() when
This::wxGridBagSizer(), Width::integer(), Height::integer(), Pos::{R::integer(), C::integer()};
(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxGridBagSizer(), Width::integer(), Height::integer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()};
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()};
(This, Window, Pos, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxGridBagSizer(), Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Pos::{R::integer(), C::integer()},
- Option :: {span, {RS::integer(), CS::integer()}}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()}.
+ Option :: {'span', {RS::integer(), CS::integer()}}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()}.
add(This,Width,Height,Pos={PosR,PosC})
when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_integer(PosR),is_integer(PosC) ->
@@ -202,10 +202,10 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},{PosR,Po
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridbagsizer.html#wxgridbagsizeradd">external documentation</a>.
-spec add(This, Width, Height, Pos, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxGridBagSizer(), Width::integer(), Height::integer(), Pos::{R::integer(), C::integer()},
- Option :: {span, {RS::integer(), CS::integer()}}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()}.
+ Option :: {'span', {RS::integer(), CS::integer()}}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()}.
add(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,{PosR,PosC}, Options)
when is_integer(Width),is_integer(Height),is_integer(PosR),is_integer(PosC),is_list(Options) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -238,13 +238,13 @@ checkForIntersection(This,Item)
%% <br /> Also:<br />
%% checkForIntersection(This, Item, [Option]) -> boolean() when<br />
%% This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem(),<br />
-%% Option :: {excludeItem, wxGBSizerItem:wxGBSizerItem()}.<br />
+%% Option :: {'excludeItem', wxGBSizerItem:wxGBSizerItem()}.<br />
%%
-spec checkForIntersection(This, Pos, Span) -> boolean() when
This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}, Span::{RS::integer(), CS::integer()};
(This, Item, [Option]) -> boolean() when
This::wxGridBagSizer(), Item::wxGBSizerItem:wxGBSizerItem(),
- Option :: {excludeItem, wxGBSizerItem:wxGBSizerItem()}.
+ Option :: {'excludeItem', wxGBSizerItem:wxGBSizerItem()}.
checkForIntersection(This,Pos={PosR,PosC},Span={SpanRS,SpanCS})
when is_record(This, wx_ref),is_integer(PosR),is_integer(PosC),is_integer(SpanRS),is_integer(SpanCS) ->
@@ -262,7 +262,7 @@ checkForIntersection(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=Item
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridbagsizer.html#wxgridbagsizercheckforintersection">external documentation</a>.
-spec checkForIntersection(This, Pos, Span, [Option]) -> boolean() when
This::wxGridBagSizer(), Pos::{R::integer(), C::integer()}, Span::{RS::integer(), CS::integer()},
- Option :: {excludeItem, wxGBSizerItem:wxGBSizerItem()}.
+ Option :: {'excludeItem', wxGBSizerItem:wxGBSizerItem()}.
checkForIntersection(#wx_ref{type=ThisT,ref=ThisRef},{PosR,PosC},{SpanRS,SpanCS}, Options)
when is_integer(PosR),is_integer(PosC),is_integer(SpanRS),is_integer(SpanCS),is_list(Options) ->
?CLASS(ThisT,wxGridBagSizer),
@@ -381,7 +381,7 @@ getItemSpan(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef})
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridbagsizer.html#wxgridbagsizersetemptycellsize">external documentation</a>.
--spec setEmptyCellSize(This, Sz) -> ok when
+-spec setEmptyCellSize(This, Sz) -> 'ok' when
This::wxGridBagSizer(), Sz::{W::integer(), H::integer()}.
setEmptyCellSize(#wx_ref{type=ThisT,ref=ThisRef},{SzW,SzH})
when is_integer(SzW),is_integer(SzH) ->
@@ -442,7 +442,7 @@ setItemSpan(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},
<<ThisRef:32/?UI,WindowRef:32/?UI,SpanRS:32/?UI,SpanCS:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridBagSizer()) -> ok.
+-spec destroy(This::wxGridBagSizer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridBagSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxGridCellAttr.erl b/lib/wx/src/gen/wxGridCellAttr.erl
index 8d55155c5c..b279be25d8 100644
--- a/lib/wx/src/gen/wxGridCellAttr.erl
+++ b/lib/wx/src/gen/wxGridCellAttr.erl
@@ -40,7 +40,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxGridCellAttr() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsettextcolour">external documentation</a>.
--spec setTextColour(This, ColText) -> ok when
+-spec setTextColour(This, ColText) -> 'ok' when
This::wxGridCellAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
@@ -49,7 +49,7 @@ setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsetbackgroundcolour">external documentation</a>.
--spec setBackgroundColour(This, ColBack) -> ok when
+-spec setBackgroundColour(This, ColBack) -> 'ok' when
This::wxGridCellAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
@@ -58,7 +58,7 @@ setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsetfont">external documentation</a>.
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxGridCellAttr(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -67,7 +67,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsetalignment">external documentation</a>.
--spec setAlignment(This, HAlign, VAlign) -> ok when
+-spec setAlignment(This, HAlign, VAlign) -> 'ok' when
This::wxGridCellAttr(), HAlign::integer(), VAlign::integer().
setAlignment(#wx_ref{type=ThisT,ref=ThisRef},HAlign,VAlign)
when is_integer(HAlign),is_integer(VAlign) ->
@@ -76,7 +76,7 @@ setAlignment(#wx_ref{type=ThisT,ref=ThisRef},HAlign,VAlign)
<<ThisRef:32/?UI,HAlign:32/?UI,VAlign:32/?UI>>).
%% @equiv setReadOnly(This, [])
--spec setReadOnly(This) -> ok when
+-spec setReadOnly(This) -> 'ok' when
This::wxGridCellAttr().
setReadOnly(This)
@@ -84,9 +84,9 @@ setReadOnly(This)
setReadOnly(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsetreadonly">external documentation</a>.
--spec setReadOnly(This, [Option]) -> ok when
+-spec setReadOnly(This, [Option]) -> 'ok' when
This::wxGridCellAttr(),
- Option :: {isReadOnly, boolean()}.
+ Option :: {'isReadOnly', boolean()}.
setReadOnly(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -97,7 +97,7 @@ setReadOnly(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsetrenderer">external documentation</a>.
--spec setRenderer(This, Renderer) -> ok when
+-spec setRenderer(This, Renderer) -> 'ok' when
This::wxGridCellAttr(), Renderer::wxGridCellRenderer:wxGridCellRenderer().
setRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RendererT,ref=RendererRef}) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -106,7 +106,7 @@ setRenderer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RendererT,ref=RendererR
<<ThisRef:32/?UI,RendererRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrseteditor">external documentation</a>.
--spec setEditor(This, Editor) -> ok when
+-spec setEditor(This, Editor) -> 'ok' when
This::wxGridCellAttr(), Editor::wxGridCellEditor:wxGridCellEditor().
setEditor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EditorT,ref=EditorRef}) ->
?CLASS(ThisT,wxGridCellAttr),
@@ -223,7 +223,7 @@ isReadOnly(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellattr.html#wxgridcellattrsetdefattr">external documentation</a>.
--spec setDefAttr(This, DefAttr) -> ok when
+-spec setDefAttr(This, DefAttr) -> 'ok' when
This::wxGridCellAttr(), DefAttr::wxGridCellAttr().
setDefAttr(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DefAttrT,ref=DefAttrRef}) ->
?CLASS(ThisT,wxGridCellAttr),
diff --git a/lib/wx/src/gen/wxGridCellBoolEditor.erl b/lib/wx/src/gen/wxGridCellBoolEditor.erl
index 93a05e2959..1d949d54ff 100644
--- a/lib/wx/src/gen/wxGridCellBoolEditor.erl
+++ b/lib/wx/src/gen/wxGridCellBoolEditor.erl
@@ -58,15 +58,15 @@ isTrueValue(Value)
<<(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @equiv useStringValues([])
--spec useStringValues() -> ok.
+-spec useStringValues() -> 'ok'.
useStringValues() ->
useStringValues([]).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellbooleditor.html#wxgridcellbooleditorusestringvalues">external documentation</a>.
--spec useStringValues([Option]) -> ok when
- Option :: {valueTrue, unicode:chardata()}
- | {valueFalse, unicode:chardata()}.
+-spec useStringValues([Option]) -> 'ok' when
+ Option :: {'valueTrue', unicode:chardata()}
+ | {'valueFalse', unicode:chardata()}.
useStringValues(Options)
when is_list(Options) ->
MOpts = fun({valueTrue, ValueTrue}, Acc) -> ValueTrue_UC = unicode:characters_to_binary([ValueTrue,0]),[<<1:32/?UI,(byte_size(ValueTrue_UC)):32/?UI,(ValueTrue_UC)/binary, 0:(((8- ((0+byte_size(ValueTrue_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -77,7 +77,7 @@ useStringValues(Options)
<<BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellBoolEditor()) -> ok.
+-spec destroy(This::wxGridCellBoolEditor()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellBoolEditor),
wxe_util:destroy(?wxGridCellBoolEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellBoolRenderer.erl b/lib/wx/src/gen/wxGridCellBoolRenderer.erl
index ce576a3c1d..acdb9cb18f 100644
--- a/lib/wx/src/gen/wxGridCellBoolRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellBoolRenderer.erl
@@ -46,7 +46,7 @@ new() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellBoolRenderer()) -> ok.
+-spec destroy(This::wxGridCellBoolRenderer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellBoolRenderer),
wxe_util:destroy(?wxGridCellBoolRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellChoiceEditor.erl b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
index 3e24ea21a0..d5487c3618 100644
--- a/lib/wx/src/gen/wxGridCellChoiceEditor.erl
+++ b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
@@ -53,7 +53,7 @@ new(Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellchoiceeditor.html#wxgridcellchoiceeditorwxgridcellchoiceeditor">external documentation</a>.
-spec new(Choices, [Option]) -> wxGridCellChoiceEditor() when
Choices::[unicode:chardata()],
- Option :: {allowOthers, boolean()}.
+ Option :: {'allowOthers', boolean()}.
new(Choices, Options)
when is_list(Choices),is_list(Options) ->
Choices_UCA = [unicode:characters_to_binary([ChoicesTemp,0]) ||
@@ -65,7 +65,7 @@ new(Choices, Options)
<<(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellchoiceeditor.html#wxgridcellchoiceeditorsetparameters">external documentation</a>.
--spec setParameters(This, Params) -> ok when
+-spec setParameters(This, Params) -> 'ok' when
This::wxGridCellChoiceEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
@@ -75,7 +75,7 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellChoiceEditor()) -> ok.
+-spec destroy(This::wxGridCellChoiceEditor()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellChoiceEditor),
wxe_util:destroy(?wxGridCellChoiceEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellEditor.erl b/lib/wx/src/gen/wxGridCellEditor.erl
index 03b196e5a2..d14b1c994c 100644
--- a/lib/wx/src/gen/wxGridCellEditor.erl
+++ b/lib/wx/src/gen/wxGridCellEditor.erl
@@ -39,7 +39,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxGridCellEditor() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorcreate">external documentation</a>.
--spec create(This, Parent, Id, EvtHandler) -> ok when
+-spec create(This, Parent, Id, EvtHandler) -> 'ok' when
This::wxGridCellEditor(), Parent::wxWindow:wxWindow(), Id::integer(), EvtHandler::wxEvtHandler:wxEvtHandler().
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=EvtHandlerT,ref=EvtHandlerRef})
when is_integer(Id) ->
@@ -58,7 +58,7 @@ isCreated(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorsetsize">external documentation</a>.
--spec setSize(This, Rect) -> ok when
+-spec setSize(This, Rect) -> 'ok' when
This::wxGridCellEditor(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
@@ -67,7 +67,7 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @equiv show(This,Show, [])
--spec show(This, Show) -> ok when
+-spec show(This, Show) -> 'ok' when
This::wxGridCellEditor(), Show::boolean().
show(This,Show)
@@ -75,9 +75,9 @@ show(This,Show)
show(This,Show, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorshow">external documentation</a>.
--spec show(This, Show, [Option]) -> ok when
+-spec show(This, Show, [Option]) -> 'ok' when
This::wxGridCellEditor(), Show::boolean(),
- Option :: {attr, wxGridCellAttr:wxGridCellAttr()}.
+ Option :: {'attr', wxGridCellAttr:wxGridCellAttr()}.
show(#wx_ref{type=ThisT,ref=ThisRef},Show, Options)
when is_boolean(Show),is_list(Options) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -88,7 +88,7 @@ show(#wx_ref{type=ThisT,ref=ThisRef},Show, Options)
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorpaintbackground">external documentation</a>.
--spec paintBackground(This, RectCell, Attr) -> ok when
+-spec paintBackground(This, RectCell, Attr) -> 'ok' when
This::wxGridCellEditor(), RectCell::{X::integer(), Y::integer(), W::integer(), H::integer()}, Attr::wxGridCellAttr:wxGridCellAttr().
paintBackground(#wx_ref{type=ThisT,ref=ThisRef},{RectCellX,RectCellY,RectCellW,RectCellH},#wx_ref{type=AttrT,ref=AttrRef})
when is_integer(RectCellX),is_integer(RectCellY),is_integer(RectCellW),is_integer(RectCellH) ->
@@ -98,7 +98,7 @@ paintBackground(#wx_ref{type=ThisT,ref=ThisRef},{RectCellX,RectCellY,RectCellW,R
<<ThisRef:32/?UI,RectCellX:32/?UI,RectCellY:32/?UI,RectCellW:32/?UI,RectCellH:32/?UI,AttrRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorbeginedit">external documentation</a>.
--spec beginEdit(This, Row, Col, Grid) -> ok when
+-spec beginEdit(This, Row, Col, Grid) -> 'ok' when
This::wxGridCellEditor(), Row::integer(), Col::integer(), Grid::wxGrid:wxGrid().
beginEdit(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=GridT,ref=GridRef})
when is_integer(Row),is_integer(Col) ->
@@ -118,7 +118,7 @@ endEdit(#wx_ref{type=ThisT,ref=ThisRef},Row,Col,#wx_ref{type=GridT,ref=GridRef})
<<ThisRef:32/?UI,Row:32/?UI,Col:32/?UI,GridRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorreset">external documentation</a>.
--spec reset(This) -> ok when
+-spec reset(This) -> 'ok' when
This::wxGridCellEditor().
reset(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -126,7 +126,7 @@ reset(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorstartingkey">external documentation</a>.
--spec startingKey(This, Event) -> ok when
+-spec startingKey(This, Event) -> 'ok' when
This::wxGridCellEditor(), Event::wxKeyEvent:wxKeyEvent().
startingKey(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -135,7 +135,7 @@ startingKey(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) -
<<ThisRef:32/?UI,EventRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorstartingclick">external documentation</a>.
--spec startingClick(This) -> ok when
+-spec startingClick(This) -> 'ok' when
This::wxGridCellEditor().
startingClick(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGridCellEditor),
@@ -143,7 +143,7 @@ startingClick(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelleditor.html#wxgridcelleditorhandlereturn">external documentation</a>.
--spec handleReturn(This, Event) -> ok when
+-spec handleReturn(This, Event) -> 'ok' when
This::wxGridCellEditor(), Event::wxKeyEvent:wxKeyEvent().
handleReturn(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxGridCellEditor),
diff --git a/lib/wx/src/gen/wxGridCellFloatEditor.erl b/lib/wx/src/gen/wxGridCellFloatEditor.erl
index e4f8b81fef..6e85469ecf 100644
--- a/lib/wx/src/gen/wxGridCellFloatEditor.erl
+++ b/lib/wx/src/gen/wxGridCellFloatEditor.erl
@@ -50,8 +50,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellfloateditor.html#wxgridcellfloateditorwxgridcellfloateditor">external documentation</a>.
-spec new([Option]) -> wxGridCellFloatEditor() when
- Option :: {width, integer()}
- | {precision, integer()}.
+ Option :: {'width', integer()}
+ | {'precision', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({width, Width}, Acc) -> [<<1:32/?UI,Width:32/?UI>>|Acc];
@@ -62,7 +62,7 @@ new(Options)
<<BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellfloateditor.html#wxgridcellfloateditorsetparameters">external documentation</a>.
--spec setParameters(This, Params) -> ok when
+-spec setParameters(This, Params) -> 'ok' when
This::wxGridCellFloatEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
@@ -72,7 +72,7 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellFloatEditor()) -> ok.
+-spec destroy(This::wxGridCellFloatEditor()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellFloatEditor),
wxe_util:destroy(?wxGridCellFloatEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellFloatRenderer.erl b/lib/wx/src/gen/wxGridCellFloatRenderer.erl
index c5ddf78c44..ccb29902b3 100644
--- a/lib/wx/src/gen/wxGridCellFloatRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellFloatRenderer.erl
@@ -50,8 +50,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrendererwxgridcellfloatrenderer">external documentation</a>.
-spec new([Option]) -> wxGridCellFloatRenderer() when
- Option :: {width, integer()}
- | {precision, integer()}.
+ Option :: {'width', integer()}
+ | {'precision', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({width, Width}, Acc) -> [<<1:32/?UI,Width:32/?UI>>|Acc];
@@ -78,7 +78,7 @@ getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderersetparameters">external documentation</a>.
--spec setParameters(This, Params) -> ok when
+-spec setParameters(This, Params) -> 'ok' when
This::wxGridCellFloatRenderer(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
@@ -88,7 +88,7 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderersetprecision">external documentation</a>.
--spec setPrecision(This, Precision) -> ok when
+-spec setPrecision(This, Precision) -> 'ok' when
This::wxGridCellFloatRenderer(), Precision::integer().
setPrecision(#wx_ref{type=ThisT,ref=ThisRef},Precision)
when is_integer(Precision) ->
@@ -97,7 +97,7 @@ setPrecision(#wx_ref{type=ThisT,ref=ThisRef},Precision)
<<ThisRef:32/?UI,Precision:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellfloatrenderer.html#wxgridcellfloatrenderersetwidth">external documentation</a>.
--spec setWidth(This, Width) -> ok when
+-spec setWidth(This, Width) -> 'ok' when
This::wxGridCellFloatRenderer(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -106,7 +106,7 @@ setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellFloatRenderer()) -> ok.
+-spec destroy(This::wxGridCellFloatRenderer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellFloatRenderer),
wxe_util:destroy(?wxGridCellFloatRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellNumberEditor.erl b/lib/wx/src/gen/wxGridCellNumberEditor.erl
index fb42faaf24..7a47024b2f 100644
--- a/lib/wx/src/gen/wxGridCellNumberEditor.erl
+++ b/lib/wx/src/gen/wxGridCellNumberEditor.erl
@@ -52,8 +52,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellnumbereditor.html#wxgridcellnumbereditorwxgridcellnumbereditor">external documentation</a>.
-spec new([Option]) -> wxGridCellNumberEditor() when
- Option :: {min, integer()}
- | {max, integer()}.
+ Option :: {'min', integer()}
+ | {'max', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({min, Min}, Acc) -> [<<1:32/?UI,Min:32/?UI>>|Acc];
@@ -72,7 +72,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellnumbereditor.html#wxgridcellnumbereditorsetparameters">external documentation</a>.
--spec setParameters(This, Params) -> ok when
+-spec setParameters(This, Params) -> 'ok' when
This::wxGridCellNumberEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
@@ -82,7 +82,7 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellNumberEditor()) -> ok.
+-spec destroy(This::wxGridCellNumberEditor()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellNumberEditor),
wxe_util:destroy(?wxGridCellNumberEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellNumberRenderer.erl b/lib/wx/src/gen/wxGridCellNumberRenderer.erl
index 815640f6da..1267bb4167 100644
--- a/lib/wx/src/gen/wxGridCellNumberRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellNumberRenderer.erl
@@ -48,7 +48,7 @@ new() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellNumberRenderer()) -> ok.
+-spec destroy(This::wxGridCellNumberRenderer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellNumberRenderer),
wxe_util:destroy(?wxGridCellNumberRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellRenderer.erl b/lib/wx/src/gen/wxGridCellRenderer.erl
index 00f553b71a..53d43f12a4 100644
--- a/lib/wx/src/gen/wxGridCellRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellRenderer.erl
@@ -36,7 +36,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxGridCellRenderer() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcellrenderer.html#wxgridcellrendererdraw">external documentation</a>.
--spec draw(This, Grid, Attr, Dc, Rect, Row, Col, IsSelected) -> ok when
+-spec draw(This, Grid, Attr, Dc, Rect, Row, Col, IsSelected) -> 'ok' when
This::wxGridCellRenderer(), Grid::wxGrid:wxGrid(), Attr::wxGridCellAttr:wxGridCellAttr(), Dc::wxDC:wxDC(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, Row::integer(), Col::integer(), IsSelected::boolean().
draw(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=GridT,ref=GridRef},#wx_ref{type=AttrT,ref=AttrRef},#wx_ref{type=DcT,ref=DcRef},{RectX,RectY,RectW,RectH},Row,Col,IsSelected)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_integer(Row),is_integer(Col),is_boolean(IsSelected) ->
diff --git a/lib/wx/src/gen/wxGridCellStringRenderer.erl b/lib/wx/src/gen/wxGridCellStringRenderer.erl
index fce72cf02b..7602187a7a 100644
--- a/lib/wx/src/gen/wxGridCellStringRenderer.erl
+++ b/lib/wx/src/gen/wxGridCellStringRenderer.erl
@@ -46,7 +46,7 @@ new() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellStringRenderer()) -> ok.
+-spec destroy(This::wxGridCellStringRenderer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellStringRenderer),
wxe_util:destroy(?wxGridCellStringRenderer_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridCellTextEditor.erl b/lib/wx/src/gen/wxGridCellTextEditor.erl
index e6d3f508b7..4ddb4a7028 100644
--- a/lib/wx/src/gen/wxGridCellTextEditor.erl
+++ b/lib/wx/src/gen/wxGridCellTextEditor.erl
@@ -49,7 +49,7 @@ new() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridcelltexteditor.html#wxgridcelltexteditorsetparameters">external documentation</a>.
--spec setParameters(This, Params) -> ok when
+-spec setParameters(This, Params) -> 'ok' when
This::wxGridCellTextEditor(), Params::unicode:chardata().
setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
when is_list(Params) ->
@@ -59,7 +59,7 @@ setParameters(#wx_ref{type=ThisT,ref=ThisRef},Params)
<<ThisRef:32/?UI,(byte_size(Params_UC)):32/?UI,(Params_UC)/binary, 0:(((8- ((0+byte_size(Params_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridCellTextEditor()) -> ok.
+-spec destroy(This::wxGridCellTextEditor()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridCellTextEditor),
wxe_util:destroy(?wxGridCellTextEditor_destroy,Obj),
diff --git a/lib/wx/src/gen/wxGridSizer.erl b/lib/wx/src/gen/wxGridSizer.erl
index 5cfede3e9c..bb2127f92a 100644
--- a/lib/wx/src/gen/wxGridSizer.erl
+++ b/lib/wx/src/gen/wxGridSizer.erl
@@ -59,8 +59,8 @@ new(Cols)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridsizer.html#wxgridsizerwxgridsizer">external documentation</a>.
-spec new(Cols, [Option]) -> wxGridSizer() when
Cols::integer(),
- Option :: {vgap, integer()}
- | {hgap, integer()}.
+ Option :: {'vgap', integer()}
+ | {'hgap', integer()}.
new(Cols, Options)
when is_integer(Cols),is_list(Options) ->
MOpts = fun({vgap, Vgap}, Acc) -> [<<1:32/?UI,Vgap:32/?UI>>|Acc];
@@ -111,7 +111,7 @@ getVGap(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridsizer.html#wxgridsizersetcols">external documentation</a>.
--spec setCols(This, Cols) -> ok when
+-spec setCols(This, Cols) -> 'ok' when
This::wxGridSizer(), Cols::integer().
setCols(#wx_ref{type=ThisT,ref=ThisRef},Cols)
when is_integer(Cols) ->
@@ -120,7 +120,7 @@ setCols(#wx_ref{type=ThisT,ref=ThisRef},Cols)
<<ThisRef:32/?UI,Cols:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridsizer.html#wxgridsizersethgap">external documentation</a>.
--spec setHGap(This, Gap) -> ok when
+-spec setHGap(This, Gap) -> 'ok' when
This::wxGridSizer(), Gap::integer().
setHGap(#wx_ref{type=ThisT,ref=ThisRef},Gap)
when is_integer(Gap) ->
@@ -129,7 +129,7 @@ setHGap(#wx_ref{type=ThisT,ref=ThisRef},Gap)
<<ThisRef:32/?UI,Gap:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridsizer.html#wxgridsizersetrows">external documentation</a>.
--spec setRows(This, Rows) -> ok when
+-spec setRows(This, Rows) -> 'ok' when
This::wxGridSizer(), Rows::integer().
setRows(#wx_ref{type=ThisT,ref=ThisRef},Rows)
when is_integer(Rows) ->
@@ -138,7 +138,7 @@ setRows(#wx_ref{type=ThisT,ref=ThisRef},Rows)
<<ThisRef:32/?UI,Rows:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxgridsizer.html#wxgridsizersetvgap">external documentation</a>.
--spec setVGap(This, Gap) -> ok when
+-spec setVGap(This, Gap) -> 'ok' when
This::wxGridSizer(), Gap::integer().
setVGap(#wx_ref{type=ThisT,ref=ThisRef},Gap)
when is_integer(Gap) ->
@@ -147,7 +147,7 @@ setVGap(#wx_ref{type=ThisT,ref=ThisRef},Gap)
<<ThisRef:32/?UI,Gap:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxGridSizer()) -> ok.
+-spec destroy(This::wxGridSizer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxGridSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxHelpEvent.erl b/lib/wx/src/gen/wxHelpEvent.erl
index ec5107a3dc..251167d41e 100644
--- a/lib/wx/src/gen/wxHelpEvent.erl
+++ b/lib/wx/src/gen/wxHelpEvent.erl
@@ -63,7 +63,7 @@ getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhelpevent.html#wxhelpeventsetorigin">external documentation</a>.
%%<br /> Origin = ?wxHelpEvent_Origin_Unknown | ?wxHelpEvent_Origin_Keyboard | ?wxHelpEvent_Origin_HelpButton
--spec setOrigin(This, Origin) -> ok when
+-spec setOrigin(This, Origin) -> 'ok' when
This::wxHelpEvent(), Origin::wx:wx_enum().
setOrigin(#wx_ref{type=ThisT,ref=ThisRef},Origin)
when is_integer(Origin) ->
@@ -72,7 +72,7 @@ setOrigin(#wx_ref{type=ThisT,ref=ThisRef},Origin)
<<ThisRef:32/?UI,Origin:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhelpevent.html#wxhelpeventsetposition">external documentation</a>.
--spec setPosition(This, Pos) -> ok when
+-spec setPosition(This, Pos) -> 'ok' when
This::wxHelpEvent(), Pos::{X::integer(), Y::integer()}.
setPosition(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
diff --git a/lib/wx/src/gen/wxHtmlEasyPrinting.erl b/lib/wx/src/gen/wxHtmlEasyPrinting.erl
index b445fc01ab..a2cf46ed8d 100644
--- a/lib/wx/src/gen/wxHtmlEasyPrinting.erl
+++ b/lib/wx/src/gen/wxHtmlEasyPrinting.erl
@@ -46,8 +46,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingwxhtmleasyprinting">external documentation</a>.
-spec new([Option]) -> wxHtmlEasyPrinting() when
- Option :: {name, unicode:chardata()}
- | {parentWindow, wxWindow:wxWindow()}.
+ Option :: {'name', unicode:chardata()}
+ | {'parentWindow', wxWindow:wxWindow()}.
new(Options)
when is_list(Options) ->
MOpts = fun({name, Name}, Acc) -> Name_UC = unicode:characters_to_binary([Name,0]),[<<1:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -94,7 +94,7 @@ previewText(This,Htmltext)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpreviewtext">external documentation</a>.
-spec previewText(This, Htmltext, [Option]) -> boolean() when
This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata(),
- Option :: {basepath, unicode:chardata()}.
+ Option :: {'basepath', unicode:chardata()}.
previewText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
when is_list(Htmltext),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -126,7 +126,7 @@ printText(This,Htmltext)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingprinttext">external documentation</a>.
-spec printText(This, Htmltext, [Option]) -> boolean() when
This::wxHtmlEasyPrinting(), Htmltext::unicode:chardata(),
- Option :: {basepath, unicode:chardata()}.
+ Option :: {'basepath', unicode:chardata()}.
printText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
when is_list(Htmltext),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -138,7 +138,7 @@ printText(#wx_ref{type=ThisT,ref=ThisRef},Htmltext, Options)
<<ThisRef:32/?UI,(byte_size(Htmltext_UC)):32/?UI,(Htmltext_UC)/binary, 0:(((8- ((0+byte_size(Htmltext_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingpagesetup">external documentation</a>.
--spec pageSetup(This) -> ok when
+-spec pageSetup(This) -> 'ok' when
This::wxHtmlEasyPrinting().
pageSetup(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -146,7 +146,7 @@ pageSetup(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv setFonts(This,Normal_face,Fixed_face, [])
--spec setFonts(This, Normal_face, Fixed_face) -> ok when
+-spec setFonts(This, Normal_face, Fixed_face) -> 'ok' when
This::wxHtmlEasyPrinting(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata().
setFonts(This,Normal_face,Fixed_face)
@@ -154,9 +154,9 @@ setFonts(This,Normal_face,Fixed_face)
setFonts(This,Normal_face,Fixed_face, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetfonts">external documentation</a>.
--spec setFonts(This, Normal_face, Fixed_face, [Option]) -> ok when
+-spec setFonts(This, Normal_face, Fixed_face, [Option]) -> 'ok' when
This::wxHtmlEasyPrinting(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata(),
- Option :: {sizes, [integer()]}.
+ Option :: {'sizes', [integer()]}.
setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
when is_list(Normal_face),is_list(Fixed_face),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -170,7 +170,7 @@ setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
<<ThisRef:32/?UI,(byte_size(Normal_face_UC)):32/?UI,(Normal_face_UC)/binary, 0:(((8- ((0+byte_size(Normal_face_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Fixed_face_UC)):32/?UI,(Fixed_face_UC)/binary, 0:(((8- ((4+byte_size(Fixed_face_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @equiv setHeader(This,Header, [])
--spec setHeader(This, Header) -> ok when
+-spec setHeader(This, Header) -> 'ok' when
This::wxHtmlEasyPrinting(), Header::unicode:chardata().
setHeader(This,Header)
@@ -178,9 +178,9 @@ setHeader(This,Header)
setHeader(This,Header, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetheader">external documentation</a>.
--spec setHeader(This, Header, [Option]) -> ok when
+-spec setHeader(This, Header, [Option]) -> 'ok' when
This::wxHtmlEasyPrinting(), Header::unicode:chardata(),
- Option :: {pg, integer()}.
+ Option :: {'pg', integer()}.
setHeader(#wx_ref{type=ThisT,ref=ThisRef},Header, Options)
when is_list(Header),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -192,7 +192,7 @@ setHeader(#wx_ref{type=ThisT,ref=ThisRef},Header, Options)
<<ThisRef:32/?UI,(byte_size(Header_UC)):32/?UI,(Header_UC)/binary, 0:(((8- ((0+byte_size(Header_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @equiv setFooter(This,Footer, [])
--spec setFooter(This, Footer) -> ok when
+-spec setFooter(This, Footer) -> 'ok' when
This::wxHtmlEasyPrinting(), Footer::unicode:chardata().
setFooter(This,Footer)
@@ -200,9 +200,9 @@ setFooter(This,Footer)
setFooter(This,Footer, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmleasyprinting.html#wxhtmleasyprintingsetfooter">external documentation</a>.
--spec setFooter(This, Footer, [Option]) -> ok when
+-spec setFooter(This, Footer, [Option]) -> 'ok' when
This::wxHtmlEasyPrinting(), Footer::unicode:chardata(),
- Option :: {pg, integer()}.
+ Option :: {'pg', integer()}.
setFooter(#wx_ref{type=ThisT,ref=ThisRef},Footer, Options)
when is_list(Footer),is_list(Options) ->
?CLASS(ThisT,wxHtmlEasyPrinting),
@@ -214,7 +214,7 @@ setFooter(#wx_ref{type=ThisT,ref=ThisRef},Footer, Options)
<<ThisRef:32/?UI,(byte_size(Footer_UC)):32/?UI,(Footer_UC)/binary, 0:(((8- ((0+byte_size(Footer_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxHtmlEasyPrinting()) -> ok.
+-spec destroy(This::wxHtmlEasyPrinting()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxHtmlEasyPrinting),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxHtmlWindow.erl b/lib/wx/src/gen/wxHtmlWindow.erl
index 759b8ba0fd..f9bb135fcf 100644
--- a/lib/wx/src/gen/wxHtmlWindow.erl
+++ b/lib/wx/src/gen/wxHtmlWindow.erl
@@ -107,10 +107,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowwxhtmlwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxHtmlWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -190,7 +190,7 @@ historyCanForward(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowhistoryclear">external documentation</a>.
--spec historyClear(This) -> ok when
+-spec historyClear(This) -> 'ok' when
This::wxHtmlWindow().
historyClear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -226,7 +226,7 @@ loadPage(#wx_ref{type=ThisT,ref=ThisRef},Location)
<<ThisRef:32/?UI,(byte_size(Location_UC)):32/?UI,(Location_UC)/binary, 0:(((8- ((0+byte_size(Location_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowselectall">external documentation</a>.
--spec selectAll(This) -> ok when
+-spec selectAll(This) -> 'ok' when
This::wxHtmlWindow().
selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -242,7 +242,7 @@ selectionToText(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowselectline">external documentation</a>.
--spec selectLine(This, Pos) -> ok when
+-spec selectLine(This, Pos) -> 'ok' when
This::wxHtmlWindow(), Pos::{X::integer(), Y::integer()}.
selectLine(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
@@ -251,7 +251,7 @@ selectLine(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowselectword">external documentation</a>.
--spec selectWord(This, Pos) -> ok when
+-spec selectWord(This, Pos) -> 'ok' when
This::wxHtmlWindow(), Pos::{X::integer(), Y::integer()}.
selectWord(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
when is_integer(PosX),is_integer(PosY) ->
@@ -260,7 +260,7 @@ selectWord(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY})
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowsetborders">external documentation</a>.
--spec setBorders(This, B) -> ok when
+-spec setBorders(This, B) -> 'ok' when
This::wxHtmlWindow(), B::integer().
setBorders(#wx_ref{type=ThisT,ref=ThisRef},B)
when is_integer(B) ->
@@ -269,7 +269,7 @@ setBorders(#wx_ref{type=ThisT,ref=ThisRef},B)
<<ThisRef:32/?UI,B:32/?UI>>).
%% @equiv setFonts(This,Normal_face,Fixed_face, [])
--spec setFonts(This, Normal_face, Fixed_face) -> ok when
+-spec setFonts(This, Normal_face, Fixed_face) -> 'ok' when
This::wxHtmlWindow(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata().
setFonts(This,Normal_face,Fixed_face)
@@ -277,9 +277,9 @@ setFonts(This,Normal_face,Fixed_face)
setFonts(This,Normal_face,Fixed_face, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowsetfonts">external documentation</a>.
--spec setFonts(This, Normal_face, Fixed_face, [Option]) -> ok when
+-spec setFonts(This, Normal_face, Fixed_face, [Option]) -> 'ok' when
This::wxHtmlWindow(), Normal_face::unicode:chardata(), Fixed_face::unicode:chardata(),
- Option :: {sizes, integer()}.
+ Option :: {'sizes', integer()}.
setFonts(#wx_ref{type=ThisT,ref=ThisRef},Normal_face,Fixed_face, Options)
when is_list(Normal_face),is_list(Fixed_face),is_list(Options) ->
?CLASS(ThisT,wxHtmlWindow),
@@ -302,7 +302,7 @@ setPage(#wx_ref{type=ThisT,ref=ThisRef},Source)
<<ThisRef:32/?UI,(byte_size(Source_UC)):32/?UI,(Source_UC)/binary, 0:(((8- ((0+byte_size(Source_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowsetrelatedframe">external documentation</a>.
--spec setRelatedFrame(This, Frame, Format) -> ok when
+-spec setRelatedFrame(This, Frame, Format) -> 'ok' when
This::wxHtmlWindow(), Frame::wxFrame:wxFrame(), Format::unicode:chardata().
setRelatedFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef},Format)
when is_list(Format) ->
@@ -313,7 +313,7 @@ setRelatedFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef
<<ThisRef:32/?UI,FrameRef:32/?UI,(byte_size(Format_UC)):32/?UI,(Format_UC)/binary, 0:(((8- ((4+byte_size(Format_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxhtmlwindow.html#wxhtmlwindowsetrelatedstatusbar">external documentation</a>.
--spec setRelatedStatusBar(This, Bar) -> ok when
+-spec setRelatedStatusBar(This, Bar) -> 'ok' when
This::wxHtmlWindow(), Bar::integer().
setRelatedStatusBar(#wx_ref{type=ThisT,ref=ThisRef},Bar)
when is_integer(Bar) ->
@@ -330,7 +330,7 @@ toText(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxHtmlWindow()) -> ok.
+-spec destroy(This::wxHtmlWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxHtmlWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxIcon.erl b/lib/wx/src/gen/wxIcon.erl
index a14d76e270..c9ec32dffc 100644
--- a/lib/wx/src/gen/wxIcon.erl
+++ b/lib/wx/src/gen/wxIcon.erl
@@ -71,9 +71,9 @@ new(#wx_ref{type=LocT,ref=LocRef}) ->
%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
-spec new(Filename, [Option]) -> wxIcon() when
Filename::unicode:chardata(),
- Option :: {type, wx:wx_enum()}
- | {desiredWidth, integer()}
- | {desiredHeight, integer()}.
+ Option :: {'type', wx:wx_enum()}
+ | {'desiredWidth', integer()}
+ | {'desiredHeight', integer()}.
new(Filename, Options)
when is_list(Filename),is_list(Options) ->
Filename_UC = unicode:characters_to_binary([Filename,0]),
@@ -86,7 +86,7 @@ new(Filename, Options)
<<(byte_size(Filename_UC)):32/?UI,(Filename_UC)/binary, 0:(((8- ((4+byte_size(Filename_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxicon.html#wxiconcopyfrombitmap">external documentation</a>.
--spec copyFromBitmap(This, Bmp) -> ok when
+-spec copyFromBitmap(This, Bmp) -> 'ok' when
This::wxIcon(), Bmp::wxBitmap:wxBitmap().
copyFromBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(ThisT,wxIcon),
@@ -95,7 +95,7 @@ copyFromBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
<<ThisRef:32/?UI,BmpRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxIcon()) -> ok.
+-spec destroy(This::wxIcon()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxIcon),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxIconBundle.erl b/lib/wx/src/gen/wxIconBundle.erl
index 8edfdc48b8..47785963e3 100644
--- a/lib/wx/src/gen/wxIconBundle.erl
+++ b/lib/wx/src/gen/wxIconBundle.erl
@@ -64,7 +64,7 @@ new(File,Type)
<<(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((4+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
--spec addIcon(This, Icon) -> ok when
+-spec addIcon(This, Icon) -> 'ok' when
This::wxIconBundle(), Icon::wxIcon:wxIcon().
addIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
?CLASS(ThisT,wxIconBundle),
@@ -73,7 +73,7 @@ addIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
<<ThisRef:32/?UI,IconRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
--spec addIcon(This, File, Type) -> ok when
+-spec addIcon(This, File, Type) -> 'ok' when
This::wxIconBundle(), File::unicode:chardata(), Type::integer().
addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type)
when is_list(File),is_integer(Type) ->
@@ -97,7 +97,7 @@ getIcon(This)
%%
-spec getIcon(This, [Option]) -> wxIcon:wxIcon() when
This::wxIconBundle(),
- Option :: {size, integer()};
+ Option :: {'size', integer()};
(This, Size) -> wxIcon:wxIcon() when
This::wxIconBundle(), Size::{W::integer(), H::integer()}.
getIcon(#wx_ref{type=ThisT,ref=ThisRef}, Options)
@@ -115,7 +115,7 @@ getIcon(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxIconBundle()) -> ok.
+-spec destroy(This::wxIconBundle()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxIconBundle),
wxe_util:destroy(?wxIconBundle_destruct,Obj),
diff --git a/lib/wx/src/gen/wxIdleEvent.erl b/lib/wx/src/gen/wxIdleEvent.erl
index bcccf713f3..1cb3e34ef6 100644
--- a/lib/wx/src/gen/wxIdleEvent.erl
+++ b/lib/wx/src/gen/wxIdleEvent.erl
@@ -62,7 +62,7 @@ getMode() ->
<<>>).
%% @equiv requestMore(This, [])
--spec requestMore(This) -> ok when
+-spec requestMore(This) -> 'ok' when
This::wxIdleEvent().
requestMore(This)
@@ -70,9 +70,9 @@ requestMore(This)
requestMore(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxidleevent.html#wxidleeventrequestmore">external documentation</a>.
--spec requestMore(This, [Option]) -> ok when
+-spec requestMore(This, [Option]) -> 'ok' when
This::wxIdleEvent(),
- Option :: {needMore, boolean()}.
+ Option :: {'needMore', boolean()}.
requestMore(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxIdleEvent),
@@ -92,7 +92,7 @@ moreRequested(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxidleevent.html#wxidleeventsetmode">external documentation</a>.
%%<br /> Mode = ?wxIDLE_PROCESS_ALL | ?wxIDLE_PROCESS_SPECIFIED
--spec setMode(Mode) -> ok when
+-spec setMode(Mode) -> 'ok' when
Mode::wx:wx_enum().
setMode(Mode)
when is_integer(Mode) ->
diff --git a/lib/wx/src/gen/wxImage.erl b/lib/wx/src/gen/wxImage.erl
index 884e49eabf..e82f3d609e 100644
--- a/lib/wx/src/gen/wxImage.erl
+++ b/lib/wx/src/gen/wxImage.erl
@@ -71,15 +71,15 @@ new(Name)
%% <br /> Also:<br />
%% new(Name, [Option]) -> wxImage() when<br />
%% Name::unicode:chardata(),<br />
-%% Option :: {type, integer()}<br />
-%% | {index, integer()}.<br />
+%% Option :: {'type', integer()}<br />
+%% | {'index', integer()}.<br />
%%
-spec new(Width, Height) -> wxImage() when
Width::integer(), Height::integer();
(Name, [Option]) -> wxImage() when
Name::unicode:chardata(),
- Option :: {type, integer()}
- | {index, integer()}.
+ Option :: {'type', integer()}
+ | {'index', integer()}.
new(Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -98,19 +98,19 @@ new(Name, Options)
%% <br /> Also:<br />
%% new(Width, Height, [Option]) -> wxImage() when<br />
%% Width::integer(), Height::integer(),<br />
-%% Option :: {clear, boolean()};<br />
+%% Option :: {'clear', boolean()};<br />
%% (Name, Mimetype, [Option]) -> wxImage() when<br />
%% Name::unicode:chardata(), Mimetype::unicode:chardata(),<br />
-%% Option :: {index, integer()}.<br />
+%% Option :: {'index', integer()}.<br />
%%
-spec new(Width, Height, Data) -> wxImage() when
Width::integer(), Height::integer(), Data::binary();
(Width, Height, [Option]) -> wxImage() when
Width::integer(), Height::integer(),
- Option :: {clear, boolean()};
+ Option :: {'clear', boolean()};
(Name, Mimetype, [Option]) -> wxImage() when
Name::unicode:chardata(), Mimetype::unicode:chardata(),
- Option :: {index, integer()}.
+ Option :: {'index', integer()}.
new(Width,Height,Data)
when is_integer(Width),is_integer(Height),is_binary(Data) ->
@@ -136,13 +136,13 @@ new(Name,Mimetype, Options)
%% <br /> Also:<br />
%% new(Width, Height, Data, [Option]) -> wxImage() when<br />
%% Width::integer(), Height::integer(), Data::binary(),<br />
-%% Option :: {static_data, boolean()}.<br />
+%% Option :: {'static_data', boolean()}.<br />
%%
-spec new(Width, Height, Data, Alpha) -> wxImage() when
Width::integer(), Height::integer(), Data::binary(), Alpha::binary();
(Width, Height, Data, [Option]) -> wxImage() when
Width::integer(), Height::integer(), Data::binary(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
new(Width,Height,Data,Alpha)
when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) ->
@@ -159,7 +159,7 @@ new(Width,Height,Data, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
-spec new(Width, Height, Data, Alpha, [Option]) -> wxImage() when
Width::integer(), Height::integer(), Data::binary(), Alpha::binary(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
new(Width,Height,Data,Alpha, Options)
when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) ->
wxe_util:send_bin(Data),
@@ -208,7 +208,7 @@ convertAlphaToMask(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconvertalphatomask">external documentation</a>.
-spec convertAlphaToMask(This, [Option]) -> boolean() when
This::wxImage(),
- Option :: {threshold, integer()}.
+ Option :: {'threshold', integer()}.
convertAlphaToMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -229,9 +229,9 @@ convertToGreyscale(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconverttogreyscale">external documentation</a>.
-spec convertToGreyscale(This, [Option]) -> wxImage() when
This::wxImage(),
- Option :: {lr, number()}
- | {lg, number()}
- | {lb, number()}.
+ Option :: {'lr', number()}
+ | {'lg', number()}
+ | {'lb', number()}.
convertToGreyscale(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -272,13 +272,13 @@ create(This,Width,Height)
%% <br /> Also:<br />
%% create(This, Width, Height, [Option]) -> boolean() when<br />
%% This::wxImage(), Width::integer(), Height::integer(),<br />
-%% Option :: {clear, boolean()}.<br />
+%% Option :: {'clear', boolean()}.<br />
%%
-spec create(This, Width, Height, Data) -> boolean() when
This::wxImage(), Width::integer(), Height::integer(), Data::binary();
(This, Width, Height, [Option]) -> boolean() when
This::wxImage(), Width::integer(), Height::integer(),
- Option :: {clear, boolean()}.
+ Option :: {'clear', boolean()}.
create(This,Width,Height,Data)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data) ->
@@ -296,13 +296,13 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
%% <br /> Also:<br />
%% create(This, Width, Height, Data, [Option]) -> boolean() when<br />
%% This::wxImage(), Width::integer(), Height::integer(), Data::binary(),<br />
-%% Option :: {static_data, boolean()}.<br />
+%% Option :: {'static_data', boolean()}.<br />
%%
-spec create(This, Width, Height, Data, Alpha) -> boolean() when
This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary();
(This, Width, Height, Data, [Option]) -> boolean() when
This::wxImage(), Width::integer(), Height::integer(), Data::binary(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
create(This,Width,Height,Data,Alpha)
when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) ->
@@ -320,7 +320,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagecreate">external documentation</a>.
-spec create(This, Width, Height, Data, Alpha, [Option]) -> boolean() when
This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data,Alpha, Options)
when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -333,7 +333,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data,Alpha, Options)
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagedestroy">external documentation</a>.
--spec 'Destroy'(This) -> ok when
+-spec 'Destroy'(This) -> 'ok' when
This::wxImage().
'Destroy'(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
@@ -353,9 +353,9 @@ findFirstUnusedColour(This)
-spec findFirstUnusedColour(This, [Option]) -> Result when
Result :: {Res ::boolean(), R::integer(), G::integer(), B::integer()},
This::wxImage(),
- Option :: {startR, integer()}
- | {startG, integer()}
- | {startB, integer()}.
+ Option :: {'startR', integer()}
+ | {'startG', integer()}
+ | {'startB', integer()}.
findFirstUnusedColour(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -428,7 +428,7 @@ getImageCount(Name)
%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
-spec getImageCount(Name, [Option]) -> integer() when
Name::unicode:chardata(),
- Option :: {type, wx:wx_enum()}.
+ Option :: {'type', wx:wx_enum()}.
getImageCount(Name, Options)
when is_list(Name),is_list(Options) ->
Name_UC = unicode:characters_to_binary([Name,0]),
@@ -560,7 +560,7 @@ hasOption(#wx_ref{type=ThisT,ref=ThisRef},Name)
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageinitalpha">external documentation</a>.
--spec initAlpha(This) -> ok when
+-spec initAlpha(This) -> 'ok' when
This::wxImage().
initAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxImage),
@@ -568,7 +568,7 @@ initAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageinitstandardhandlers">external documentation</a>.
--spec initStandardHandlers() -> ok.
+-spec initStandardHandlers() -> 'ok'.
initStandardHandlers() ->
wxe_util:cast(?wxImage_InitStandardHandlers,
<<>>).
@@ -584,7 +584,7 @@ isTransparent(This,X,Y)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageistransparent">external documentation</a>.
-spec isTransparent(This, X, Y, [Option]) -> boolean() when
This::wxImage(), X::integer(), Y::integer(),
- Option :: {threshold, integer()}.
+ Option :: {'threshold', integer()}.
isTransparent(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
when is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -605,8 +605,8 @@ loadFile(This,Name)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageloadfile">external documentation</a>.
-spec loadFile(This, Name, [Option]) -> boolean() when
This::wxImage(), Name::unicode:chardata(),
- Option :: {type, integer()}
- | {index, integer()}.
+ Option :: {'type', integer()}
+ | {'index', integer()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
when is_list(Name),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -621,7 +621,7 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageloadfile">external documentation</a>.
-spec loadFile(This, Name, Mimetype, [Option]) -> boolean() when
This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata(),
- Option :: {index, integer()}.
+ Option :: {'index', integer()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Mimetype, Options)
when is_list(Name),is_list(Mimetype),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -661,7 +661,7 @@ mirror(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagemirror">external documentation</a>.
-spec mirror(This, [Option]) -> wxImage() when
This::wxImage(),
- Option :: {horizontally, boolean()}.
+ Option :: {'horizontally', boolean()}.
mirror(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -672,7 +672,7 @@ mirror(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagereplace">external documentation</a>.
--spec replace(This, R1, G1, B1, R2, G2, B2) -> ok when
+-spec replace(This, R1, G1, B1, R2, G2, B2) -> 'ok' when
This::wxImage(), R1::integer(), G1::integer(), B1::integer(), R2::integer(), G2::integer(), B2::integer().
replace(#wx_ref{type=ThisT,ref=ThisRef},R1,G1,B1,R2,G2,B2)
when is_integer(R1),is_integer(G1),is_integer(B1),is_integer(R2),is_integer(G2),is_integer(B2) ->
@@ -692,7 +692,7 @@ rescale(This,Width,Height)
%%<br /> Quality = integer
-spec rescale(This, Width, Height, [Option]) -> wxImage() when
This::wxImage(), Width::integer(), Height::integer(),
- Option :: {quality, wx:wx_enum()}.
+ Option :: {'quality', wx:wx_enum()}.
rescale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -713,9 +713,9 @@ resize(This,Size={SizeW,SizeH},Pos={PosX,PosY})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageresize">external documentation</a>.
-spec resize(This, Size, Pos, [Option]) -> wxImage() when
This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()},
- Option :: {r, integer()}
- | {g, integer()}
- | {b, integer()}.
+ Option :: {'r', integer()}
+ | {'g', integer()}
+ | {'b', integer()}.
resize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -738,8 +738,8 @@ rotate(This,Angle,Centre_of_rotation={Centre_of_rotationX,Centre_of_rotationY})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerotate">external documentation</a>.
-spec rotate(This, Angle, Centre_of_rotation, [Option]) -> wxImage() when
This::wxImage(), Angle::number(), Centre_of_rotation::{X::integer(), Y::integer()},
- Option :: {interpolating, boolean()}
- | {offset_after_rotation, {X::integer(), Y::integer()}}.
+ Option :: {'interpolating', boolean()}
+ | {'offset_after_rotation', {X::integer(), Y::integer()}}.
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle,{Centre_of_rotationX,Centre_of_rotationY}, Options)
when is_number(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -751,7 +751,7 @@ rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle,{Centre_of_rotationX,Centre_of_rota
<<ThisRef:32/?UI,0:32,Angle:64/?F,Centre_of_rotationX:32/?UI,Centre_of_rotationY:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerotatehue">external documentation</a>.
--spec rotateHue(This, Angle) -> ok when
+-spec rotateHue(This, Angle) -> 'ok' when
This::wxImage(), Angle::number().
rotateHue(#wx_ref{type=ThisT,ref=ThisRef},Angle)
when is_number(Angle) ->
@@ -770,7 +770,7 @@ rotate90(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerotate90">external documentation</a>.
-spec rotate90(This, [Option]) -> wxImage() when
This::wxImage(),
- Option :: {clockwise, boolean()}.
+ Option :: {'clockwise', boolean()}.
rotate90(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -825,7 +825,7 @@ scale(This,Width,Height)
%%<br /> Quality = integer
-spec scale(This, Width, Height, [Option]) -> wxImage() when
This::wxImage(), Width::integer(), Height::integer(),
- Option :: {quality, wx:wx_enum()}.
+ Option :: {'quality', wx:wx_enum()}.
scale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -846,9 +846,9 @@ size(This,Size={SizeW,SizeH},Pos={PosX,PosY})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesize">external documentation</a>.
-spec size(This, Size, Pos, [Option]) -> wxImage() when
This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()},
- Option :: {r, integer()}
- | {g, integer()}
- | {b, integer()}.
+ Option :: {'r', integer()}
+ | {'g', integer()}
+ | {'b', integer()}.
size(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -861,7 +861,7 @@ size(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options)
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI,PosX:32/?UI,PosY:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setAlpha(This,Alpha, [])
--spec setAlpha(This, Alpha) -> ok when
+-spec setAlpha(This, Alpha) -> 'ok' when
This::wxImage(), Alpha::binary().
setAlpha(This,Alpha)
@@ -869,9 +869,9 @@ setAlpha(This,Alpha)
setAlpha(This,Alpha, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetalpha">external documentation</a>.
--spec setAlpha(This, Alpha, [Option]) -> ok when
+-spec setAlpha(This, Alpha, [Option]) -> 'ok' when
This::wxImage(), Alpha::binary(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
setAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha, Options)
when is_binary(Alpha),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -883,7 +883,7 @@ setAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetalpha">external documentation</a>.
--spec setAlpha(This, X, Y, Alpha) -> ok when
+-spec setAlpha(This, X, Y, Alpha) -> 'ok' when
This::wxImage(), X::integer(), Y::integer(), Alpha::integer().
setAlpha(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Alpha)
when is_integer(X),is_integer(Y),is_integer(Alpha) ->
@@ -892,7 +892,7 @@ setAlpha(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Alpha)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Alpha:32/?UI>>).
%% @equiv setData(This,Data, [])
--spec setData(This, Data) -> ok when
+-spec setData(This, Data) -> 'ok' when
This::wxImage(), Data::binary().
setData(This,Data)
@@ -900,9 +900,9 @@ setData(This,Data)
setData(This,Data, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetdata">external documentation</a>.
--spec setData(This, Data, [Option]) -> ok when
+-spec setData(This, Data, [Option]) -> 'ok' when
This::wxImage(), Data::binary(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
setData(#wx_ref{type=ThisT,ref=ThisRef},Data, Options)
when is_binary(Data),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -914,7 +914,7 @@ setData(#wx_ref{type=ThisT,ref=ThisRef},Data, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setData(This,Data,New_width,New_height, [])
--spec setData(This, Data, New_width, New_height) -> ok when
+-spec setData(This, Data, New_width, New_height) -> 'ok' when
This::wxImage(), Data::binary(), New_width::integer(), New_height::integer().
setData(This,Data,New_width,New_height)
@@ -922,9 +922,9 @@ setData(This,Data,New_width,New_height)
setData(This,Data,New_width,New_height, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetdata">external documentation</a>.
--spec setData(This, Data, New_width, New_height, [Option]) -> ok when
+-spec setData(This, Data, New_width, New_height, [Option]) -> 'ok' when
This::wxImage(), Data::binary(), New_width::integer(), New_height::integer(),
- Option :: {static_data, boolean()}.
+ Option :: {'static_data', boolean()}.
setData(#wx_ref{type=ThisT,ref=ThisRef},Data,New_width,New_height, Options)
when is_binary(Data),is_integer(New_width),is_integer(New_height),is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -936,7 +936,7 @@ setData(#wx_ref{type=ThisT,ref=ThisRef},Data,New_width,New_height, Options)
<<ThisRef:32/?UI,New_width:32/?UI,New_height:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setMask(This, [])
--spec setMask(This) -> ok when
+-spec setMask(This) -> 'ok' when
This::wxImage().
setMask(This)
@@ -944,9 +944,9 @@ setMask(This)
setMask(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetmask">external documentation</a>.
--spec setMask(This, [Option]) -> ok when
+-spec setMask(This, [Option]) -> 'ok' when
This::wxImage(),
- Option :: {mask, boolean()}.
+ Option :: {'mask', boolean()}.
setMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxImage),
@@ -957,7 +957,7 @@ setMask(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetmaskcolour">external documentation</a>.
--spec setMaskColour(This, R, G, B) -> ok when
+-spec setMaskColour(This, R, G, B) -> 'ok' when
This::wxImage(), R::integer(), G::integer(), B::integer().
setMaskColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B)
when is_integer(R),is_integer(G),is_integer(B) ->
@@ -977,12 +977,12 @@ setMaskFromImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef}
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetoption">external documentation</a>.
%% <br /> Also:<br />
-%% setOption(This, Name, Value) -> ok when<br />
+%% setOption(This, Name, Value) -> 'ok' when<br />
%% This::wxImage(), Name::unicode:chardata(), Value::unicode:chardata().<br />
%%
--spec setOption(This, Name, Value) -> ok when
+-spec setOption(This, Name, Value) -> 'ok' when
This::wxImage(), Name::unicode:chardata(), Value::integer();
- (This, Name, Value) -> ok when
+ (This, Name, Value) -> 'ok' when
This::wxImage(), Name::unicode:chardata(), Value::unicode:chardata().
setOption(#wx_ref{type=ThisT,ref=ThisRef},Name,Value)
when is_list(Name),is_integer(Value) ->
@@ -999,7 +999,7 @@ setOption(#wx_ref{type=ThisT,ref=ThisRef},Name,Value)
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetpalette">external documentation</a>.
--spec setPalette(This, Palette) -> ok when
+-spec setPalette(This, Palette) -> 'ok' when
This::wxImage(), Palette::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) ->
?CLASS(ThisT,wxImage),
@@ -1008,7 +1008,7 @@ setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}
<<ThisRef:32/?UI,PaletteRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetrgb">external documentation</a>.
--spec setRGB(This, Rect, R, G, B) -> ok when
+-spec setRGB(This, Rect, R, G, B) -> 'ok' when
This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, R::integer(), G::integer(), B::integer().
setRGB(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},R,G,B)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_integer(R),is_integer(G),is_integer(B) ->
@@ -1017,7 +1017,7 @@ setRGB(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},R,G,B)
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetrgb">external documentation</a>.
--spec setRGB(This, X, Y, R, G, B) -> ok when
+-spec setRGB(This, X, Y, R, G, B) -> 'ok' when
This::wxImage(), X::integer(), Y::integer(), R::integer(), G::integer(), B::integer().
setRGB(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,G,B)
when is_integer(X),is_integer(Y),is_integer(R),is_integer(G),is_integer(B) ->
@@ -1026,7 +1026,7 @@ setRGB(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,G,B)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,R:32/?UI,G:32/?UI,B:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxImage()) -> ok.
+-spec destroy(This::wxImage()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxImage),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxImageList.erl b/lib/wx/src/gen/wxImageList.erl
index dcd508d05b..39a44c0afe 100644
--- a/lib/wx/src/gen/wxImageList.erl
+++ b/lib/wx/src/gen/wxImageList.erl
@@ -54,8 +54,8 @@ new(Width,Height)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximagelist.html#wximagelistwximagelist">external documentation</a>.
-spec new(Width, Height, [Option]) -> wxImageList() when
Width::integer(), Height::integer(),
- Option :: {mask, boolean()}
- | {initialCount, integer()}.
+ Option :: {'mask', boolean()}
+ | {'initialCount', integer()}.
new(Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
MOpts = fun({mask, Mask}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Mask)):32/?UI>>|Acc];
@@ -107,8 +107,8 @@ create(This,Width,Height)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximagelist.html#wximagelistcreate">external documentation</a>.
-spec create(This, Width, Height, [Option]) -> boolean() when
This::wxImageList(), Width::integer(), Height::integer(),
- Option :: {mask, boolean()}
- | {initialCount, integer()}.
+ Option :: {'mask', boolean()}
+ | {'initialCount', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxImageList),
@@ -130,8 +130,8 @@ draw(This,Index,Dc,X,Y)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximagelist.html#wximagelistdraw">external documentation</a>.
-spec draw(This, Index, Dc, X, Y, [Option]) -> boolean() when
This::wxImageList(), Index::integer(), Dc::wxDC:wxDC(), X::integer(), Y::integer(),
- Option :: {flags, integer()}
- | {solidBackground, boolean()}.
+ Option :: {'flags', integer()}
+ | {'solidBackground', boolean()}.
draw(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=DcT,ref=DcRef},X,Y, Options)
when is_integer(Index),is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ThisT,wxImageList),
@@ -218,7 +218,7 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=BitmapT,ref=BitmapRef
<<ThisRef:32/?UI,Index:32/?UI,BitmapRef:32/?UI,MaskRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxImageList()) -> ok.
+-spec destroy(This::wxImageList()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxImageList),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxJoystickEvent.erl b/lib/wx/src/gen/wxJoystickEvent.erl
index d26eb42fe8..6bad079953 100644
--- a/lib/wx/src/gen/wxJoystickEvent.erl
+++ b/lib/wx/src/gen/wxJoystickEvent.erl
@@ -57,7 +57,7 @@ buttonDown(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxjoystickevent.html#wxjoystickeventbuttondown">external documentation</a>.
-spec buttonDown(This, [Option]) -> boolean() when
This::wxJoystickEvent(),
- Option :: {but, integer()}.
+ Option :: {'but', integer()}.
buttonDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxJoystickEvent),
@@ -78,7 +78,7 @@ buttonIsDown(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxjoystickevent.html#wxjoystickeventbuttonisdown">external documentation</a>.
-spec buttonIsDown(This, [Option]) -> boolean() when
This::wxJoystickEvent(),
- Option :: {but, integer()}.
+ Option :: {'but', integer()}.
buttonIsDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxJoystickEvent),
@@ -99,7 +99,7 @@ buttonUp(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxjoystickevent.html#wxjoystickeventbuttonup">external documentation</a>.
-spec buttonUp(This, [Option]) -> boolean() when
This::wxJoystickEvent(),
- Option :: {but, integer()}.
+ Option :: {'but', integer()}.
buttonUp(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxJoystickEvent),
diff --git a/lib/wx/src/gen/wxLayoutAlgorithm.erl b/lib/wx/src/gen/wxLayoutAlgorithm.erl
index 344af3dc0d..f389b83281 100644
--- a/lib/wx/src/gen/wxLayoutAlgorithm.erl
+++ b/lib/wx/src/gen/wxLayoutAlgorithm.erl
@@ -53,7 +53,7 @@ layoutFrame(This,Frame)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlayoutalgorithm.html#wxlayoutalgorithmlayoutframe">external documentation</a>.
-spec layoutFrame(This, Frame, [Option]) -> boolean() when
This::wxLayoutAlgorithm(), Frame::wxFrame:wxFrame(),
- Option :: {mainWindow, wxWindow:wxWindow()}.
+ Option :: {'mainWindow', wxWindow:wxWindow()}.
layoutFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLayoutAlgorithm),
@@ -75,7 +75,7 @@ layoutMDIFrame(This,Frame)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlayoutalgorithm.html#wxlayoutalgorithmlayoutmdiframe">external documentation</a>.
-spec layoutMDIFrame(This, Frame, [Option]) -> boolean() when
This::wxLayoutAlgorithm(), Frame::wxMDIParentFrame:wxMDIParentFrame(),
- Option :: {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}.
+ Option :: {'rect', {X::integer(), Y::integer(), W::integer(), H::integer()}}.
layoutMDIFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLayoutAlgorithm),
@@ -97,7 +97,7 @@ layoutWindow(This,Frame)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlayoutalgorithm.html#wxlayoutalgorithmlayoutwindow">external documentation</a>.
-spec layoutWindow(This, Frame, [Option]) -> boolean() when
This::wxLayoutAlgorithm(), Frame::wxWindow:wxWindow(),
- Option :: {mainWindow, wxWindow:wxWindow()}.
+ Option :: {'mainWindow', wxWindow:wxWindow()}.
layoutWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLayoutAlgorithm),
@@ -109,7 +109,7 @@ layoutWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef},
<<ThisRef:32/?UI,FrameRef:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxLayoutAlgorithm()) -> ok.
+-spec destroy(This::wxLayoutAlgorithm()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxLayoutAlgorithm),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListBox.erl b/lib/wx/src/gen/wxListBox.erl
index eaa026839e..9ab3616e9b 100644
--- a/lib/wx/src/gen/wxListBox.erl
+++ b/lib/wx/src/gen/wxListBox.erl
@@ -103,11 +103,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbox.html#wxlistboxwxlistbox">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxListBox() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {choices, [unicode:chardata()]}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'choices', [unicode:chardata()]}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -132,8 +132,8 @@ create(This,Parent,Id,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbox.html#wxlistboxcreate">external documentation</a>.
-spec create(This, Parent, Id, Pos, Size, Choices, [Option]) -> boolean() when
This::wxListBox(), Parent::wxWindow:wxWindow(), Id::integer(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[unicode:chardata()],
- Option :: {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxListBox),
@@ -148,7 +148,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,{P
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI,(length(Choices_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbox.html#wxlistboxdeselect">external documentation</a>.
--spec deselect(This, N) -> ok when
+-spec deselect(This, N) -> 'ok' when
This::wxListBox(), N::integer().
deselect(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -166,7 +166,7 @@ getSelections(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbox.html#wxlistboxinsertitems">external documentation</a>.
--spec insertItems(This, Items, Pos) -> ok when
+-spec insertItems(This, Items, Pos) -> 'ok' when
This::wxListBox(), Items::[unicode:chardata()], Pos::integer().
insertItems(#wx_ref{type=ThisT,ref=ThisRef},Items,Pos)
when is_list(Items),is_integer(Pos) ->
@@ -186,7 +186,7 @@ isSelected(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbox.html#wxlistboxset">external documentation</a>.
--spec set(This, Items) -> ok when
+-spec set(This, Items) -> 'ok' when
This::wxListBox(), Items::[unicode:chardata()].
set(#wx_ref{type=ThisT,ref=ThisRef},Items)
when is_list(Items) ->
@@ -207,12 +207,12 @@ hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbox.html#wxlistboxsetfirstitem">external documentation</a>.
%% <br /> Also:<br />
-%% setFirstItem(This, S) -> ok when<br />
+%% setFirstItem(This, S) -> 'ok' when<br />
%% This::wxListBox(), S::unicode:chardata().<br />
%%
--spec setFirstItem(This, N) -> ok when
+-spec setFirstItem(This, N) -> 'ok' when
This::wxListBox(), N::integer();
- (This, S) -> ok when
+ (This, S) -> 'ok' when
This::wxListBox(), S::unicode:chardata().
setFirstItem(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -227,7 +227,7 @@ setFirstItem(#wx_ref{type=ThisT,ref=ThisRef},S)
<<ThisRef:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((0+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxListBox()) -> ok.
+-spec destroy(This::wxListBox()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListCtrl.erl b/lib/wx/src/gen/wxListCtrl.erl
index ed997710c8..d1a063d900 100644
--- a/lib/wx/src/gen/wxListCtrl.erl
+++ b/lib/wx/src/gen/wxListCtrl.erl
@@ -156,7 +156,7 @@ arrange(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlarrange">external documentation</a>.
-spec arrange(This, [Option]) -> boolean() when
This::wxListCtrl(),
- Option :: {flag, integer()}.
+ Option :: {'flag', integer()}.
arrange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -167,7 +167,7 @@ arrange(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList, Which) -> ok when
+-spec assignImageList(This, ImageList, Which) -> 'ok' when
This::wxListCtrl(), ImageList::wxImageList:wxImageList(), Which::integer().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef},Which)
when is_integer(Which) ->
@@ -177,7 +177,7 @@ assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=Imag
<<ThisRef:32/?UI,ImageListRef:32/?UI,Which:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlclearall">external documentation</a>.
--spec clearAll(This) -> ok when
+-spec clearAll(This) -> 'ok' when
This::wxListCtrl().
clearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListCtrl),
@@ -278,7 +278,7 @@ findItem(This,Start,Str)
%%
-spec findItem(This, Start, Str, [Option]) -> integer() when
This::wxListCtrl(), Start::integer(), Str::unicode:chardata(),
- Option :: {partial, boolean()};
+ Option :: {'partial', boolean()};
(This, Start, Pt, Direction) -> integer() when
This::wxListCtrl(), Start::integer(), Pt::{X::integer(), Y::integer()}, Direction::integer().
findItem(#wx_ref{type=ThisT,ref=ThisRef},Start,Str, Options)
@@ -415,7 +415,7 @@ getItemRect(This,Item)
-spec getItemRect(This, Item, [Option]) -> Result when
Result :: {Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}},
This::wxListCtrl(), Item::integer(),
- Option :: {code, integer()}.
+ Option :: {'code', integer()}.
getItemRect(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -471,8 +471,8 @@ getNextItem(This,Item)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlgetnextitem">external documentation</a>.
-spec getNextItem(This, Item, [Option]) -> integer() when
This::wxListCtrl(), Item::integer(),
- Option :: {geometry, integer()}
- | {state, integer()}.
+ Option :: {'geometry', integer()}
+ | {'state', integer()}.
getNextItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -548,8 +548,8 @@ insertColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,#wx_ref{type=InfoT,ref=InfoRef}
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlinsertcolumn">external documentation</a>.
-spec insertColumn(This, Col, Heading, [Option]) -> integer() when
This::wxListCtrl(), Col::integer(), Heading::unicode:chardata(),
- Option :: {format, integer()}
- | {width, integer()}.
+ Option :: {'format', integer()}
+ | {'width', integer()}.
insertColumn(#wx_ref{type=ThisT,ref=ThisRef},Col,Heading, Options)
when is_integer(Col),is_list(Heading),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -602,7 +602,7 @@ insertItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Label,ImageIndex)
<<ThisRef:32/?UI,Index:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8,ImageIndex:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlrefreshitem">external documentation</a>.
--spec refreshItem(This, Item) -> ok when
+-spec refreshItem(This, Item) -> 'ok' when
This::wxListCtrl(), Item::integer().
refreshItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -611,7 +611,7 @@ refreshItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,Item:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlrefreshitems">external documentation</a>.
--spec refreshItems(This, ItemFrom, ItemTo) -> ok when
+-spec refreshItems(This, ItemFrom, ItemTo) -> 'ok' when
This::wxListCtrl(), ItemFrom::integer(), ItemTo::integer().
refreshItems(#wx_ref{type=ThisT,ref=ThisRef},ItemFrom,ItemTo)
when is_integer(ItemFrom),is_integer(ItemTo) ->
@@ -657,7 +657,7 @@ setColumnWidth(#wx_ref{type=ThisT,ref=ThisRef},Col,Width)
<<ThisRef:32/?UI,Col:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetimagelist">external documentation</a>.
--spec setImageList(This, ImageList, Which) -> ok when
+-spec setImageList(This, ImageList, Which) -> 'ok' when
This::wxListCtrl(), ImageList::wxImageList:wxImageList(), Which::integer().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef},Which)
when is_integer(Which) ->
@@ -686,7 +686,7 @@ setItem(This,Index,Col,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitem">external documentation</a>.
-spec setItem(This, Index, Col, Label, [Option]) -> integer() when
This::wxListCtrl(), Index::integer(), Col::integer(), Label::unicode:chardata(),
- Option :: {imageId, integer()}.
+ Option :: {'imageId', integer()}.
setItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Col,Label, Options)
when is_integer(Index),is_integer(Col),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -698,7 +698,7 @@ setItem(#wx_ref{type=ThisT,ref=ThisRef},Index,Col,Label, Options)
<<ThisRef:32/?UI,Index:32/?UI,Col:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitembackgroundcolour">external documentation</a>.
--spec setItemBackgroundColour(This, Item, Col) -> ok when
+-spec setItemBackgroundColour(This, Item, Col) -> 'ok' when
This::wxListCtrl(), Item::integer(), Col::wx:wx_colour().
setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -707,7 +707,7 @@ setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
<<ThisRef:32/?UI,Item:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitemcount">external documentation</a>.
--spec setItemCount(This, Count) -> ok when
+-spec setItemCount(This, Count) -> 'ok' when
This::wxListCtrl(), Count::integer().
setItemCount(#wx_ref{type=ThisT,ref=ThisRef},Count)
when is_integer(Count) ->
@@ -725,7 +725,7 @@ setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
<<ThisRef:32/?UI,Item:32/?UI,Data:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitemfont">external documentation</a>.
--spec setItemFont(This, Item, F) -> ok when
+-spec setItemFont(This, Item, F) -> 'ok' when
This::wxListCtrl(), Item::integer(), F::wxFont:wxFont().
setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FT,ref=FRef})
when is_integer(Item) ->
@@ -745,7 +745,7 @@ setItemImage(This,Item,Image)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitemimage">external documentation</a>.
-spec setItemImage(This, Item, Image, [Option]) -> boolean() when
This::wxListCtrl(), Item::integer(), Image::integer(),
- Option :: {selImage, integer()}.
+ Option :: {'selImage', integer()}.
setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
when is_integer(Item),is_integer(Image),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -783,7 +783,7 @@ setItemState(#wx_ref{type=ThisT,ref=ThisRef},Item,State,StateMask)
<<ThisRef:32/?UI,Item:32/?UI,State:32/?UI,StateMask:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitemtext">external documentation</a>.
--spec setItemText(This, Item, Str) -> ok when
+-spec setItemText(This, Item, Str) -> 'ok' when
This::wxListCtrl(), Item::integer(), Str::unicode:chardata().
setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Str)
when is_integer(Item),is_list(Str) ->
@@ -793,7 +793,7 @@ setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Str)
<<ThisRef:32/?UI,Item:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((4+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetitemtextcolour">external documentation</a>.
--spec setItemTextColour(This, Item, Col) -> ok when
+-spec setItemTextColour(This, Item, Col) -> 'ok' when
This::wxListCtrl(), Item::integer(), Col::wx:wx_colour().
setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -802,7 +802,7 @@ setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
<<ThisRef:32/?UI,Item:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @equiv setSingleStyle(This,Style, [])
--spec setSingleStyle(This, Style) -> ok when
+-spec setSingleStyle(This, Style) -> 'ok' when
This::wxListCtrl(), Style::integer().
setSingleStyle(This,Style)
@@ -810,9 +810,9 @@ setSingleStyle(This,Style)
setSingleStyle(This,Style, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetsinglestyle">external documentation</a>.
--spec setSingleStyle(This, Style, [Option]) -> ok when
+-spec setSingleStyle(This, Style, [Option]) -> 'ok' when
This::wxListCtrl(), Style::integer(),
- Option :: {add, boolean()}.
+ Option :: {'add', boolean()}.
setSingleStyle(#wx_ref{type=ThisT,ref=ThisRef},Style, Options)
when is_integer(Style),is_list(Options) ->
?CLASS(ThisT,wxListCtrl),
@@ -823,7 +823,7 @@ setSingleStyle(#wx_ref{type=ThisT,ref=ThisRef},Style, Options)
<<ThisRef:32/?UI,Style:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsettextcolour">external documentation</a>.
--spec setTextColour(This, Col) -> ok when
+-spec setTextColour(This, Col) -> 'ok' when
This::wxListCtrl(), Col::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
when tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -832,7 +832,7 @@ setTextColour(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistctrl.html#wxlistctrlsetwindowstyleflag">external documentation</a>.
--spec setWindowStyleFlag(This, Style) -> ok when
+-spec setWindowStyleFlag(This, Style) -> 'ok' when
This::wxListCtrl(), Style::integer().
setWindowStyleFlag(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
@@ -859,7 +859,7 @@ sortItems(#wx_ref{type=ThisT,ref=ThisRef}, SortCallBack)
SortId = wxe_util:get_cbId(Sort),
wxe_util:call(?wxListCtrl_SortItems, <<ThisRef:32/?UI,SortId:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxListCtrl()) -> ok.
+-spec destroy(This::wxListCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListItem.erl b/lib/wx/src/gen/wxListItem.erl
index 0dcad246d0..1530a8c514 100644
--- a/lib/wx/src/gen/wxListItem.erl
+++ b/lib/wx/src/gen/wxListItem.erl
@@ -54,7 +54,7 @@ new(#wx_ref{type=ItemT,ref=ItemRef}) ->
<<ItemRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxListItem().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxListItem),
@@ -152,7 +152,7 @@ getWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetalign">external documentation</a>.
%%<br /> Align = ?wxLIST_FORMAT_LEFT | ?wxLIST_FORMAT_RIGHT | ?wxLIST_FORMAT_CENTRE | ?wxLIST_FORMAT_CENTER
--spec setAlign(This, Align) -> ok when
+-spec setAlign(This, Align) -> 'ok' when
This::wxListItem(), Align::wx:wx_enum().
setAlign(#wx_ref{type=ThisT,ref=ThisRef},Align)
when is_integer(Align) ->
@@ -161,7 +161,7 @@ setAlign(#wx_ref{type=ThisT,ref=ThisRef},Align)
<<ThisRef:32/?UI,Align:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetbackgroundcolour">external documentation</a>.
--spec setBackgroundColour(This, ColBack) -> ok when
+-spec setBackgroundColour(This, ColBack) -> 'ok' when
This::wxListItem(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
@@ -170,7 +170,7 @@ setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetcolumn">external documentation</a>.
--spec setColumn(This, Col) -> ok when
+-spec setColumn(This, Col) -> 'ok' when
This::wxListItem(), Col::integer().
setColumn(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
@@ -179,7 +179,7 @@ setColumn(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetfont">external documentation</a>.
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxListItem(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxListItem),
@@ -188,7 +188,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetid">external documentation</a>.
--spec setId(This, Id) -> ok when
+-spec setId(This, Id) -> 'ok' when
This::wxListItem(), Id::integer().
setId(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
@@ -197,7 +197,7 @@ setId(#wx_ref{type=ThisT,ref=ThisRef},Id)
<<ThisRef:32/?UI,Id:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetimage">external documentation</a>.
--spec setImage(This, Image) -> ok when
+-spec setImage(This, Image) -> 'ok' when
This::wxListItem(), Image::integer().
setImage(#wx_ref{type=ThisT,ref=ThisRef},Image)
when is_integer(Image) ->
@@ -206,7 +206,7 @@ setImage(#wx_ref{type=ThisT,ref=ThisRef},Image)
<<ThisRef:32/?UI,Image:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetmask">external documentation</a>.
--spec setMask(This, Mask) -> ok when
+-spec setMask(This, Mask) -> 'ok' when
This::wxListItem(), Mask::integer().
setMask(#wx_ref{type=ThisT,ref=ThisRef},Mask)
when is_integer(Mask) ->
@@ -215,7 +215,7 @@ setMask(#wx_ref{type=ThisT,ref=ThisRef},Mask)
<<ThisRef:32/?UI,Mask:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetstate">external documentation</a>.
--spec setState(This, State) -> ok when
+-spec setState(This, State) -> 'ok' when
This::wxListItem(), State::integer().
setState(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_integer(State) ->
@@ -224,7 +224,7 @@ setState(#wx_ref{type=ThisT,ref=ThisRef},State)
<<ThisRef:32/?UI,State:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetstatemask">external documentation</a>.
--spec setStateMask(This, StateMask) -> ok when
+-spec setStateMask(This, StateMask) -> 'ok' when
This::wxListItem(), StateMask::integer().
setStateMask(#wx_ref{type=ThisT,ref=ThisRef},StateMask)
when is_integer(StateMask) ->
@@ -233,7 +233,7 @@ setStateMask(#wx_ref{type=ThisT,ref=ThisRef},StateMask)
<<ThisRef:32/?UI,StateMask:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsettext">external documentation</a>.
--spec setText(This, Text) -> ok when
+-spec setText(This, Text) -> 'ok' when
This::wxListItem(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -243,7 +243,7 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsettextcolour">external documentation</a>.
--spec setTextColour(This, ColText) -> ok when
+-spec setTextColour(This, ColText) -> 'ok' when
This::wxListItem(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
@@ -252,7 +252,7 @@ setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitem.html#wxlistitemsetwidth">external documentation</a>.
--spec setWidth(This, Width) -> ok when
+-spec setWidth(This, Width) -> 'ok' when
This::wxListItem(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -261,7 +261,7 @@ setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxListItem()) -> ok.
+-spec destroy(This::wxListItem()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxListItemAttr.erl b/lib/wx/src/gen/wxListItemAttr.erl
index c581292358..360366c1be 100644
--- a/lib/wx/src/gen/wxListItemAttr.erl
+++ b/lib/wx/src/gen/wxListItemAttr.erl
@@ -101,7 +101,7 @@ hasTextColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitemattr.html#wxlistitemattrsetbackgroundcolour">external documentation</a>.
--spec setBackgroundColour(This, ColBack) -> ok when
+-spec setBackgroundColour(This, ColBack) -> 'ok' when
This::wxListItemAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
@@ -110,7 +110,7 @@ setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitemattr.html#wxlistitemattrsetfont">external documentation</a>.
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxListItemAttr(), Font::wxFont:wxFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxListItemAttr),
@@ -119,7 +119,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistitemattr.html#wxlistitemattrsettextcolour">external documentation</a>.
--spec setTextColour(This, ColText) -> ok when
+-spec setTextColour(This, ColText) -> 'ok' when
This::wxListItemAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
@@ -128,7 +128,7 @@ setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxListItemAttr()) -> ok.
+-spec destroy(This::wxListItemAttr()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListItemAttr),
wxe_util:destroy(?wxListItemAttr_destroy,Obj),
diff --git a/lib/wx/src/gen/wxListView.erl b/lib/wx/src/gen/wxListView.erl
index 288afcee82..908bf4c1c9 100644
--- a/lib/wx/src/gen/wxListView.erl
+++ b/lib/wx/src/gen/wxListView.erl
@@ -81,7 +81,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxListView() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistview.html#wxlistviewclearcolumnimage">external documentation</a>.
--spec clearColumnImage(This, Col) -> ok when
+-spec clearColumnImage(This, Col) -> 'ok' when
This::wxListView(), Col::integer().
clearColumnImage(#wx_ref{type=ThisT,ref=ThisRef},Col)
when is_integer(Col) ->
@@ -90,7 +90,7 @@ clearColumnImage(#wx_ref{type=ThisT,ref=ThisRef},Col)
<<ThisRef:32/?UI,Col:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistview.html#wxlistviewfocus">external documentation</a>.
--spec focus(This, Index) -> ok when
+-spec focus(This, Index) -> 'ok' when
This::wxListView(), Index::integer().
focus(#wx_ref{type=ThisT,ref=ThisRef},Index)
when is_integer(Index) ->
@@ -133,7 +133,7 @@ isSelected(#wx_ref{type=ThisT,ref=ThisRef},Index)
<<ThisRef:32/?UI,Index:32/?UI>>).
%% @equiv select(This,N, [])
--spec select(This, N) -> ok when
+-spec select(This, N) -> 'ok' when
This::wxListView(), N::integer().
select(This,N)
@@ -141,9 +141,9 @@ select(This,N)
select(This,N, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistview.html#wxlistviewselect">external documentation</a>.
--spec select(This, N, [Option]) -> ok when
+-spec select(This, N, [Option]) -> 'ok' when
This::wxListView(), N::integer(),
- Option :: {on, boolean()}.
+ Option :: {'on', boolean()}.
select(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
when is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxListView),
@@ -154,7 +154,7 @@ select(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
<<ThisRef:32/?UI,N:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistview.html#wxlistviewsetcolumnimage">external documentation</a>.
--spec setColumnImage(This, Col, Image) -> ok when
+-spec setColumnImage(This, Col, Image) -> 'ok' when
This::wxListView(), Col::integer(), Image::integer().
setColumnImage(#wx_ref{type=ThisT,ref=ThisRef},Col,Image)
when is_integer(Col),is_integer(Image) ->
diff --git a/lib/wx/src/gen/wxListbook.erl b/lib/wx/src/gen/wxListbook.erl
index 6ea34e8eb1..a7050e1db9 100644
--- a/lib/wx/src/gen/wxListbook.erl
+++ b/lib/wx/src/gen/wxListbook.erl
@@ -101,9 +101,9 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbookwxlistbook">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxListbook() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,8 +126,8 @@ addPage(This,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbookaddpage">external documentation</a>.
-spec addPage(This, Page, Text, [Option]) -> boolean() when
This::wxListbook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -141,7 +141,7 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
<<ThisRef:32/?UI,PageRef: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>>).
%% @equiv advanceSelection(This, [])
--spec advanceSelection(This) -> ok when
+-spec advanceSelection(This) -> 'ok' when
This::wxListbook().
advanceSelection(This)
@@ -149,9 +149,9 @@ advanceSelection(This)
advanceSelection(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbookadvanceselection">external documentation</a>.
--spec advanceSelection(This, [Option]) -> ok when
+-spec advanceSelection(This, [Option]) -> 'ok' when
This::wxListbook(),
- Option :: {forward, boolean()}.
+ Option :: {'forward', boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -162,7 +162,7 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbookassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList) -> ok when
+-spec assignImageList(This, ImageList) -> 'ok' when
This::wxListbook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxListbook),
@@ -181,9 +181,9 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbookcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxListbook(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -302,8 +302,8 @@ insertPage(This,N,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbookinsertpage">external documentation</a>.
-spec insertPage(This, N, Page, Text, [Option]) -> boolean() when
This::wxListbook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(N),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxListbook),
@@ -317,7 +317,7 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Tex
<<ThisRef:32/?UI,N:32/?UI,PageRef: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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbooksetimagelist">external documentation</a>.
--spec setImageList(This, ImageList) -> ok when
+-spec setImageList(This, ImageList) -> 'ok' when
This::wxListbook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxListbook),
@@ -326,7 +326,7 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlistbook.html#wxlistbooksetpagesize">external documentation</a>.
--spec setPageSize(This, Size) -> ok when
+-spec setPageSize(This, Size) -> 'ok' when
This::wxListbook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -372,7 +372,7 @@ changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxListbook()) -> ok.
+-spec destroy(This::wxListbook()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxListbook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxLocale.erl b/lib/wx/src/gen/wxLocale.erl
index 7d208b9823..d473731bf8 100644
--- a/lib/wx/src/gen/wxLocale.erl
+++ b/lib/wx/src/gen/wxLocale.erl
@@ -56,7 +56,7 @@ new(Language)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalewxlocale">external documentation</a>.
-spec new(Language, [Option]) -> wxLocale() when
Language::integer(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
new(Language, Options)
when is_integer(Language),is_list(Options) ->
MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
@@ -76,8 +76,8 @@ init(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleinit">external documentation</a>.
-spec init(This, [Option]) -> boolean() when
This::wxLocale(),
- Option :: {language, integer()}
- | {flags, integer()}.
+ Option :: {'language', integer()}
+ | {'flags', integer()}.
init(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxLocale),
@@ -111,7 +111,7 @@ addCatalog(#wx_ref{type=ThisT,ref=ThisRef},SzDomain,MsgIdLanguage,MsgIdCharset)
<<ThisRef:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8,MsgIdLanguage:32/?UI,(byte_size(MsgIdCharset_UC)):32/?UI,(MsgIdCharset_UC)/binary, 0:(((8- ((0+byte_size(MsgIdCharset_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleaddcataloglookuppathprefix">external documentation</a>.
--spec addCatalogLookupPathPrefix(Prefix) -> ok when
+-spec addCatalogLookupPathPrefix(Prefix) -> 'ok' when
Prefix::unicode:chardata().
addCatalogLookupPathPrefix(Prefix)
when is_list(Prefix) ->
@@ -170,7 +170,7 @@ getString(This,SzOrigString)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetstring">external documentation</a>.
-spec getString(This, SzOrigString, [Option]) -> unicode:charlist() when
This::wxLocale(), SzOrigString::unicode:chardata(),
- Option :: {szDomain, unicode:chardata()}.
+ Option :: {'szDomain', unicode:chardata()}.
getString(#wx_ref{type=ThisT,ref=ThisRef},SzOrigString, Options)
when is_list(SzOrigString),is_list(Options) ->
?CLASS(ThisT,wxLocale),
@@ -192,7 +192,7 @@ getString(This,SzOrigString,SzOrigString2,N)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetstring">external documentation</a>.
-spec getString(This, SzOrigString, SzOrigString2, N, [Option]) -> unicode:charlist() when
This::wxLocale(), SzOrigString::unicode:chardata(), SzOrigString2::unicode:chardata(), N::integer(),
- Option :: {szDomain, unicode:chardata()}.
+ Option :: {'szDomain', unicode:chardata()}.
getString(#wx_ref{type=ThisT,ref=ThisRef},SzOrigString,SzOrigString2,N, Options)
when is_list(SzOrigString),is_list(SzOrigString2),is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxLocale),
@@ -215,7 +215,7 @@ getHeaderValue(This,SzHeader)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetheadervalue">external documentation</a>.
-spec getHeaderValue(This, SzHeader, [Option]) -> unicode:charlist() when
This::wxLocale(), SzHeader::unicode:chardata(),
- Option :: {szDomain, unicode:chardata()}.
+ Option :: {'szDomain', unicode:chardata()}.
getHeaderValue(#wx_ref{type=ThisT,ref=ThisRef},SzHeader, Options)
when is_list(SzHeader),is_list(Options) ->
?CLASS(ThisT,wxLocale),
@@ -272,7 +272,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxLocale()) -> ok.
+-spec destroy(This::wxLocale()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxLocale),
wxe_util:destroy(?wxLocale_destruct,Obj),
diff --git a/lib/wx/src/gen/wxLogNull.erl b/lib/wx/src/gen/wxLogNull.erl
index a071dffb95..e82601a350 100644
--- a/lib/wx/src/gen/wxLogNull.erl
+++ b/lib/wx/src/gen/wxLogNull.erl
@@ -42,7 +42,7 @@ new() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxLogNull()) -> ok.
+-spec destroy(This::wxLogNull()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxLogNull),
wxe_util:destroy(?wxLogNull_destroy,Obj),
diff --git a/lib/wx/src/gen/wxMDIChildFrame.erl b/lib/wx/src/gen/wxMDIChildFrame.erl
index ed29e5431f..b294e4898d 100644
--- a/lib/wx/src/gen/wxMDIChildFrame.erl
+++ b/lib/wx/src/gen/wxMDIChildFrame.erl
@@ -108,9 +108,9 @@ new(Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdichildframe.html#wxmdichildframewxmdichildframe">external documentation</a>.
-spec new(Parent, Id, Title, [Option]) -> wxMDIChildFrame() when
Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxMDIParentFrame),
@@ -124,7 +124,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdichildframe.html#wxmdichildframeactivate">external documentation</a>.
--spec activate(This) -> ok when
+-spec activate(This) -> 'ok' when
This::wxMDIChildFrame().
activate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIChildFrame),
@@ -142,9 +142,9 @@ create(This,Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdichildframe.html#wxmdichildframecreate">external documentation</a>.
-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
This::wxMDIChildFrame(), Parent::wxMDIParentFrame:wxMDIParentFrame(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxMDIChildFrame),
@@ -159,7 +159,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @equiv maximize(This, [])
--spec maximize(This) -> ok when
+-spec maximize(This) -> 'ok' when
This::wxMDIChildFrame().
maximize(This)
@@ -167,9 +167,9 @@ maximize(This)
maximize(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdichildframe.html#wxmdichildframemaximize">external documentation</a>.
--spec maximize(This, [Option]) -> ok when
+-spec maximize(This, [Option]) -> 'ok' when
This::wxMDIChildFrame(),
- Option :: {maximize, boolean()}.
+ Option :: {'maximize', boolean()}.
maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMDIChildFrame),
@@ -180,7 +180,7 @@ maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdichildframe.html#wxmdichildframerestore">external documentation</a>.
--spec restore(This) -> ok when
+-spec restore(This) -> 'ok' when
This::wxMDIChildFrame().
restore(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIChildFrame),
@@ -188,7 +188,7 @@ restore(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMDIChildFrame()) -> ok.
+-spec destroy(This::wxMDIChildFrame()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMDIChildFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMDIClientWindow.erl b/lib/wx/src/gen/wxMDIClientWindow.erl
index 6f10627086..ddc31760f4 100644
--- a/lib/wx/src/gen/wxMDIClientWindow.erl
+++ b/lib/wx/src/gen/wxMDIClientWindow.erl
@@ -96,7 +96,7 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiclientwindow.html#wxmdiclientwindowwxmdiclientwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxMDIClientWindow() when
Parent::wxMDIParentFrame:wxMDIParentFrame(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxMDIParentFrame),
@@ -117,7 +117,7 @@ createClient(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiclientwindow.html#wxmdiclientwindowcreateclient">external documentation</a>.
-spec createClient(This, Parent, [Option]) -> boolean() when
This::wxMDIClientWindow(), Parent::wxMDIParentFrame:wxMDIParentFrame(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
createClient(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMDIClientWindow),
@@ -129,7 +129,7 @@ createClient(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMDIClientWindow()) -> ok.
+-spec destroy(This::wxMDIClientWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMDIClientWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMDIParentFrame.erl b/lib/wx/src/gen/wxMDIParentFrame.erl
index 47d9182d60..63b4ec8e23 100644
--- a/lib/wx/src/gen/wxMDIParentFrame.erl
+++ b/lib/wx/src/gen/wxMDIParentFrame.erl
@@ -109,9 +109,9 @@ new(Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframewxmdiparentframe">external documentation</a>.
-spec new(Parent, Id, Title, [Option]) -> wxMDIParentFrame() when
Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -125,7 +125,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
<<ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframeactivatenext">external documentation</a>.
--spec activateNext(This) -> ok when
+-spec activateNext(This) -> 'ok' when
This::wxMDIParentFrame().
activateNext(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -133,7 +133,7 @@ activateNext(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframeactivateprevious">external documentation</a>.
--spec activatePrevious(This) -> ok when
+-spec activatePrevious(This) -> 'ok' when
This::wxMDIParentFrame().
activatePrevious(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -141,7 +141,7 @@ activatePrevious(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframearrangeicons">external documentation</a>.
--spec arrangeIcons(This) -> ok when
+-spec arrangeIcons(This) -> 'ok' when
This::wxMDIParentFrame().
arrangeIcons(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -149,7 +149,7 @@ arrangeIcons(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframecascade">external documentation</a>.
--spec cascade(This) -> ok when
+-spec cascade(This) -> 'ok' when
This::wxMDIParentFrame().
cascade(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -167,9 +167,9 @@ create(This,Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframecreate">external documentation</a>.
-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
This::wxMDIParentFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -200,7 +200,7 @@ getClientWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv tile(This, [])
--spec tile(This) -> ok when
+-spec tile(This) -> 'ok' when
This::wxMDIParentFrame().
tile(This)
@@ -209,9 +209,9 @@ tile(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmdiparentframe.html#wxmdiparentframetile">external documentation</a>.
%%<br /> Orient = ?wxHORIZONTAL | ?wxVERTICAL | ?wxBOTH
--spec tile(This, [Option]) -> ok when
+-spec tile(This, [Option]) -> 'ok' when
This::wxMDIParentFrame(),
- Option :: {orient, wx:wx_enum()}.
+ Option :: {'orient', wx:wx_enum()}.
tile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMDIParentFrame),
@@ -222,7 +222,7 @@ tile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMDIParentFrame()) -> ok.
+-spec destroy(This::wxMDIParentFrame()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMDIParentFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMask.erl b/lib/wx/src/gen/wxMask.erl
index 98c96277dd..f50392eb34 100644
--- a/lib/wx/src/gen/wxMask.erl
+++ b/lib/wx/src/gen/wxMask.erl
@@ -101,7 +101,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef},Colou
<<ThisRef:32/?UI,BitmapRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMask()) -> ok.
+-spec destroy(This::wxMask()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMask),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMemoryDC.erl b/lib/wx/src/gen/wxMemoryDC.erl
index 8a59be7ad2..f1a5669e17 100644
--- a/lib/wx/src/gen/wxMemoryDC.erl
+++ b/lib/wx/src/gen/wxMemoryDC.erl
@@ -81,7 +81,7 @@ new(#wx_ref{type=DcT,ref=DcRef}) ->
<<DcRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmemorydc.html#wxmemorydcselectobject">external documentation</a>.
--spec selectObject(This, Bmp) -> ok when
+-spec selectObject(This, Bmp) -> 'ok' when
This::wxMemoryDC(), Bmp::wxBitmap:wxBitmap().
selectObject(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(ThisT,wxMemoryDC),
@@ -90,7 +90,7 @@ selectObject(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
<<ThisRef:32/?UI,BmpRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmemorydc.html#wxmemorydcselectobjectassource">external documentation</a>.
--spec selectObjectAsSource(This, Bmp) -> ok when
+-spec selectObjectAsSource(This, Bmp) -> 'ok' when
This::wxMemoryDC(), Bmp::wxBitmap:wxBitmap().
selectObjectAsSource(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef}) ->
?CLASS(ThisT,wxMemoryDC),
@@ -99,7 +99,7 @@ selectObjectAsSource(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRe
<<ThisRef:32/?UI,BmpRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMemoryDC()) -> ok.
+-spec destroy(This::wxMemoryDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMemoryDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMenu.erl b/lib/wx/src/gen/wxMenu.erl
index 59feef7b19..317ea38685 100644
--- a/lib/wx/src/gen/wxMenu.erl
+++ b/lib/wx/src/gen/wxMenu.erl
@@ -55,7 +55,7 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuwxmenu">external documentation</a>.
-spec new([Option]) -> wxMenu() when
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc];
@@ -67,7 +67,7 @@ new(Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuwxmenu">external documentation</a>.
-spec new(Title, [Option]) -> wxMenu() when
Title::unicode:chardata(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(Title, Options)
when is_list(Title),is_list(Options) ->
Title_UC = unicode:characters_to_binary([Title,0]),
@@ -98,16 +98,16 @@ append(This,Itemid,Text)
%% <br /> Also:<br />
%% append(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when<br />
%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),<br />
-%% Option :: {help, unicode:chardata()}<br />
-%% | {kind, wx:wx_enum()}.<br />
+%% Option :: {'help', unicode:chardata()}<br />
+%% | {'kind', wx:wx_enum()}.<br />
%%
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec append(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu();
(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}
- | {kind, wx:wx_enum()}.
+ Option :: {'help', unicode:chardata()}
+ | {'kind', wx:wx_enum()}.
append(This,Itemid,Text,Submenu)
when is_record(This, wx_ref),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) ->
@@ -127,13 +127,13 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
%% <br /> Also:<br />
%% append(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br />
%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br />
-%% Option :: {help, unicode:chardata()}.<br />
+%% Option :: {'help', unicode:chardata()}.<br />
%%
--spec append(This, Itemid, Text, Help, IsCheckable) -> ok when
+-spec append(This, Itemid, Text, Help, IsCheckable) -> 'ok' when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean();
(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable)
when is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) ->
?CLASS(ThisT,wxMenu),
@@ -163,7 +163,7 @@ appendCheckItem(This,Itemid,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuappendcheckitem">external documentation</a>.
-spec appendCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -185,7 +185,7 @@ appendRadioItem(This,Itemid,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuappendradioitem">external documentation</a>.
-spec appendRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
appendRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -205,7 +205,7 @@ appendSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenubreak">external documentation</a>.
--spec break(This) -> ok when
+-spec break(This) -> 'ok' when
This::wxMenu().
break(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxMenu),
@@ -213,7 +213,7 @@ break(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenucheck">external documentation</a>.
--spec check(This, Itemid, Check) -> ok when
+-spec check(This, Itemid, Check) -> 'ok' when
This::wxMenu(), Itemid::integer(), Check::boolean().
check(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Check)
when is_integer(Itemid),is_boolean(Check) ->
@@ -262,7 +262,7 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuenable">external documentation</a>.
--spec enable(This, Itemid, Enable) -> ok when
+-spec enable(This, Itemid, Enable) -> 'ok' when
This::wxMenu(), Itemid::integer(), Enable::boolean().
enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable)
when is_integer(Itemid),is_boolean(Enable) ->
@@ -367,9 +367,9 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ItemT,ref=ItemRef})
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec insert(This, Pos, Itemid, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Pos::integer(), Itemid::integer(),
- Option :: {text, unicode:chardata()}
- | {help, unicode:chardata()}
- | {kind, wx:wx_enum()}.
+ Option :: {'text', unicode:chardata()}
+ | {'help', unicode:chardata()}
+ | {'kind', wx:wx_enum()}.
insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, Options)
when is_integer(Pos),is_integer(Itemid),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -393,13 +393,13 @@ insert(This,Pos,Itemid,Text,Submenu)
%% <br /> Also:<br />
%% insert(This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br />
%% This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br />
-%% Option :: {help, unicode:chardata()}.<br />
+%% Option :: {'help', unicode:chardata()}.<br />
%%
--spec insert(This, Pos, Itemid, Text, Help, IsCheckable) -> ok when
+-spec insert(This, Pos, Itemid, Text, Help, IsCheckable) -> 'ok' when
This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean();
(This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,Help,IsCheckable)
when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) ->
?CLASS(ThisT,wxMenu),
@@ -429,7 +429,7 @@ insertCheckItem(This,Pos,Itemid,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuinsertcheckitem">external documentation</a>.
-spec insertCheckItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
insertCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options)
when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -451,7 +451,7 @@ insertRadioItem(This,Pos,Itemid,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuinsertradioitem">external documentation</a>.
-spec insertRadioItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
insertRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options)
when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -513,9 +513,9 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec prepend(This, Itemid, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(),
- Option :: {text, unicode:chardata()}
- | {help, unicode:chardata()}
- | {kind, wx:wx_enum()}.
+ Option :: {'text', unicode:chardata()}
+ | {'help', unicode:chardata()}
+ | {'kind', wx:wx_enum()}.
prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options)
when is_integer(Itemid),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -539,13 +539,13 @@ prepend(This,Itemid,Text,Submenu)
%% <br /> Also:<br />
%% prepend(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br />
%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br />
-%% Option :: {help, unicode:chardata()}.<br />
+%% Option :: {'help', unicode:chardata()}.<br />
%%
--spec prepend(This, Itemid, Text, Help, IsCheckable) -> ok when
+-spec prepend(This, Itemid, Text, Help, IsCheckable) -> 'ok' when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean();
(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable)
when is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) ->
?CLASS(ThisT,wxMenu),
@@ -575,7 +575,7 @@ prependCheckItem(This,Itemid,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuprependcheckitem">external documentation</a>.
-spec prependCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -597,7 +597,7 @@ prependRadioItem(This,Itemid,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuprependradioitem">external documentation</a>.
-spec prependRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
- Option :: {help, unicode:chardata()}.
+ Option :: {'help', unicode:chardata()}.
prependRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options)
when is_integer(Itemid),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxMenu),
@@ -637,7 +637,7 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
<<ThisRef:32/?UI,ItemRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenusethelpstring">external documentation</a>.
--spec setHelpString(This, Itemid, HelpString) -> ok when
+-spec setHelpString(This, Itemid, HelpString) -> 'ok' when
This::wxMenu(), Itemid::integer(), HelpString::unicode:chardata().
setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
when is_integer(Itemid),is_list(HelpString) ->
@@ -647,7 +647,7 @@ setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenusetlabel">external documentation</a>.
--spec setLabel(This, Itemid, Label) -> ok when
+-spec setLabel(This, Itemid, Label) -> 'ok' when
This::wxMenu(), Itemid::integer(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
when is_integer(Itemid),is_list(Label) ->
@@ -657,7 +657,7 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenusettitle">external documentation</a>.
--spec setTitle(This, Title) -> ok when
+-spec setTitle(This, Title) -> 'ok' when
This::wxMenu(), Title::unicode:chardata().
setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
when is_list(Title) ->
@@ -667,7 +667,7 @@ setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
<<ThisRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMenu()) -> ok.
+-spec destroy(This::wxMenu()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMenu),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMenuBar.erl b/lib/wx/src/gen/wxMenuBar.erl
index 5e879da5ed..05f7a423d5 100644
--- a/lib/wx/src/gen/wxMenuBar.erl
+++ b/lib/wx/src/gen/wxMenuBar.erl
@@ -106,7 +106,7 @@ append(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef},Title)
<<ThisRef:32/?UI,MenuRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarcheck">external documentation</a>.
--spec check(This, Itemid, Check) -> ok when
+-spec check(This, Itemid, Check) -> 'ok' when
This::wxMenuBar(), Itemid::integer(), Check::boolean().
check(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Check)
when is_integer(Itemid),is_boolean(Check) ->
@@ -125,7 +125,7 @@ enable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarenable">external documentation</a>.
-spec enable(This, [Option]) -> boolean() when
This::wxMenuBar(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMenuBar),
@@ -136,7 +136,7 @@ enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarenable">external documentation</a>.
--spec enable(This, Itemid, Enable) -> ok when
+-spec enable(This, Itemid, Enable) -> 'ok' when
This::wxMenuBar(), Itemid::integer(), Enable::boolean().
enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable)
when is_integer(Itemid),is_boolean(Enable) ->
@@ -145,7 +145,7 @@ enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable)
<<ThisRef:32/?UI,Itemid:32/?UI,(wxe_util:from_bool(Enable)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarenabletop">external documentation</a>.
--spec enableTop(This, Pos, Flag) -> ok when
+-spec enableTop(This, Pos, Flag) -> 'ok' when
This::wxMenuBar(), Pos::integer(), Flag::boolean().
enableTop(#wx_ref{type=ThisT,ref=ThisRef},Pos,Flag)
when is_integer(Pos),is_boolean(Flag) ->
@@ -293,7 +293,7 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=MenuT,ref=MenuRef},Titl
<<ThisRef:32/?UI,Pos:32/?UI,MenuRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarsethelpstring">external documentation</a>.
--spec setHelpString(This, Itemid, HelpString) -> ok when
+-spec setHelpString(This, Itemid, HelpString) -> 'ok' when
This::wxMenuBar(), Itemid::integer(), HelpString::unicode:chardata().
setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
when is_integer(Itemid),is_list(HelpString) ->
@@ -303,7 +303,7 @@ setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString)
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarsetlabel">external documentation</a>.
--spec setLabel(This, S) -> ok when
+-spec setLabel(This, S) -> 'ok' when
This::wxMenuBar(), S::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},S)
when is_list(S) ->
@@ -313,7 +313,7 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},S)
<<ThisRef:32/?UI,(byte_size(S_UC)):32/?UI,(S_UC)/binary, 0:(((8- ((0+byte_size(S_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarsetlabel">external documentation</a>.
--spec setLabel(This, Itemid, Label) -> ok when
+-spec setLabel(This, Itemid, Label) -> 'ok' when
This::wxMenuBar(), Itemid::integer(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
when is_integer(Itemid),is_list(Label) ->
@@ -323,7 +323,7 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label)
<<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenubar.html#wxmenubarsetlabeltop">external documentation</a>.
--spec setLabelTop(This, Pos, Label) -> ok when
+-spec setLabelTop(This, Pos, Label) -> 'ok' when
This::wxMenuBar(), Pos::integer(), Label::unicode:chardata().
setLabelTop(#wx_ref{type=ThisT,ref=ThisRef},Pos,Label)
when is_integer(Pos),is_list(Label) ->
@@ -333,7 +333,7 @@ setLabelTop(#wx_ref{type=ThisT,ref=ThisRef},Pos,Label)
<<ThisRef:32/?UI,Pos:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMenuBar()) -> ok.
+-spec destroy(This::wxMenuBar()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMenuBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMenuItem.erl b/lib/wx/src/gen/wxMenuItem.erl
index 9325f47d90..324910d15d 100644
--- a/lib/wx/src/gen/wxMenuItem.erl
+++ b/lib/wx/src/gen/wxMenuItem.erl
@@ -47,12 +47,12 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemwxmenuitem">external documentation</a>.
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec new([Option]) -> wxMenuItem() when
- Option :: {parentMenu, wxMenu:wxMenu()}
- | {id, integer()}
- | {text, unicode:chardata()}
- | {help, unicode:chardata()}
- | {kind, wx:wx_enum()}
- | {subMenu, wxMenu:wxMenu()}.
+ Option :: {'parentMenu', wxMenu:wxMenu()}
+ | {'id', integer()}
+ | {'text', unicode:chardata()}
+ | {'help', unicode:chardata()}
+ | {'kind', wx:wx_enum()}
+ | {'subMenu', wxMenu:wxMenu()}.
new(Options)
when is_list(Options) ->
MOpts = fun({parentMenu, #wx_ref{type=ParentMenuT,ref=ParentMenuRef}}, Acc) -> ?CLASS(ParentMenuT,wxMenu),[<<1:32/?UI,ParentMenuRef:32/?UI>>|Acc];
@@ -67,7 +67,7 @@ new(Options)
<<BinOpt/binary>>).
%% @equiv check(This, [])
--spec check(This) -> ok when
+-spec check(This) -> 'ok' when
This::wxMenuItem().
check(This)
@@ -75,9 +75,9 @@ check(This)
check(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemcheck">external documentation</a>.
--spec check(This, [Option]) -> ok when
+-spec check(This, [Option]) -> 'ok' when
This::wxMenuItem(),
- Option :: {check, boolean()}.
+ Option :: {'check', boolean()}.
check(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMenuItem),
@@ -88,7 +88,7 @@ check(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv enable(This, [])
--spec enable(This) -> ok when
+-spec enable(This) -> 'ok' when
This::wxMenuItem().
enable(This)
@@ -96,9 +96,9 @@ enable(This)
enable(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemenable">external documentation</a>.
--spec enable(This, [Option]) -> ok when
+-spec enable(This, [Option]) -> 'ok' when
This::wxMenuItem(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMenuItem),
@@ -223,7 +223,7 @@ isSubMenu(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemsetbitmap">external documentation</a>.
--spec setBitmap(This, Bitmap) -> ok when
+-spec setBitmap(This, Bitmap) -> 'ok' when
This::wxMenuItem(), Bitmap::wxBitmap:wxBitmap().
setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxMenuItem),
@@ -232,7 +232,7 @@ setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) -
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemsethelp">external documentation</a>.
--spec setHelp(This, Str) -> ok when
+-spec setHelp(This, Str) -> 'ok' when
This::wxMenuItem(), Str::unicode:chardata().
setHelp(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
@@ -242,7 +242,7 @@ setHelp(#wx_ref{type=ThisT,ref=ThisRef},Str)
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemsetmenu">external documentation</a>.
--spec setMenu(This, Menu) -> ok when
+-spec setMenu(This, Menu) -> 'ok' when
This::wxMenuItem(), Menu::wxMenu:wxMenu().
setMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
?CLASS(ThisT,wxMenuItem),
@@ -251,7 +251,7 @@ setMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
<<ThisRef:32/?UI,MenuRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemsetsubmenu">external documentation</a>.
--spec setSubMenu(This, Menu) -> ok when
+-spec setSubMenu(This, Menu) -> 'ok' when
This::wxMenuItem(), Menu::wxMenu:wxMenu().
setSubMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
?CLASS(ThisT,wxMenuItem),
@@ -260,7 +260,7 @@ setSubMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) ->
<<ThisRef:32/?UI,MenuRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenuitem.html#wxmenuitemsettext">external documentation</a>.
--spec setText(This, Str) -> ok when
+-spec setText(This, Str) -> 'ok' when
This::wxMenuItem(), Str::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Str)
when is_list(Str) ->
@@ -270,7 +270,7 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Str)
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMenuItem()) -> ok.
+-spec destroy(This::wxMenuItem()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMenuItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMessageDialog.erl b/lib/wx/src/gen/wxMessageDialog.erl
index 1fe99b2b88..30e47529cc 100644
--- a/lib/wx/src/gen/wxMessageDialog.erl
+++ b/lib/wx/src/gen/wxMessageDialog.erl
@@ -99,9 +99,9 @@ new(Parent,Message)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmessagedialog.html#wxmessagedialogwxmessagedialog">external documentation</a>.
-spec new(Parent, Message, [Option]) -> wxMessageDialog() when
Parent::wxWindow:wxWindow(), Message::unicode:chardata(),
- Option :: {caption, unicode:chardata()}
- | {style, integer()}
- | {pos, {X::integer(), Y::integer()}}.
+ Option :: {'caption', unicode:chardata()}
+ | {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
when is_list(Message),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -115,7 +115,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMessageDialog()) -> ok.
+-spec destroy(This::wxMessageDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMessageDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMiniFrame.erl b/lib/wx/src/gen/wxMiniFrame.erl
index f731cc5416..4ae9764819 100644
--- a/lib/wx/src/gen/wxMiniFrame.erl
+++ b/lib/wx/src/gen/wxMiniFrame.erl
@@ -107,9 +107,9 @@ new(Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxminiframe.html#wxminiframewxminiframe">external documentation</a>.
-spec new(Parent, Id, Title, [Option]) -> wxMiniFrame() when
Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -133,9 +133,9 @@ create(This,Parent,Id,Title)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxminiframe.html#wxminiframecreate">external documentation</a>.
-spec create(This, Parent, Id, Title, [Option]) -> boolean() when
This::wxMiniFrame(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title, Options)
when is_integer(Id),is_list(Title),is_list(Options) ->
?CLASS(ThisT,wxMiniFrame),
@@ -150,7 +150,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Ti
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMiniFrame()) -> ok.
+-spec destroy(This::wxMiniFrame()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMiniFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMirrorDC.erl b/lib/wx/src/gen/wxMirrorDC.erl
index 20d51a2374..df2d133cab 100644
--- a/lib/wx/src/gen/wxMirrorDC.erl
+++ b/lib/wx/src/gen/wxMirrorDC.erl
@@ -71,7 +71,7 @@ new(#wx_ref{type=DcT,ref=DcRef},Mirror)
<<DcRef:32/?UI,(wxe_util:from_bool(Mirror)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMirrorDC()) -> ok.
+-spec destroy(This::wxMirrorDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMirrorDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxMouseEvent.erl b/lib/wx/src/gen/wxMouseEvent.erl
index 8728770693..a6aba1470e 100644
--- a/lib/wx/src/gen/wxMouseEvent.erl
+++ b/lib/wx/src/gen/wxMouseEvent.erl
@@ -78,7 +78,7 @@ buttonDClick(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmouseevent.html#wxmouseeventbuttondclick">external documentation</a>.
-spec buttonDClick(This, [Option]) -> boolean() when
This::wxMouseEvent(),
- Option :: {but, integer()}.
+ Option :: {'but', integer()}.
buttonDClick(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMouseEvent),
@@ -99,7 +99,7 @@ buttonDown(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmouseevent.html#wxmouseeventbuttondown">external documentation</a>.
-spec buttonDown(This, [Option]) -> boolean() when
This::wxMouseEvent(),
- Option :: {but, integer()}.
+ Option :: {'but', integer()}.
buttonDown(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMouseEvent),
@@ -120,7 +120,7 @@ buttonUp(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmouseevent.html#wxmouseeventbuttonup">external documentation</a>.
-spec buttonUp(This, [Option]) -> boolean() when
This::wxMouseEvent(),
- Option :: {but, integer()}.
+ Option :: {'but', integer()}.
buttonUp(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxMouseEvent),
diff --git a/lib/wx/src/gen/wxMultiChoiceDialog.erl b/lib/wx/src/gen/wxMultiChoiceDialog.erl
index 96e9c070a3..0436515256 100644
--- a/lib/wx/src/gen/wxMultiChoiceDialog.erl
+++ b/lib/wx/src/gen/wxMultiChoiceDialog.erl
@@ -105,8 +105,8 @@ new(Parent,Message,Caption,Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmultichoicedialog.html#wxmultichoicedialogwxmultichoicedialog">external documentation</a>.
-spec new(Parent, Message, Caption, Choices, [Option]) -> wxMultiChoiceDialog() when
Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[unicode:chardata()],
- Option :: {style, integer()}
- | {pos, {X::integer(), Y::integer()}}.
+ Option :: {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options)
when is_list(Message),is_list(Caption),is_list(Choices),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -130,7 +130,7 @@ getSelections(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmultichoicedialog.html#wxmultichoicedialogsetselections">external documentation</a>.
--spec setSelections(This, Selections) -> ok when
+-spec setSelections(This, Selections) -> 'ok' when
This::wxMultiChoiceDialog(), Selections::[integer()].
setSelections(#wx_ref{type=ThisT,ref=ThisRef},Selections)
when is_list(Selections) ->
@@ -140,7 +140,7 @@ setSelections(#wx_ref{type=ThisT,ref=ThisRef},Selections)
(<< <<C:32/?I>> || C <- Selections>>)/binary, 0:(((0+length(Selections)) rem 2)*32)>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxMultiChoiceDialog()) -> ok.
+-spec destroy(This::wxMultiChoiceDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxMultiChoiceDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxNavigationKeyEvent.erl b/lib/wx/src/gen/wxNavigationKeyEvent.erl
index 8a483f2ccf..c75d317723 100644
--- a/lib/wx/src/gen/wxNavigationKeyEvent.erl
+++ b/lib/wx/src/gen/wxNavigationKeyEvent.erl
@@ -54,7 +54,7 @@ getDirection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetdirection">external documentation</a>.
--spec setDirection(This, BForward) -> ok when
+-spec setDirection(This, BForward) -> 'ok' when
This::wxNavigationKeyEvent(), BForward::boolean().
setDirection(#wx_ref{type=ThisT,ref=ThisRef},BForward)
when is_boolean(BForward) ->
@@ -71,7 +71,7 @@ isWindowChange(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetwindowchange">external documentation</a>.
--spec setWindowChange(This, BIs) -> ok when
+-spec setWindowChange(This, BIs) -> 'ok' when
This::wxNavigationKeyEvent(), BIs::boolean().
setWindowChange(#wx_ref{type=ThisT,ref=ThisRef},BIs)
when is_boolean(BIs) ->
@@ -88,7 +88,7 @@ isFromTab(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetfromtab">external documentation</a>.
--spec setFromTab(This, BIs) -> ok when
+-spec setFromTab(This, BIs) -> 'ok' when
This::wxNavigationKeyEvent(), BIs::boolean().
setFromTab(#wx_ref{type=ThisT,ref=ThisRef},BIs)
when is_boolean(BIs) ->
@@ -105,7 +105,7 @@ getCurrentFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnavigationkeyevent.html#wxnavigationkeyeventsetcurrentfocus">external documentation</a>.
--spec setCurrentFocus(This, Win) -> ok when
+-spec setCurrentFocus(This, Win) -> 'ok' when
This::wxNavigationKeyEvent(), Win::wxWindow:wxWindow().
setCurrentFocus(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxNavigationKeyEvent),
diff --git a/lib/wx/src/gen/wxNotebook.erl b/lib/wx/src/gen/wxNotebook.erl
index 5011375aad..24f96ac88c 100644
--- a/lib/wx/src/gen/wxNotebook.erl
+++ b/lib/wx/src/gen/wxNotebook.erl
@@ -101,9 +101,9 @@ new(Parent,Winid)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebookwxnotebook">external documentation</a>.
-spec new(Parent, Winid, [Option]) -> wxNotebook() when
Parent::wxWindow:wxWindow(), Winid::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Winid, Options)
when is_integer(Winid),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,8 +126,8 @@ addPage(This,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebookaddpage">external documentation</a>.
-spec addPage(This, Page, Text, [Option]) -> boolean() when
This::wxNotebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -141,7 +141,7 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
<<ThisRef:32/?UI,PageRef: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>>).
%% @equiv advanceSelection(This, [])
--spec advanceSelection(This) -> ok when
+-spec advanceSelection(This) -> 'ok' when
This::wxNotebook().
advanceSelection(This)
@@ -149,9 +149,9 @@ advanceSelection(This)
advanceSelection(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebookadvanceselection">external documentation</a>.
--spec advanceSelection(This, [Option]) -> ok when
+-spec advanceSelection(This, [Option]) -> 'ok' when
This::wxNotebook(),
- Option :: {forward, boolean()}.
+ Option :: {'forward', boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -162,7 +162,7 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebookassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList) -> ok when
+-spec assignImageList(This, ImageList) -> 'ok' when
This::wxNotebook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxNotebook),
@@ -181,9 +181,9 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebookcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxNotebook(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -318,8 +318,8 @@ insertPage(This,Position,Win,StrText)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebookinsertpage">external documentation</a>.
-spec insertPage(This, Position, Win, StrText, [Option]) -> boolean() when
This::wxNotebook(), Position::integer(), Win::wxWindow:wxWindow(), StrText::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},Position,#wx_ref{type=WinT,ref=WinRef},StrText, Options)
when is_integer(Position),is_list(StrText),is_list(Options) ->
?CLASS(ThisT,wxNotebook),
@@ -333,7 +333,7 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},Position,#wx_ref{type=WinT,ref=WinRef
<<ThisRef:32/?UI,Position:32/?UI,WinRef:32/?UI,(byte_size(StrText_UC)):32/?UI,(StrText_UC)/binary, 0:(((8- ((0+byte_size(StrText_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebooksetimagelist">external documentation</a>.
--spec setImageList(This, ImageList) -> ok when
+-spec setImageList(This, ImageList) -> 'ok' when
This::wxNotebook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxNotebook),
@@ -342,7 +342,7 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebooksetpadding">external documentation</a>.
--spec setPadding(This, Padding) -> ok when
+-spec setPadding(This, Padding) -> 'ok' when
This::wxNotebook(), Padding::{W::integer(), H::integer()}.
setPadding(#wx_ref{type=ThisT,ref=ThisRef},{PaddingW,PaddingH})
when is_integer(PaddingW),is_integer(PaddingH) ->
@@ -351,7 +351,7 @@ setPadding(#wx_ref{type=ThisT,ref=ThisRef},{PaddingW,PaddingH})
<<ThisRef:32/?UI,PaddingW:32/?UI,PaddingH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebook.html#wxnotebooksetpagesize">external documentation</a>.
--spec setPageSize(This, Size) -> ok when
+-spec setPageSize(This, Size) -> 'ok' when
This::wxNotebook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -397,7 +397,7 @@ changeSelection(#wx_ref{type=ThisT,ref=ThisRef},NPage)
<<ThisRef:32/?UI,NPage:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxNotebook()) -> ok.
+-spec destroy(This::wxNotebook()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxNotebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxNotebookEvent.erl b/lib/wx/src/gen/wxNotebookEvent.erl
index 063cab68ea..899c5b14ca 100644
--- a/lib/wx/src/gen/wxNotebookEvent.erl
+++ b/lib/wx/src/gen/wxNotebookEvent.erl
@@ -67,7 +67,7 @@ getSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebookevent.html#wxnotebookeventsetoldselection">external documentation</a>.
--spec setOldSelection(This, NOldSel) -> ok when
+-spec setOldSelection(This, NOldSel) -> 'ok' when
This::wxNotebookEvent(), NOldSel::integer().
setOldSelection(#wx_ref{type=ThisT,ref=ThisRef},NOldSel)
when is_integer(NOldSel) ->
@@ -76,7 +76,7 @@ setOldSelection(#wx_ref{type=ThisT,ref=ThisRef},NOldSel)
<<ThisRef:32/?UI,NOldSel:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotebookevent.html#wxnotebookeventsetselection">external documentation</a>.
--spec setSelection(This, NSel) -> ok when
+-spec setSelection(This, NSel) -> 'ok' when
This::wxNotebookEvent(), NSel::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},NSel)
when is_integer(NSel) ->
diff --git a/lib/wx/src/gen/wxNotifyEvent.erl b/lib/wx/src/gen/wxNotifyEvent.erl
index 0befce0e77..5f53b3af55 100644
--- a/lib/wx/src/gen/wxNotifyEvent.erl
+++ b/lib/wx/src/gen/wxNotifyEvent.erl
@@ -45,7 +45,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxNotifyEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotifyevent.html#wxnotifyeventallow">external documentation</a>.
--spec allow(This) -> ok when
+-spec allow(This) -> 'ok' when
This::wxNotifyEvent().
allow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotifyEvent),
@@ -61,7 +61,7 @@ isAllowed(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxnotifyevent.html#wxnotifyeventveto">external documentation</a>.
--spec veto(This) -> ok when
+-spec veto(This) -> 'ok' when
This::wxNotifyEvent().
veto(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxNotifyEvent),
diff --git a/lib/wx/src/gen/wxOverlay.erl b/lib/wx/src/gen/wxOverlay.erl
index 7da3ece657..efe6e69589 100644
--- a/lib/wx/src/gen/wxOverlay.erl
+++ b/lib/wx/src/gen/wxOverlay.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ new() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxoverlay.html#wxoverlayreset">external documentation</a>.
--spec reset(This) -> ok when
+-spec reset(This) -> 'ok' when
This::wxOverlay().
reset(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxOverlay),
@@ -50,7 +50,7 @@ reset(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxOverlay()) -> ok.
+-spec destroy(This::wxOverlay()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxOverlay),
wxe_util:destroy(?wxOverlay_destruct,Obj),
diff --git a/lib/wx/src/gen/wxPageSetupDialog.erl b/lib/wx/src/gen/wxPageSetupDialog.erl
index 41897064b5..091ba4628e 100644
--- a/lib/wx/src/gen/wxPageSetupDialog.erl
+++ b/lib/wx/src/gen/wxPageSetupDialog.erl
@@ -46,7 +46,7 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialog.html#wxpagesetupdialogwxpagesetupdialog">external documentation</a>.
-spec new(Parent, [Option]) -> wxPageSetupDialog() when
Parent::wxWindow:wxWindow(),
- Option :: {data, wxPageSetupDialogData:wxPageSetupDialogData()}.
+ Option :: {'data', wxPageSetupDialogData:wxPageSetupDialogData()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -73,7 +73,7 @@ showModal(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPageSetupDialog()) -> ok.
+-spec destroy(This::wxPageSetupDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPageSetupDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPageSetupDialogData.erl b/lib/wx/src/gen/wxPageSetupDialogData.erl
index 6aa8865e32..56c059c232 100644
--- a/lib/wx/src/gen/wxPageSetupDialogData.erl
+++ b/lib/wx/src/gen/wxPageSetupDialogData.erl
@@ -62,7 +62,7 @@ new(#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
<<PrintDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenablehelp">external documentation</a>.
--spec enableHelp(This, Flag) -> ok when
+-spec enableHelp(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
enableHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -71,7 +71,7 @@ enableHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenablemargins">external documentation</a>.
--spec enableMargins(This, Flag) -> ok when
+-spec enableMargins(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
enableMargins(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -80,7 +80,7 @@ enableMargins(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenableorientation">external documentation</a>.
--spec enableOrientation(This, Flag) -> ok when
+-spec enableOrientation(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
enableOrientation(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -89,7 +89,7 @@ enableOrientation(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenablepaper">external documentation</a>.
--spec enablePaper(This, Flag) -> ok when
+-spec enablePaper(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
enablePaper(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -98,7 +98,7 @@ enablePaper(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdataenableprinter">external documentation</a>.
--spec enablePrinter(This, Flag) -> ok when
+-spec enablePrinter(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
enablePrinter(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -228,7 +228,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetdefaultinfo">external documentation</a>.
--spec setDefaultInfo(This, Flag) -> ok when
+-spec setDefaultInfo(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
setDefaultInfo(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -237,7 +237,7 @@ setDefaultInfo(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetdefaultminmargins">external documentation</a>.
--spec setDefaultMinMargins(This, Flag) -> ok when
+-spec setDefaultMinMargins(This, Flag) -> 'ok' when
This::wxPageSetupDialogData(), Flag::boolean().
setDefaultMinMargins(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -246,7 +246,7 @@ setDefaultMinMargins(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetmargintopleft">external documentation</a>.
--spec setMarginTopLeft(This, Pt) -> ok when
+-spec setMarginTopLeft(This, Pt) -> 'ok' when
This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -255,7 +255,7 @@ setMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetmarginbottomright">external documentation</a>.
--spec setMarginBottomRight(This, Pt) -> ok when
+-spec setMarginBottomRight(This, Pt) -> 'ok' when
This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -264,7 +264,7 @@ setMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetminmargintopleft">external documentation</a>.
--spec setMinMarginTopLeft(This, Pt) -> ok when
+-spec setMinMarginTopLeft(This, Pt) -> 'ok' when
This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMinMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -273,7 +273,7 @@ setMinMarginTopLeft(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetminmarginbottomright">external documentation</a>.
--spec setMinMarginBottomRight(This, Pt) -> ok when
+-spec setMinMarginBottomRight(This, Pt) -> 'ok' when
This::wxPageSetupDialogData(), Pt::{X::integer(), Y::integer()}.
setMinMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
when is_integer(PtX),is_integer(PtY) ->
@@ -283,7 +283,7 @@ setMinMarginBottomRight(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetpaperid">external documentation</a>.
%%<br /> Id = ?wxPAPER_NONE | ?wxPAPER_LETTER | ?wxPAPER_LEGAL | ?wxPAPER_A4 | ?wxPAPER_CSHEET | ?wxPAPER_DSHEET | ?wxPAPER_ESHEET | ?wxPAPER_LETTERSMALL | ?wxPAPER_TABLOID | ?wxPAPER_LEDGER | ?wxPAPER_STATEMENT | ?wxPAPER_EXECUTIVE | ?wxPAPER_A3 | ?wxPAPER_A4SMALL | ?wxPAPER_A5 | ?wxPAPER_B4 | ?wxPAPER_B5 | ?wxPAPER_FOLIO | ?wxPAPER_QUARTO | ?wxPAPER_10X14 | ?wxPAPER_11X17 | ?wxPAPER_NOTE | ?wxPAPER_ENV_9 | ?wxPAPER_ENV_10 | ?wxPAPER_ENV_11 | ?wxPAPER_ENV_12 | ?wxPAPER_ENV_14 | ?wxPAPER_ENV_DL | ?wxPAPER_ENV_C5 | ?wxPAPER_ENV_C3 | ?wxPAPER_ENV_C4 | ?wxPAPER_ENV_C6 | ?wxPAPER_ENV_C65 | ?wxPAPER_ENV_B4 | ?wxPAPER_ENV_B5 | ?wxPAPER_ENV_B6 | ?wxPAPER_ENV_ITALY | ?wxPAPER_ENV_MONARCH | ?wxPAPER_ENV_PERSONAL | ?wxPAPER_FANFOLD_US | ?wxPAPER_FANFOLD_STD_GERMAN | ?wxPAPER_FANFOLD_LGL_GERMAN | ?wxPAPER_ISO_B4 | ?wxPAPER_JAPANESE_POSTCARD | ?wxPAPER_9X11 | ?wxPAPER_10X11 | ?wxPAPER_15X11 | ?wxPAPER_ENV_INVITE | ?wxPAPER_LETTER_EXTRA | ?wxPAPER_LEGAL_EXTRA | ?wxPAPER_TABLOID_EXTRA | ?wxPAPER_A4_EXTRA | ?wxPAPER_LETTER_TRANSVERSE | ?wxPAPER_A4_TRANSVERSE | ?wxPAPER_LETTER_EXTRA_TRANSVERSE | ?wxPAPER_A_PLUS | ?wxPAPER_B_PLUS | ?wxPAPER_LETTER_PLUS | ?wxPAPER_A4_PLUS | ?wxPAPER_A5_TRANSVERSE | ?wxPAPER_B5_TRANSVERSE | ?wxPAPER_A3_EXTRA | ?wxPAPER_A5_EXTRA | ?wxPAPER_B5_EXTRA | ?wxPAPER_A2 | ?wxPAPER_A3_TRANSVERSE | ?wxPAPER_A3_EXTRA_TRANSVERSE | ?wxPAPER_DBL_JAPANESE_POSTCARD | ?wxPAPER_A6 | ?wxPAPER_JENV_KAKU2 | ?wxPAPER_JENV_KAKU3 | ?wxPAPER_JENV_CHOU3 | ?wxPAPER_JENV_CHOU4 | ?wxPAPER_LETTER_ROTATED | ?wxPAPER_A3_ROTATED | ?wxPAPER_A4_ROTATED | ?wxPAPER_A5_ROTATED | ?wxPAPER_B4_JIS_ROTATED | ?wxPAPER_B5_JIS_ROTATED | ?wxPAPER_JAPANESE_POSTCARD_ROTATED | ?wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED | ?wxPAPER_A6_ROTATED | ?wxPAPER_JENV_KAKU2_ROTATED | ?wxPAPER_JENV_KAKU3_ROTATED | ?wxPAPER_JENV_CHOU3_ROTATED | ?wxPAPER_JENV_CHOU4_ROTATED | ?wxPAPER_B6_JIS | ?wxPAPER_B6_JIS_ROTATED | ?wxPAPER_12X11 | ?wxPAPER_JENV_YOU4 | ?wxPAPER_JENV_YOU4_ROTATED | ?wxPAPER_P16K | ?wxPAPER_P32K | ?wxPAPER_P32KBIG | ?wxPAPER_PENV_1 | ?wxPAPER_PENV_2 | ?wxPAPER_PENV_3 | ?wxPAPER_PENV_4 | ?wxPAPER_PENV_5 | ?wxPAPER_PENV_6 | ?wxPAPER_PENV_7 | ?wxPAPER_PENV_8 | ?wxPAPER_PENV_9 | ?wxPAPER_PENV_10 | ?wxPAPER_P16K_ROTATED | ?wxPAPER_P32K_ROTATED | ?wxPAPER_P32KBIG_ROTATED | ?wxPAPER_PENV_1_ROTATED | ?wxPAPER_PENV_2_ROTATED | ?wxPAPER_PENV_3_ROTATED | ?wxPAPER_PENV_4_ROTATED | ?wxPAPER_PENV_5_ROTATED | ?wxPAPER_PENV_6_ROTATED | ?wxPAPER_PENV_7_ROTATED | ?wxPAPER_PENV_8_ROTATED | ?wxPAPER_PENV_9_ROTATED | ?wxPAPER_PENV_10_ROTATED
--spec setPaperId(This, Id) -> ok when
+-spec setPaperId(This, Id) -> 'ok' when
This::wxPageSetupDialogData(), Id::wx:wx_enum().
setPaperId(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
@@ -293,13 +293,13 @@ setPaperId(#wx_ref{type=ThisT,ref=ThisRef},Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetpapersize">external documentation</a>.
%% <br /> Also:<br />
-%% setPaperSize(This, Sz) -> ok when<br />
+%% setPaperSize(This, Sz) -> 'ok' when<br />
%% This::wxPageSetupDialogData(), Sz::{W::integer(), H::integer()}.<br />
%%
%%<br /> Id = ?wxPAPER_NONE | ?wxPAPER_LETTER | ?wxPAPER_LEGAL | ?wxPAPER_A4 | ?wxPAPER_CSHEET | ?wxPAPER_DSHEET | ?wxPAPER_ESHEET | ?wxPAPER_LETTERSMALL | ?wxPAPER_TABLOID | ?wxPAPER_LEDGER | ?wxPAPER_STATEMENT | ?wxPAPER_EXECUTIVE | ?wxPAPER_A3 | ?wxPAPER_A4SMALL | ?wxPAPER_A5 | ?wxPAPER_B4 | ?wxPAPER_B5 | ?wxPAPER_FOLIO | ?wxPAPER_QUARTO | ?wxPAPER_10X14 | ?wxPAPER_11X17 | ?wxPAPER_NOTE | ?wxPAPER_ENV_9 | ?wxPAPER_ENV_10 | ?wxPAPER_ENV_11 | ?wxPAPER_ENV_12 | ?wxPAPER_ENV_14 | ?wxPAPER_ENV_DL | ?wxPAPER_ENV_C5 | ?wxPAPER_ENV_C3 | ?wxPAPER_ENV_C4 | ?wxPAPER_ENV_C6 | ?wxPAPER_ENV_C65 | ?wxPAPER_ENV_B4 | ?wxPAPER_ENV_B5 | ?wxPAPER_ENV_B6 | ?wxPAPER_ENV_ITALY | ?wxPAPER_ENV_MONARCH | ?wxPAPER_ENV_PERSONAL | ?wxPAPER_FANFOLD_US | ?wxPAPER_FANFOLD_STD_GERMAN | ?wxPAPER_FANFOLD_LGL_GERMAN | ?wxPAPER_ISO_B4 | ?wxPAPER_JAPANESE_POSTCARD | ?wxPAPER_9X11 | ?wxPAPER_10X11 | ?wxPAPER_15X11 | ?wxPAPER_ENV_INVITE | ?wxPAPER_LETTER_EXTRA | ?wxPAPER_LEGAL_EXTRA | ?wxPAPER_TABLOID_EXTRA | ?wxPAPER_A4_EXTRA | ?wxPAPER_LETTER_TRANSVERSE | ?wxPAPER_A4_TRANSVERSE | ?wxPAPER_LETTER_EXTRA_TRANSVERSE | ?wxPAPER_A_PLUS | ?wxPAPER_B_PLUS | ?wxPAPER_LETTER_PLUS | ?wxPAPER_A4_PLUS | ?wxPAPER_A5_TRANSVERSE | ?wxPAPER_B5_TRANSVERSE | ?wxPAPER_A3_EXTRA | ?wxPAPER_A5_EXTRA | ?wxPAPER_B5_EXTRA | ?wxPAPER_A2 | ?wxPAPER_A3_TRANSVERSE | ?wxPAPER_A3_EXTRA_TRANSVERSE | ?wxPAPER_DBL_JAPANESE_POSTCARD | ?wxPAPER_A6 | ?wxPAPER_JENV_KAKU2 | ?wxPAPER_JENV_KAKU3 | ?wxPAPER_JENV_CHOU3 | ?wxPAPER_JENV_CHOU4 | ?wxPAPER_LETTER_ROTATED | ?wxPAPER_A3_ROTATED | ?wxPAPER_A4_ROTATED | ?wxPAPER_A5_ROTATED | ?wxPAPER_B4_JIS_ROTATED | ?wxPAPER_B5_JIS_ROTATED | ?wxPAPER_JAPANESE_POSTCARD_ROTATED | ?wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED | ?wxPAPER_A6_ROTATED | ?wxPAPER_JENV_KAKU2_ROTATED | ?wxPAPER_JENV_KAKU3_ROTATED | ?wxPAPER_JENV_CHOU3_ROTATED | ?wxPAPER_JENV_CHOU4_ROTATED | ?wxPAPER_B6_JIS | ?wxPAPER_B6_JIS_ROTATED | ?wxPAPER_12X11 | ?wxPAPER_JENV_YOU4 | ?wxPAPER_JENV_YOU4_ROTATED | ?wxPAPER_P16K | ?wxPAPER_P32K | ?wxPAPER_P32KBIG | ?wxPAPER_PENV_1 | ?wxPAPER_PENV_2 | ?wxPAPER_PENV_3 | ?wxPAPER_PENV_4 | ?wxPAPER_PENV_5 | ?wxPAPER_PENV_6 | ?wxPAPER_PENV_7 | ?wxPAPER_PENV_8 | ?wxPAPER_PENV_9 | ?wxPAPER_PENV_10 | ?wxPAPER_P16K_ROTATED | ?wxPAPER_P32K_ROTATED | ?wxPAPER_P32KBIG_ROTATED | ?wxPAPER_PENV_1_ROTATED | ?wxPAPER_PENV_2_ROTATED | ?wxPAPER_PENV_3_ROTATED | ?wxPAPER_PENV_4_ROTATED | ?wxPAPER_PENV_5_ROTATED | ?wxPAPER_PENV_6_ROTATED | ?wxPAPER_PENV_7_ROTATED | ?wxPAPER_PENV_8_ROTATED | ?wxPAPER_PENV_9_ROTATED | ?wxPAPER_PENV_10_ROTATED
--spec setPaperSize(This, Id) -> ok when
+-spec setPaperSize(This, Id) -> 'ok' when
This::wxPageSetupDialogData(), Id::wx:wx_enum();
- (This, Sz) -> ok when
+ (This, Sz) -> 'ok' when
This::wxPageSetupDialogData(), Sz::{W::integer(), H::integer()}.
setPaperSize(#wx_ref{type=ThisT,ref=ThisRef},Id)
when is_integer(Id) ->
@@ -313,7 +313,7 @@ setPaperSize(#wx_ref{type=ThisT,ref=ThisRef},{SzW,SzH})
<<ThisRef:32/?UI,SzW:32/?UI,SzH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetprintdata">external documentation</a>.
--spec setPrintData(This, PrintData) -> ok when
+-spec setPrintData(This, PrintData) -> 'ok' when
This::wxPageSetupDialogData(), PrintData::wxPrintData:wxPrintData().
setPrintData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
?CLASS(ThisT,wxPageSetupDialogData),
@@ -322,7 +322,7 @@ setPrintData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintDataT,ref=PrintDa
<<ThisRef:32/?UI,PrintDataRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPageSetupDialogData()) -> ok.
+-spec destroy(This::wxPageSetupDialogData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPageSetupDialogData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPaintDC.erl b/lib/wx/src/gen/wxPaintDC.erl
index 77efd2c4ba..b571219020 100644
--- a/lib/wx/src/gen/wxPaintDC.erl
+++ b/lib/wx/src/gen/wxPaintDC.erl
@@ -80,7 +80,7 @@ new(#wx_ref{type=WinT,ref=WinRef}) ->
<<WinRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPaintDC()) -> ok.
+-spec destroy(This::wxPaintDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPaintDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPalette.erl b/lib/wx/src/gen/wxPalette.erl
index 8ac0833e01..799ce2b90d 100644
--- a/lib/wx/src/gen/wxPalette.erl
+++ b/lib/wx/src/gen/wxPalette.erl
@@ -101,7 +101,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPalette()) -> ok.
+-spec destroy(This::wxPalette()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPalette),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPaletteChangedEvent.erl b/lib/wx/src/gen/wxPaletteChangedEvent.erl
index ab49719f6e..bc054fa285 100644
--- a/lib/wx/src/gen/wxPaletteChangedEvent.erl
+++ b/lib/wx/src/gen/wxPaletteChangedEvent.erl
@@ -45,7 +45,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxPaletteChangedEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpalettechangedevent.html#wxpalettechangedeventsetchangedwindow">external documentation</a>.
--spec setChangedWindow(This, Win) -> ok when
+-spec setChangedWindow(This, Win) -> 'ok' when
This::wxPaletteChangedEvent(), Win::wxWindow:wxWindow().
setChangedWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxPaletteChangedEvent),
diff --git a/lib/wx/src/gen/wxPanel.erl b/lib/wx/src/gen/wxPanel.erl
index ceb894fe31..07898cf19e 100644
--- a/lib/wx/src/gen/wxPanel.erl
+++ b/lib/wx/src/gen/wxPanel.erl
@@ -94,10 +94,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpanel.html#wxpanelwxpanel">external documentation</a>.
-spec new(Parent, [Option]) -> wxPanel() when
Parent::wxWindow:wxWindow(),
- Option :: {winid, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'winid', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -121,7 +121,7 @@ new(Parent,X,Y,Width,Height)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpanel.html#wxpanelwxpanel">external documentation</a>.
-spec new(Parent, X, Y, Width, Height, [Option]) -> wxPanel() when
Parent::wxWindow:wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},X,Y,Width,Height, Options)
when is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -132,7 +132,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},X,Y,Width,Height, Options)
<<ParentRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpanel.html#wxpanelinitdialog">external documentation</a>.
--spec initDialog(This) -> ok when
+-spec initDialog(This) -> 'ok' when
This::wxPanel().
initDialog(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPanel),
@@ -140,7 +140,7 @@ initDialog(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpanel.html#wxpanelsetfocusignoringchildren">external documentation</a>.
--spec setFocusIgnoringChildren(This) -> ok when
+-spec setFocusIgnoringChildren(This) -> 'ok' when
This::wxPanel().
setFocusIgnoringChildren(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPanel),
@@ -148,7 +148,7 @@ setFocusIgnoringChildren(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPanel()) -> ok.
+-spec destroy(This::wxPanel()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPanel),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPasswordEntryDialog.erl b/lib/wx/src/gen/wxPasswordEntryDialog.erl
index ac3f1c9d8c..e8ee8c8f37 100644
--- a/lib/wx/src/gen/wxPasswordEntryDialog.erl
+++ b/lib/wx/src/gen/wxPasswordEntryDialog.erl
@@ -101,10 +101,10 @@ new(Parent,Message)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpasswordentrydialog.html#wxpasswordentrydialogwxpasswordentrydialog">external documentation</a>.
-spec new(Parent, Message, [Option]) -> wxPasswordEntryDialog() when
Parent::wxWindow:wxWindow(), Message::unicode:chardata(),
- Option :: {caption, unicode:chardata()}
- | {value, unicode:chardata()}
- | {style, integer()}
- | {pos, {X::integer(), Y::integer()}}.
+ Option :: {'caption', unicode:chardata()}
+ | {'value', unicode:chardata()}
+ | {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
when is_list(Message),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -119,7 +119,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
<<ParentRef:32/?UI,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((0+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPasswordEntryDialog()) -> ok.
+-spec destroy(This::wxPasswordEntryDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPasswordEntryDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPen.erl b/lib/wx/src/gen/wxPen.erl
index 761b885006..7a2bbb827e 100644
--- a/lib/wx/src/gen/wxPen.erl
+++ b/lib/wx/src/gen/wxPen.erl
@@ -54,8 +54,8 @@ new(Colour)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpenwxpen">external documentation</a>.
-spec new(Colour, [Option]) -> wxPen() when
Colour::wx:wx_colour(),
- Option :: {width, integer()}
- | {style, integer()}.
+ Option :: {'width', integer()}
+ | {'style', integer()}.
new(Colour, Options)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4,is_list(Options) ->
MOpts = fun({width, Width}, Acc) -> [<<1:32/?UI,Width:32/?UI>>|Acc];
@@ -115,7 +115,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetcap">external documentation</a>.
%%<br /> CapStyle = integer
--spec setCap(This, CapStyle) -> ok when
+-spec setCap(This, CapStyle) -> 'ok' when
This::wxPen(), CapStyle::wx:wx_enum().
setCap(#wx_ref{type=ThisT,ref=ThisRef},CapStyle)
when is_integer(CapStyle) ->
@@ -124,7 +124,7 @@ setCap(#wx_ref{type=ThisT,ref=ThisRef},CapStyle)
<<ThisRef:32/?UI,CapStyle:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetcolour">external documentation</a>.
--spec setColour(This, Colour) -> ok when
+-spec setColour(This, Colour) -> 'ok' when
This::wxPen(), Colour::wx:wx_colour().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -133,7 +133,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetcolour">external documentation</a>.
--spec setColour(This, Red, Green, Blue) -> ok when
+-spec setColour(This, Red, Green, Blue) -> 'ok' when
This::wxPen(), Red::integer(), Green::integer(), Blue::integer().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Red,Green,Blue)
when is_integer(Red),is_integer(Green),is_integer(Blue) ->
@@ -143,7 +143,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Red,Green,Blue)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetjoin">external documentation</a>.
%%<br /> JoinStyle = integer
--spec setJoin(This, JoinStyle) -> ok when
+-spec setJoin(This, JoinStyle) -> 'ok' when
This::wxPen(), JoinStyle::wx:wx_enum().
setJoin(#wx_ref{type=ThisT,ref=ThisRef},JoinStyle)
when is_integer(JoinStyle) ->
@@ -152,7 +152,7 @@ setJoin(#wx_ref{type=ThisT,ref=ThisRef},JoinStyle)
<<ThisRef:32/?UI,JoinStyle:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetstyle">external documentation</a>.
--spec setStyle(This, Style) -> ok when
+-spec setStyle(This, Style) -> 'ok' when
This::wxPen(), Style::integer().
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
@@ -161,7 +161,7 @@ setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
<<ThisRef:32/?UI,Style:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetwidth">external documentation</a>.
--spec setWidth(This, Width) -> ok when
+-spec setWidth(This, Width) -> 'ok' when
This::wxPen(), Width::integer().
setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -170,7 +170,7 @@ setWidth(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPen()) -> ok.
+-spec destroy(This::wxPen()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPen),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPickerBase.erl b/lib/wx/src/gen/wxPickerBase.erl
index bbdeaf6af8..33931f9119 100644
--- a/lib/wx/src/gen/wxPickerBase.erl
+++ b/lib/wx/src/gen/wxPickerBase.erl
@@ -83,7 +83,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxPickerBase() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpickerbase.html#wxpickerbasesetinternalmargin">external documentation</a>.
--spec setInternalMargin(This, Newmargin) -> ok when
+-spec setInternalMargin(This, Newmargin) -> 'ok' when
This::wxPickerBase(), Newmargin::integer().
setInternalMargin(#wx_ref{type=ThisT,ref=ThisRef},Newmargin)
when is_integer(Newmargin) ->
@@ -100,7 +100,7 @@ getInternalMargin(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpickerbase.html#wxpickerbasesettextctrlproportion">external documentation</a>.
--spec setTextCtrlProportion(This, Prop) -> ok when
+-spec setTextCtrlProportion(This, Prop) -> 'ok' when
This::wxPickerBase(), Prop::integer().
setTextCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef},Prop)
when is_integer(Prop) ->
@@ -109,7 +109,7 @@ setTextCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef},Prop)
<<ThisRef:32/?UI,Prop:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpickerbase.html#wxpickerbasesetpickerctrlproportion">external documentation</a>.
--spec setPickerCtrlProportion(This, Prop) -> ok when
+-spec setPickerCtrlProportion(This, Prop) -> 'ok' when
This::wxPickerBase(), Prop::integer().
setPickerCtrlProportion(#wx_ref{type=ThisT,ref=ThisRef},Prop)
when is_integer(Prop) ->
@@ -158,7 +158,7 @@ isTextCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv setPickerCtrlGrowable(This, [])
--spec setPickerCtrlGrowable(This) -> ok when
+-spec setPickerCtrlGrowable(This) -> 'ok' when
This::wxPickerBase().
setPickerCtrlGrowable(This)
@@ -166,9 +166,9 @@ setPickerCtrlGrowable(This)
setPickerCtrlGrowable(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpickerbase.html#wxpickerbasesetpickerctrlgrowable">external documentation</a>.
--spec setPickerCtrlGrowable(This, [Option]) -> ok when
+-spec setPickerCtrlGrowable(This, [Option]) -> 'ok' when
This::wxPickerBase(),
- Option :: {grow, boolean()}.
+ Option :: {'grow', boolean()}.
setPickerCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPickerBase),
@@ -179,7 +179,7 @@ setPickerCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setTextCtrlGrowable(This, [])
--spec setTextCtrlGrowable(This) -> ok when
+-spec setTextCtrlGrowable(This) -> 'ok' when
This::wxPickerBase().
setTextCtrlGrowable(This)
@@ -187,9 +187,9 @@ setTextCtrlGrowable(This)
setTextCtrlGrowable(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpickerbase.html#wxpickerbasesettextctrlgrowable">external documentation</a>.
--spec setTextCtrlGrowable(This, [Option]) -> ok when
+-spec setTextCtrlGrowable(This, [Option]) -> 'ok' when
This::wxPickerBase(),
- Option :: {grow, boolean()}.
+ Option :: {'grow', boolean()}.
setTextCtrlGrowable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPickerBase),
diff --git a/lib/wx/src/gen/wxPopupTransientWindow.erl b/lib/wx/src/gen/wxPopupTransientWindow.erl
index c07c6e239e..b1feef6dcb 100644
--- a/lib/wx/src/gen/wxPopupTransientWindow.erl
+++ b/lib/wx/src/gen/wxPopupTransientWindow.erl
@@ -96,7 +96,7 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopuptransientwindow.html#wxpopuptransientwindowwxpopuptransientwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxPopupTransientWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -107,7 +107,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
<<ParentRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv popup(This, [])
--spec popup(This) -> ok when
+-spec popup(This) -> 'ok' when
This::wxPopupTransientWindow().
popup(This)
@@ -115,9 +115,9 @@ popup(This)
popup(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopuptransientwindow.html#wxpopuptransientwindowpopup">external documentation</a>.
--spec popup(This, [Option]) -> ok when
+-spec popup(This, [Option]) -> 'ok' when
This::wxPopupTransientWindow(),
- Option :: {focus, wxWindow:wxWindow()}.
+ Option :: {'focus', wxWindow:wxWindow()}.
popup(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPopupTransientWindow),
@@ -128,7 +128,7 @@ popup(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopuptransientwindow.html#wxpopuptransientwindowdismiss">external documentation</a>.
--spec dismiss(This) -> ok when
+-spec dismiss(This) -> 'ok' when
This::wxPopupTransientWindow().
dismiss(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPopupTransientWindow),
@@ -136,7 +136,7 @@ dismiss(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPopupTransientWindow()) -> ok.
+-spec destroy(This::wxPopupTransientWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPopupTransientWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPopupWindow.erl b/lib/wx/src/gen/wxPopupWindow.erl
index 439f5fac54..962fd9903b 100644
--- a/lib/wx/src/gen/wxPopupWindow.erl
+++ b/lib/wx/src/gen/wxPopupWindow.erl
@@ -94,7 +94,7 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopupwindow.html#wxpopupwindowwxpopupwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxPopupWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -115,7 +115,7 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopupwindow.html#wxpopupwindowcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxPopupWindow(), Parent::wxWindow:wxWindow(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPopupWindow),
@@ -127,7 +127,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpopupwindow.html#wxpopupwindowposition">external documentation</a>.
--spec position(This, PtOrigin, Size) -> ok when
+-spec position(This, PtOrigin, Size) -> 'ok' when
This::wxPopupWindow(), PtOrigin::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}.
position(#wx_ref{type=ThisT,ref=ThisRef},{PtOriginX,PtOriginY},{SizeW,SizeH})
when is_integer(PtOriginX),is_integer(PtOriginY),is_integer(SizeW),is_integer(SizeH) ->
@@ -136,7 +136,7 @@ position(#wx_ref{type=ThisT,ref=ThisRef},{PtOriginX,PtOriginY},{SizeW,SizeH})
<<ThisRef:32/?UI,PtOriginX:32/?UI,PtOriginY:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPopupWindow()) -> ok.
+-spec destroy(This::wxPopupWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPopupWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPostScriptDC.erl b/lib/wx/src/gen/wxPostScriptDC.erl
index 28f8a757ed..07764bca74 100644
--- a/lib/wx/src/gen/wxPostScriptDC.erl
+++ b/lib/wx/src/gen/wxPostScriptDC.erl
@@ -78,7 +78,7 @@ new(#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
<<PrintDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpostscriptdc.html#wxpostscriptdcsetresolution">external documentation</a>.
--spec setResolution(Ppi) -> ok when
+-spec setResolution(Ppi) -> 'ok' when
Ppi::integer().
setResolution(Ppi)
when is_integer(Ppi) ->
@@ -92,7 +92,7 @@ getResolution() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPostScriptDC()) -> ok.
+-spec destroy(This::wxPostScriptDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPostScriptDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPreviewControlBar.erl b/lib/wx/src/gen/wxPreviewControlBar.erl
index 0e1828e87b..4dd224b26b 100644
--- a/lib/wx/src/gen/wxPreviewControlBar.erl
+++ b/lib/wx/src/gen/wxPreviewControlBar.erl
@@ -91,9 +91,9 @@ new(Preview,Buttons,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbarwxpreviewcontrolbar">external documentation</a>.
-spec new(Preview, Buttons, Parent, [Option]) -> wxPreviewControlBar() when
Preview::wxPrintPreview:wxPrintPreview(), Buttons::integer(), Parent::wxWindow:wxWindow(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=PreviewT,ref=PreviewRef},Buttons,#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_integer(Buttons),is_list(Options) ->
?CLASS(PreviewT,wxPrintPreview),
@@ -107,7 +107,7 @@ new(#wx_ref{type=PreviewT,ref=PreviewRef},Buttons,#wx_ref{type=ParentT,ref=Paren
<<PreviewRef:32/?UI,Buttons:32/?UI,ParentRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbarcreatebuttons">external documentation</a>.
--spec createButtons(This) -> ok when
+-spec createButtons(This) -> 'ok' when
This::wxPreviewControlBar().
createButtons(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewControlBar),
@@ -131,7 +131,7 @@ getZoomControl(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewcontrolbar.html#wxpreviewcontrolbarsetzoomcontrol">external documentation</a>.
--spec setZoomControl(This, Zoom) -> ok when
+-spec setZoomControl(This, Zoom) -> 'ok' when
This::wxPreviewControlBar(), Zoom::integer().
setZoomControl(#wx_ref{type=ThisT,ref=ThisRef},Zoom)
when is_integer(Zoom) ->
@@ -140,7 +140,7 @@ setZoomControl(#wx_ref{type=ThisT,ref=ThisRef},Zoom)
<<ThisRef:32/?UI,Zoom:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPreviewControlBar()) -> ok.
+-spec destroy(This::wxPreviewControlBar()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPreviewControlBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPreviewFrame.erl b/lib/wx/src/gen/wxPreviewFrame.erl
index fe684478a5..2f530b49ea 100644
--- a/lib/wx/src/gen/wxPreviewFrame.erl
+++ b/lib/wx/src/gen/wxPreviewFrame.erl
@@ -102,10 +102,10 @@ new(Preview,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewframe.html#wxpreviewframewxpreviewframe">external documentation</a>.
-spec new(Preview, Parent, [Option]) -> wxPreviewFrame() when
Preview::wxPrintPreview:wxPrintPreview(), Parent::wxWindow:wxWindow(),
- Option :: {title, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'title', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=PreviewT,ref=PreviewRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(PreviewT,wxPrintPreview),
@@ -120,7 +120,7 @@ new(#wx_ref{type=PreviewT,ref=PreviewRef},#wx_ref{type=ParentT,ref=ParentRef}, O
<<PreviewRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewframe.html#wxpreviewframecreatecontrolbar">external documentation</a>.
--spec createControlBar(This) -> ok when
+-spec createControlBar(This) -> 'ok' when
This::wxPreviewFrame().
createControlBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewFrame),
@@ -128,7 +128,7 @@ createControlBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewframe.html#wxpreviewframecreatecanvas">external documentation</a>.
--spec createCanvas(This) -> ok when
+-spec createCanvas(This) -> 'ok' when
This::wxPreviewFrame().
createCanvas(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewFrame),
@@ -136,7 +136,7 @@ createCanvas(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewframe.html#wxpreviewframeinitialize">external documentation</a>.
--spec initialize(This) -> ok when
+-spec initialize(This) -> 'ok' when
This::wxPreviewFrame().
initialize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPreviewFrame),
@@ -144,7 +144,7 @@ initialize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpreviewframe.html#wxpreviewframeonclosewindow">external documentation</a>.
--spec onCloseWindow(This, Event) -> ok when
+-spec onCloseWindow(This, Event) -> 'ok' when
This::wxPreviewFrame(), Event::wxCloseEvent:wxCloseEvent().
onCloseWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef}) ->
?CLASS(ThisT,wxPreviewFrame),
@@ -153,7 +153,7 @@ onCloseWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=EventT,ref=EventRef})
<<ThisRef:32/?UI,EventRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPreviewFrame()) -> ok.
+-spec destroy(This::wxPreviewFrame()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPreviewFrame),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintData.erl b/lib/wx/src/gen/wxPrintData.erl
index a8a72c52f4..6b6b678adf 100644
--- a/lib/wx/src/gen/wxPrintData.erl
+++ b/lib/wx/src/gen/wxPrintData.erl
@@ -137,7 +137,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetbin">external documentation</a>.
%%<br /> Bin = ?wxPRINTBIN_DEFAULT | ?wxPRINTBIN_ONLYONE | ?wxPRINTBIN_LOWER | ?wxPRINTBIN_MIDDLE | ?wxPRINTBIN_MANUAL | ?wxPRINTBIN_ENVELOPE | ?wxPRINTBIN_ENVMANUAL | ?wxPRINTBIN_AUTO | ?wxPRINTBIN_TRACTOR | ?wxPRINTBIN_SMALLFMT | ?wxPRINTBIN_LARGEFMT | ?wxPRINTBIN_LARGECAPACITY | ?wxPRINTBIN_CASSETTE | ?wxPRINTBIN_FORMSOURCE | ?wxPRINTBIN_USER
--spec setBin(This, Bin) -> ok when
+-spec setBin(This, Bin) -> 'ok' when
This::wxPrintData(), Bin::wx:wx_enum().
setBin(#wx_ref{type=ThisT,ref=ThisRef},Bin)
when is_integer(Bin) ->
@@ -146,7 +146,7 @@ setBin(#wx_ref{type=ThisT,ref=ThisRef},Bin)
<<ThisRef:32/?UI,Bin:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetcollate">external documentation</a>.
--spec setCollate(This, Flag) -> ok when
+-spec setCollate(This, Flag) -> 'ok' when
This::wxPrintData(), Flag::boolean().
setCollate(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -155,7 +155,7 @@ setCollate(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetcolour">external documentation</a>.
--spec setColour(This, Colour) -> ok when
+-spec setColour(This, Colour) -> 'ok' when
This::wxPrintData(), Colour::boolean().
setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when is_boolean(Colour) ->
@@ -165,7 +165,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetduplex">external documentation</a>.
%%<br /> Duplex = ?wxDUPLEX_SIMPLEX | ?wxDUPLEX_HORIZONTAL | ?wxDUPLEX_VERTICAL
--spec setDuplex(This, Duplex) -> ok when
+-spec setDuplex(This, Duplex) -> 'ok' when
This::wxPrintData(), Duplex::wx:wx_enum().
setDuplex(#wx_ref{type=ThisT,ref=ThisRef},Duplex)
when is_integer(Duplex) ->
@@ -174,7 +174,7 @@ setDuplex(#wx_ref{type=ThisT,ref=ThisRef},Duplex)
<<ThisRef:32/?UI,Duplex:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetnocopies">external documentation</a>.
--spec setNoCopies(This, V) -> ok when
+-spec setNoCopies(This, V) -> 'ok' when
This::wxPrintData(), V::integer().
setNoCopies(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
@@ -183,7 +183,7 @@ setNoCopies(#wx_ref{type=ThisT,ref=ThisRef},V)
<<ThisRef:32/?UI,V:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetorientation">external documentation</a>.
--spec setOrientation(This, Orient) -> ok when
+-spec setOrientation(This, Orient) -> 'ok' when
This::wxPrintData(), Orient::integer().
setOrientation(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
@@ -193,7 +193,7 @@ setOrientation(#wx_ref{type=ThisT,ref=ThisRef},Orient)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetpaperid">external documentation</a>.
%%<br /> SizeId = ?wxPAPER_NONE | ?wxPAPER_LETTER | ?wxPAPER_LEGAL | ?wxPAPER_A4 | ?wxPAPER_CSHEET | ?wxPAPER_DSHEET | ?wxPAPER_ESHEET | ?wxPAPER_LETTERSMALL | ?wxPAPER_TABLOID | ?wxPAPER_LEDGER | ?wxPAPER_STATEMENT | ?wxPAPER_EXECUTIVE | ?wxPAPER_A3 | ?wxPAPER_A4SMALL | ?wxPAPER_A5 | ?wxPAPER_B4 | ?wxPAPER_B5 | ?wxPAPER_FOLIO | ?wxPAPER_QUARTO | ?wxPAPER_10X14 | ?wxPAPER_11X17 | ?wxPAPER_NOTE | ?wxPAPER_ENV_9 | ?wxPAPER_ENV_10 | ?wxPAPER_ENV_11 | ?wxPAPER_ENV_12 | ?wxPAPER_ENV_14 | ?wxPAPER_ENV_DL | ?wxPAPER_ENV_C5 | ?wxPAPER_ENV_C3 | ?wxPAPER_ENV_C4 | ?wxPAPER_ENV_C6 | ?wxPAPER_ENV_C65 | ?wxPAPER_ENV_B4 | ?wxPAPER_ENV_B5 | ?wxPAPER_ENV_B6 | ?wxPAPER_ENV_ITALY | ?wxPAPER_ENV_MONARCH | ?wxPAPER_ENV_PERSONAL | ?wxPAPER_FANFOLD_US | ?wxPAPER_FANFOLD_STD_GERMAN | ?wxPAPER_FANFOLD_LGL_GERMAN | ?wxPAPER_ISO_B4 | ?wxPAPER_JAPANESE_POSTCARD | ?wxPAPER_9X11 | ?wxPAPER_10X11 | ?wxPAPER_15X11 | ?wxPAPER_ENV_INVITE | ?wxPAPER_LETTER_EXTRA | ?wxPAPER_LEGAL_EXTRA | ?wxPAPER_TABLOID_EXTRA | ?wxPAPER_A4_EXTRA | ?wxPAPER_LETTER_TRANSVERSE | ?wxPAPER_A4_TRANSVERSE | ?wxPAPER_LETTER_EXTRA_TRANSVERSE | ?wxPAPER_A_PLUS | ?wxPAPER_B_PLUS | ?wxPAPER_LETTER_PLUS | ?wxPAPER_A4_PLUS | ?wxPAPER_A5_TRANSVERSE | ?wxPAPER_B5_TRANSVERSE | ?wxPAPER_A3_EXTRA | ?wxPAPER_A5_EXTRA | ?wxPAPER_B5_EXTRA | ?wxPAPER_A2 | ?wxPAPER_A3_TRANSVERSE | ?wxPAPER_A3_EXTRA_TRANSVERSE | ?wxPAPER_DBL_JAPANESE_POSTCARD | ?wxPAPER_A6 | ?wxPAPER_JENV_KAKU2 | ?wxPAPER_JENV_KAKU3 | ?wxPAPER_JENV_CHOU3 | ?wxPAPER_JENV_CHOU4 | ?wxPAPER_LETTER_ROTATED | ?wxPAPER_A3_ROTATED | ?wxPAPER_A4_ROTATED | ?wxPAPER_A5_ROTATED | ?wxPAPER_B4_JIS_ROTATED | ?wxPAPER_B5_JIS_ROTATED | ?wxPAPER_JAPANESE_POSTCARD_ROTATED | ?wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED | ?wxPAPER_A6_ROTATED | ?wxPAPER_JENV_KAKU2_ROTATED | ?wxPAPER_JENV_KAKU3_ROTATED | ?wxPAPER_JENV_CHOU3_ROTATED | ?wxPAPER_JENV_CHOU4_ROTATED | ?wxPAPER_B6_JIS | ?wxPAPER_B6_JIS_ROTATED | ?wxPAPER_12X11 | ?wxPAPER_JENV_YOU4 | ?wxPAPER_JENV_YOU4_ROTATED | ?wxPAPER_P16K | ?wxPAPER_P32K | ?wxPAPER_P32KBIG | ?wxPAPER_PENV_1 | ?wxPAPER_PENV_2 | ?wxPAPER_PENV_3 | ?wxPAPER_PENV_4 | ?wxPAPER_PENV_5 | ?wxPAPER_PENV_6 | ?wxPAPER_PENV_7 | ?wxPAPER_PENV_8 | ?wxPAPER_PENV_9 | ?wxPAPER_PENV_10 | ?wxPAPER_P16K_ROTATED | ?wxPAPER_P32K_ROTATED | ?wxPAPER_P32KBIG_ROTATED | ?wxPAPER_PENV_1_ROTATED | ?wxPAPER_PENV_2_ROTATED | ?wxPAPER_PENV_3_ROTATED | ?wxPAPER_PENV_4_ROTATED | ?wxPAPER_PENV_5_ROTATED | ?wxPAPER_PENV_6_ROTATED | ?wxPAPER_PENV_7_ROTATED | ?wxPAPER_PENV_8_ROTATED | ?wxPAPER_PENV_9_ROTATED | ?wxPAPER_PENV_10_ROTATED
--spec setPaperId(This, SizeId) -> ok when
+-spec setPaperId(This, SizeId) -> 'ok' when
This::wxPrintData(), SizeId::wx:wx_enum().
setPaperId(#wx_ref{type=ThisT,ref=ThisRef},SizeId)
when is_integer(SizeId) ->
@@ -202,7 +202,7 @@ setPaperId(#wx_ref{type=ThisT,ref=ThisRef},SizeId)
<<ThisRef:32/?UI,SizeId:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetprintername">external documentation</a>.
--spec setPrinterName(This, Name) -> ok when
+-spec setPrinterName(This, Name) -> 'ok' when
This::wxPrintData(), Name::unicode:chardata().
setPrinterName(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
@@ -212,7 +212,7 @@ setPrinterName(#wx_ref{type=ThisT,ref=ThisRef},Name)
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdata.html#wxprintdatasetquality">external documentation</a>.
--spec setQuality(This, Quality) -> ok when
+-spec setQuality(This, Quality) -> 'ok' when
This::wxPrintData(), Quality::integer().
setQuality(#wx_ref{type=ThisT,ref=ThisRef},Quality)
when is_integer(Quality) ->
@@ -221,7 +221,7 @@ setQuality(#wx_ref{type=ThisT,ref=ThisRef},Quality)
<<ThisRef:32/?UI,Quality:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPrintData()) -> ok.
+-spec destroy(This::wxPrintData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintDialog.erl b/lib/wx/src/gen/wxPrintDialog.erl
index a337089d5a..d4188e79c4 100644
--- a/lib/wx/src/gen/wxPrintDialog.erl
+++ b/lib/wx/src/gen/wxPrintDialog.erl
@@ -103,7 +103,7 @@ new(Parent)
%%
-spec new(Parent, [Option]) -> wxPrintDialog() when
Parent::wxWindow:wxWindow(),
- Option :: {data, wxPrintDialogData:wxPrintDialogData()};
+ Option :: {'data', wxPrintDialogData:wxPrintDialogData()};
(Parent, Data) -> wxPrintDialog() when
Parent::wxWindow:wxWindow(), Data::wxPrintData:wxPrintData().
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
@@ -137,7 +137,7 @@ getPrintDC(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPrintDialog()) -> ok.
+-spec destroy(This::wxPrintDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintDialogData.erl b/lib/wx/src/gen/wxPrintDialogData.erl
index b93af1151b..5d39008a64 100644
--- a/lib/wx/src/gen/wxPrintDialogData.erl
+++ b/lib/wx/src/gen/wxPrintDialogData.erl
@@ -59,7 +59,7 @@ new(#wx_ref{type=DialogDataT,ref=DialogDataRef}) ->
<<DialogDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdataenablehelp">external documentation</a>.
--spec enableHelp(This, Flag) -> ok when
+-spec enableHelp(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
enableHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -68,7 +68,7 @@ enableHelp(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdataenablepagenumbers">external documentation</a>.
--spec enablePageNumbers(This, Flag) -> ok when
+-spec enablePageNumbers(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
enablePageNumbers(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -77,7 +77,7 @@ enablePageNumbers(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdataenableprinttofile">external documentation</a>.
--spec enablePrintToFile(This, Flag) -> ok when
+-spec enablePrintToFile(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
enablePrintToFile(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -86,7 +86,7 @@ enablePrintToFile(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdataenableselection">external documentation</a>.
--spec enableSelection(This, Flag) -> ok when
+-spec enableSelection(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
enableSelection(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -183,7 +183,7 @@ isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetcollate">external documentation</a>.
--spec setCollate(This, Flag) -> ok when
+-spec setCollate(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
setCollate(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -192,7 +192,7 @@ setCollate(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetfrompage">external documentation</a>.
--spec setFromPage(This, V) -> ok when
+-spec setFromPage(This, V) -> 'ok' when
This::wxPrintDialogData(), V::integer().
setFromPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
@@ -201,7 +201,7 @@ setFromPage(#wx_ref{type=ThisT,ref=ThisRef},V)
<<ThisRef:32/?UI,V:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetmaxpage">external documentation</a>.
--spec setMaxPage(This, V) -> ok when
+-spec setMaxPage(This, V) -> 'ok' when
This::wxPrintDialogData(), V::integer().
setMaxPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
@@ -210,7 +210,7 @@ setMaxPage(#wx_ref{type=ThisT,ref=ThisRef},V)
<<ThisRef:32/?UI,V:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetminpage">external documentation</a>.
--spec setMinPage(This, V) -> ok when
+-spec setMinPage(This, V) -> 'ok' when
This::wxPrintDialogData(), V::integer().
setMinPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
@@ -219,7 +219,7 @@ setMinPage(#wx_ref{type=ThisT,ref=ThisRef},V)
<<ThisRef:32/?UI,V:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetnocopies">external documentation</a>.
--spec setNoCopies(This, V) -> ok when
+-spec setNoCopies(This, V) -> 'ok' when
This::wxPrintDialogData(), V::integer().
setNoCopies(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
@@ -228,7 +228,7 @@ setNoCopies(#wx_ref{type=ThisT,ref=ThisRef},V)
<<ThisRef:32/?UI,V:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetprintdata">external documentation</a>.
--spec setPrintData(This, PrintData) -> ok when
+-spec setPrintData(This, PrintData) -> 'ok' when
This::wxPrintDialogData(), PrintData::wxPrintData:wxPrintData().
setPrintData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintDataT,ref=PrintDataRef}) ->
?CLASS(ThisT,wxPrintDialogData),
@@ -237,7 +237,7 @@ setPrintData(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintDataT,ref=PrintDa
<<ThisRef:32/?UI,PrintDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetprinttofile">external documentation</a>.
--spec setPrintToFile(This, Flag) -> ok when
+-spec setPrintToFile(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
setPrintToFile(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -246,7 +246,7 @@ setPrintToFile(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasetselection">external documentation</a>.
--spec setSelection(This, Flag) -> ok when
+-spec setSelection(This, Flag) -> 'ok' when
This::wxPrintDialogData(), Flag::boolean().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_boolean(Flag) ->
@@ -255,7 +255,7 @@ setSelection(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintdialogdata.html#wxprintdialogdatasettopage">external documentation</a>.
--spec setToPage(This, V) -> ok when
+-spec setToPage(This, V) -> 'ok' when
This::wxPrintDialogData(), V::integer().
setToPage(#wx_ref{type=ThisT,ref=ThisRef},V)
when is_integer(V) ->
@@ -264,7 +264,7 @@ setToPage(#wx_ref{type=ThisT,ref=ThisRef},V)
<<ThisRef:32/?UI,V:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPrintDialogData()) -> ok.
+-spec destroy(This::wxPrintDialogData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintDialogData),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintPreview.erl b/lib/wx/src/gen/wxPrintPreview.erl
index 162d259530..a0034a5e5c 100644
--- a/lib/wx/src/gen/wxPrintPreview.erl
+++ b/lib/wx/src/gen/wxPrintPreview.erl
@@ -49,8 +49,8 @@ new(Printout)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintpreview.html#wxprintpreviewwxprintpreview">external documentation</a>.
-spec new(Printout, [Option]) -> wxPrintPreview() when
Printout::wxPrintout:wxPrintout(),
- Option :: {printoutForPrinting, wxPrintout:wxPrintout()}
- | {data, wxPrintDialogData:wxPrintDialogData()}.
+ Option :: {'printoutForPrinting', wxPrintout:wxPrintout()}
+ | {'data', wxPrintDialogData:wxPrintDialogData()}.
new(#wx_ref{type=PrintoutT,ref=PrintoutRef}, Options)
when is_list(Options) ->
?CLASS(PrintoutT,wxPrintout),
@@ -164,7 +164,7 @@ renderPage(#wx_ref{type=ThisT,ref=ThisRef},PageNum)
<<ThisRef:32/?UI,PageNum:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintpreview.html#wxprintpreviewsetcanvas">external documentation</a>.
--spec setCanvas(This, Canvas) -> ok when
+-spec setCanvas(This, Canvas) -> 'ok' when
This::wxPrintPreview(), Canvas::wxPreviewCanvas:wxPreviewCanvas().
setCanvas(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CanvasT,ref=CanvasRef}) ->
?CLASS(ThisT,wxPrintPreview),
@@ -182,7 +182,7 @@ setCurrentPage(#wx_ref{type=ThisT,ref=ThisRef},PageNum)
<<ThisRef:32/?UI,PageNum:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintpreview.html#wxprintpreviewsetframe">external documentation</a>.
--spec setFrame(This, Frame) -> ok when
+-spec setFrame(This, Frame) -> 'ok' when
This::wxPrintPreview(), Frame::wxFrame:wxFrame().
setFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}) ->
?CLASS(ThisT,wxPrintPreview),
@@ -191,7 +191,7 @@ setFrame(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FrameT,ref=FrameRef}) ->
<<ThisRef:32/?UI,FrameRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintpreview.html#wxprintpreviewsetprintout">external documentation</a>.
--spec setPrintout(This, Printout) -> ok when
+-spec setPrintout(This, Printout) -> 'ok' when
This::wxPrintPreview(), Printout::wxPrintout:wxPrintout().
setPrintout(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintoutT,ref=PrintoutRef}) ->
?CLASS(ThisT,wxPrintPreview),
@@ -200,7 +200,7 @@ setPrintout(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PrintoutT,ref=PrintoutR
<<ThisRef:32/?UI,PrintoutRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintpreview.html#wxprintpreviewsetzoom">external documentation</a>.
--spec setZoom(This, Percent) -> ok when
+-spec setZoom(This, Percent) -> 'ok' when
This::wxPrintPreview(), Percent::integer().
setZoom(#wx_ref{type=ThisT,ref=ThisRef},Percent)
when is_integer(Percent) ->
@@ -209,7 +209,7 @@ setZoom(#wx_ref{type=ThisT,ref=ThisRef},Percent)
<<ThisRef:32/?UI,Percent:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPrintPreview()) -> ok.
+-spec destroy(This::wxPrintPreview()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintPreview),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrinter.erl b/lib/wx/src/gen/wxPrinter.erl
index 5f3122d32c..b9fb1c07bd 100644
--- a/lib/wx/src/gen/wxPrinter.erl
+++ b/lib/wx/src/gen/wxPrinter.erl
@@ -44,7 +44,7 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprinter.html#wxprinterwxprinter">external documentation</a>.
-spec new([Option]) -> wxPrinter() when
- Option :: {data, wxPrintDialogData:wxPrintDialogData()}.
+ Option :: {'data', wxPrintDialogData:wxPrintDialogData()}.
new(Options)
when is_list(Options) ->
MOpts = fun({data, #wx_ref{type=DataT,ref=DataRef}}, Acc) -> ?CLASS(DataT,wxPrintDialogData),[<<1:32/?UI,DataRef:32/?UI>>|Acc];
@@ -97,7 +97,7 @@ print(This,Parent,Printout)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprinter.html#wxprinterprint">external documentation</a>.
-spec print(This, Parent, Printout, [Option]) -> boolean() when
This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout(),
- Option :: {prompt, boolean()}.
+ Option :: {'prompt', boolean()}.
print(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=PrintoutT,ref=PrintoutRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxPrinter),
@@ -119,7 +119,7 @@ printDialog(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef})
<<ThisRef:32/?UI,ParentRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprinter.html#wxprinterreporterror">external documentation</a>.
--spec reportError(This, Parent, Printout, Message) -> ok when
+-spec reportError(This, Parent, Printout, Message) -> 'ok' when
This::wxPrinter(), Parent::wxWindow:wxWindow(), Printout::wxPrintout:wxPrintout(), Message::unicode:chardata().
reportError(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=PrintoutT,ref=PrintoutRef},Message)
when is_list(Message) ->
@@ -140,7 +140,7 @@ setup(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}) ->
<<ThisRef:32/?UI,ParentRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPrinter()) -> ok.
+-spec destroy(This::wxPrinter()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrinter),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxPrintout.erl b/lib/wx/src/gen/wxPrintout.erl
index 7f2b59bbe7..7b28d0947d 100644
--- a/lib/wx/src/gen/wxPrintout.erl
+++ b/lib/wx/src/gen/wxPrintout.erl
@@ -187,7 +187,7 @@ isPreview(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutfitthissizetopaper">external documentation</a>.
--spec fitThisSizeToPaper(This, ImageSize) -> ok when
+-spec fitThisSizeToPaper(This, ImageSize) -> 'ok' when
This::wxPrintout(), ImageSize::{W::integer(), H::integer()}.
fitThisSizeToPaper(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH})
when is_integer(ImageSizeW),is_integer(ImageSizeH) ->
@@ -196,7 +196,7 @@ fitThisSizeToPaper(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH})
<<ThisRef:32/?UI,ImageSizeW:32/?UI,ImageSizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutfitthissizetopage">external documentation</a>.
--spec fitThisSizeToPage(This, ImageSize) -> ok when
+-spec fitThisSizeToPage(This, ImageSize) -> 'ok' when
This::wxPrintout(), ImageSize::{W::integer(), H::integer()}.
fitThisSizeToPage(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH})
when is_integer(ImageSizeW),is_integer(ImageSizeH) ->
@@ -205,7 +205,7 @@ fitThisSizeToPage(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH})
<<ThisRef:32/?UI,ImageSizeW:32/?UI,ImageSizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutfitthissizetopagemargins">external documentation</a>.
--spec fitThisSizeToPageMargins(This, ImageSize, PageSetupData) -> ok when
+-spec fitThisSizeToPageMargins(This, ImageSize, PageSetupData) -> 'ok' when
This::wxPrintout(), ImageSize::{W::integer(), H::integer()}, PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData().
fitThisSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH},#wx_ref{type=PageSetupDataT,ref=PageSetupDataRef})
when is_integer(ImageSizeW),is_integer(ImageSizeH) ->
@@ -215,7 +215,7 @@ fitThisSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},{ImageSizeW,ImageSizeH}
<<ThisRef:32/?UI,ImageSizeW:32/?UI,ImageSizeH:32/?UI,PageSetupDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutmapscreensizetopaper">external documentation</a>.
--spec mapScreenSizeToPaper(This) -> ok when
+-spec mapScreenSizeToPaper(This) -> 'ok' when
This::wxPrintout().
mapScreenSizeToPaper(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
@@ -223,7 +223,7 @@ mapScreenSizeToPaper(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutmapscreensizetopage">external documentation</a>.
--spec mapScreenSizeToPage(This) -> ok when
+-spec mapScreenSizeToPage(This) -> 'ok' when
This::wxPrintout().
mapScreenSizeToPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
@@ -231,7 +231,7 @@ mapScreenSizeToPage(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutmapscreensizetopagemargins">external documentation</a>.
--spec mapScreenSizeToPageMargins(This, PageSetupData) -> ok when
+-spec mapScreenSizeToPageMargins(This, PageSetupData) -> 'ok' when
This::wxPrintout(), PageSetupData::wxPageSetupDialogData:wxPageSetupDialogData().
mapScreenSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageSetupDataT,ref=PageSetupDataRef}) ->
?CLASS(ThisT,wxPrintout),
@@ -240,7 +240,7 @@ mapScreenSizeToPageMargins(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageSetu
<<ThisRef:32/?UI,PageSetupDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutmapscreensizetodevice">external documentation</a>.
--spec mapScreenSizeToDevice(This) -> ok when
+-spec mapScreenSizeToDevice(This) -> 'ok' when
This::wxPrintout().
mapScreenSizeToDevice(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxPrintout),
@@ -273,7 +273,7 @@ getLogicalPageMarginsRect(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageSetup
<<ThisRef:32/?UI,PageSetupDataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutsetlogicalorigin">external documentation</a>.
--spec setLogicalOrigin(This, X, Y) -> ok when
+-spec setLogicalOrigin(This, X, Y) -> 'ok' when
This::wxPrintout(), X::integer(), Y::integer().
setLogicalOrigin(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -282,7 +282,7 @@ setLogicalOrigin(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprintout.html#wxprintoutoffsetlogicalorigin">external documentation</a>.
--spec offsetLogicalOrigin(This, Xoff, Yoff) -> ok when
+-spec offsetLogicalOrigin(This, Xoff, Yoff) -> 'ok' when
This::wxPrintout(), Xoff::integer(), Yoff::integer().
offsetLogicalOrigin(#wx_ref{type=ThisT,ref=ThisRef},Xoff,Yoff)
when is_integer(Xoff),is_integer(Yoff) ->
@@ -291,7 +291,7 @@ offsetLogicalOrigin(#wx_ref{type=ThisT,ref=ThisRef},Xoff,Yoff)
<<ThisRef:32/?UI,Xoff:32/?UI,Yoff:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxPrintout()) -> ok.
+-spec destroy(This::wxPrintout()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxPrintout),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxProgressDialog.erl b/lib/wx/src/gen/wxProgressDialog.erl
index 665b900729..8e275f9dc8 100644
--- a/lib/wx/src/gen/wxProgressDialog.erl
+++ b/lib/wx/src/gen/wxProgressDialog.erl
@@ -99,9 +99,9 @@ new(Title,Message)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprogressdialog.html#wxprogressdialogwxprogressdialog">external documentation</a>.
-spec new(Title, Message, [Option]) -> wxProgressDialog() when
Title::unicode:chardata(), Message::unicode:chardata(),
- Option :: {maximum, integer()}
- | {parent, wxWindow:wxWindow()}
- | {style, integer()}.
+ Option :: {'maximum', integer()}
+ | {'parent', wxWindow:wxWindow()}
+ | {'style', integer()}.
new(Title,Message, Options)
when is_list(Title),is_list(Message),is_list(Options) ->
Title_UC = unicode:characters_to_binary([Title,0]),
@@ -115,7 +115,7 @@ new(Title,Message, Options)
<<(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Message_UC)):32/?UI,(Message_UC)/binary, 0:(((8- ((4+byte_size(Message_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprogressdialog.html#wxprogressdialogresume">external documentation</a>.
--spec resume(This) -> ok when
+-spec resume(This) -> 'ok' when
This::wxProgressDialog().
resume(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxProgressDialog),
@@ -123,7 +123,7 @@ resume(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprogressdialog.html#wxprogressdialogupdate">external documentation</a>.
--spec update(This) -> ok when
+-spec update(This) -> 'ok' when
This::wxProgressDialog().
update(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxProgressDialog),
@@ -141,7 +141,7 @@ update(This,Value)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxprogressdialog.html#wxprogressdialogupdate">external documentation</a>.
-spec update(This, Value, [Option]) -> boolean() when
This::wxProgressDialog(), Value::integer(),
- Option :: {newmsg, unicode:chardata()}.
+ Option :: {'newmsg', unicode:chardata()}.
update(#wx_ref{type=ThisT,ref=ThisRef},Value, Options)
when is_integer(Value),is_list(Options) ->
?CLASS(ThisT,wxProgressDialog),
@@ -152,7 +152,7 @@ update(#wx_ref{type=ThisT,ref=ThisRef},Value, Options)
<<ThisRef:32/?UI,Value:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxProgressDialog()) -> ok.
+-spec destroy(This::wxProgressDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxProgressDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxQueryNewPaletteEvent.erl b/lib/wx/src/gen/wxQueryNewPaletteEvent.erl
index 2473fe5f61..d32f893212 100644
--- a/lib/wx/src/gen/wxQueryNewPaletteEvent.erl
+++ b/lib/wx/src/gen/wxQueryNewPaletteEvent.erl
@@ -45,7 +45,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxQueryNewPaletteEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxquerynewpaletteevent.html#wxquerynewpaletteeventsetpaletterealized">external documentation</a>.
--spec setPaletteRealized(This, Realized) -> ok when
+-spec setPaletteRealized(This, Realized) -> 'ok' when
This::wxQueryNewPaletteEvent(), Realized::boolean().
setPaletteRealized(#wx_ref{type=ThisT,ref=ThisRef},Realized)
when is_boolean(Realized) ->
diff --git a/lib/wx/src/gen/wxRadioBox.erl b/lib/wx/src/gen/wxRadioBox.erl
index 5ef1deff66..348d75db2a 100644
--- a/lib/wx/src/gen/wxRadioBox.erl
+++ b/lib/wx/src/gen/wxRadioBox.erl
@@ -92,9 +92,9 @@ new(Parent,Id,Title,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxwxradiobox">external documentation</a>.
-spec new(Parent, Id, Title, Pos, Size, Choices, [Option]) -> wxRadioBox() when
Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[unicode:chardata()],
- Option :: {majorDim, integer()}
- | {style, integer()}
- | {val, wx:wx_object()}.
+ Option :: {'majorDim', integer()}
+ | {'style', integer()}
+ | {'val', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Title,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_list(Title),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -120,9 +120,9 @@ create(This,Parent,Id,Title,Pos={PosX,PosY},Size={SizeW,SizeH},Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxcreate">external documentation</a>.
-spec create(This, Parent, Id, Title, Pos, Size, Choices, [Option]) -> boolean() when
This::wxRadioBox(), Parent::wxWindow:wxWindow(), Id::integer(), Title::unicode:chardata(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[unicode:chardata()],
- Option :: {majorDim, integer()}
- | {style, integer()}
- | {val, wx:wx_object()}.
+ Option :: {'majorDim', integer()}
+ | {'style', integer()}
+ | {'val', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Title,{PosX,PosY},{SizeW,SizeH},Choices, Options)
when is_integer(Id),is_list(Title),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) ->
?CLASS(ThisT,wxRadioBox),
@@ -150,13 +150,13 @@ enable(This)
%% <br /> Also:<br />
%% enable(This, [Option]) -> boolean() when<br />
%% This::wxRadioBox(),<br />
-%% Option :: {enable, boolean()}.<br />
+%% Option :: {'enable', boolean()}.<br />
%%
-spec enable(This, N) -> boolean() when
This::wxRadioBox(), N::integer();
(This, [Option]) -> boolean() when
This::wxRadioBox(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enable(This,N)
when is_record(This, wx_ref),is_integer(N) ->
@@ -173,7 +173,7 @@ enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxenable">external documentation</a>.
-spec enable(This, N, [Option]) -> boolean() when
This::wxRadioBox(), N::integer(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
when is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxRadioBox),
@@ -201,7 +201,7 @@ getString(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxsetselection">external documentation</a>.
--spec setSelection(This, N) -> ok when
+-spec setSelection(This, N) -> 'ok' when
This::wxRadioBox(), N::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
when is_integer(N) ->
@@ -221,13 +221,13 @@ show(This)
%% <br /> Also:<br />
%% show(This, [Option]) -> boolean() when<br />
%% This::wxRadioBox(),<br />
-%% Option :: {show, boolean()}.<br />
+%% Option :: {'show', boolean()}.<br />
%%
-spec show(This, N) -> boolean() when
This::wxRadioBox(), N::integer();
(This, [Option]) -> boolean() when
This::wxRadioBox(),
- Option :: {show, boolean()}.
+ Option :: {'show', boolean()}.
show(This,N)
when is_record(This, wx_ref),is_integer(N) ->
@@ -244,7 +244,7 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxshow">external documentation</a>.
-spec show(This, N, [Option]) -> boolean() when
This::wxRadioBox(), N::integer(),
- Option :: {show, boolean()}.
+ Option :: {'show', boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef},N, Options)
when is_integer(N),is_list(Options) ->
?CLASS(ThisT,wxRadioBox),
@@ -316,7 +316,7 @@ isItemShown(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxsetitemhelptext">external documentation</a>.
--spec setItemHelpText(This, N, HelpText) -> ok when
+-spec setItemHelpText(This, N, HelpText) -> 'ok' when
This::wxRadioBox(), N::integer(), HelpText::unicode:chardata().
setItemHelpText(#wx_ref{type=ThisT,ref=ThisRef},N,HelpText)
when is_integer(N),is_list(HelpText) ->
@@ -326,7 +326,7 @@ setItemHelpText(#wx_ref{type=ThisT,ref=ThisRef},N,HelpText)
<<ThisRef:32/?UI,N:32/?UI,(byte_size(HelpText_UC)):32/?UI,(HelpText_UC)/binary, 0:(((8- ((4+byte_size(HelpText_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobox.html#wxradioboxsetitemtooltip">external documentation</a>.
--spec setItemToolTip(This, Item, Text) -> ok when
+-spec setItemToolTip(This, Item, Text) -> 'ok' when
This::wxRadioBox(), Item::integer(), Text::unicode:chardata().
setItemToolTip(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
when is_integer(Item),is_list(Text) ->
@@ -336,7 +336,7 @@ setItemToolTip(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
<<ThisRef:32/?UI,Item: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>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxRadioBox()) -> ok.
+-spec destroy(This::wxRadioBox()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxRadioBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxRadioButton.erl b/lib/wx/src/gen/wxRadioButton.erl
index 3b4689a27b..4487724be6 100644
--- a/lib/wx/src/gen/wxRadioButton.erl
+++ b/lib/wx/src/gen/wxRadioButton.erl
@@ -96,10 +96,10 @@ new(Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobutton.html#wxradiobuttonwxradiobutton">external documentation</a>.
-spec new(Parent, Id, Label, [Option]) -> wxRadioButton() when
Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,10 +124,10 @@ create(This,Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobutton.html#wxradiobuttoncreate">external documentation</a>.
-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
This::wxRadioButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxRadioButton),
@@ -151,7 +151,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxradiobutton.html#wxradiobuttonsetvalue">external documentation</a>.
--spec setValue(This, Val) -> ok when
+-spec setValue(This, Val) -> 'ok' when
This::wxRadioButton(), Val::boolean().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
when is_boolean(Val) ->
@@ -160,7 +160,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(wxe_util:from_bool(Val)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxRadioButton()) -> ok.
+-spec destroy(This::wxRadioButton()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxRadioButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxRegion.erl b/lib/wx/src/gen/wxRegion.erl
index 7a21baee92..2e8c1af10e 100644
--- a/lib/wx/src/gen/wxRegion.erl
+++ b/lib/wx/src/gen/wxRegion.erl
@@ -79,7 +79,7 @@ new(X,Y,W,H)
<<X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxregion.html#wxregionclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxRegion().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxRegion),
@@ -263,7 +263,7 @@ union(This,Bmp,Transp)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxregion.html#wxregionunion">external documentation</a>.
-spec union(This, Bmp, Transp, [Option]) -> boolean() when
This::wxRegion(), Bmp::wxBitmap:wxBitmap(), Transp::wx:wx_colour(),
- Option :: {tolerance, integer()}.
+ Option :: {'tolerance', integer()}.
union(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},Transp, Options)
when tuple_size(Transp) =:= 3; tuple_size(Transp) =:= 4,is_list(Options) ->
?CLASS(ThisT,wxRegion),
@@ -313,7 +313,7 @@ union(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,W:32/?UI,H:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxRegion()) -> ok.
+-spec destroy(This::wxRegion()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxRegion),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSashLayoutWindow.erl b/lib/wx/src/gen/wxSashLayoutWindow.erl
index 223c07419d..ae081ae800 100644
--- a/lib/wx/src/gen/wxSashLayoutWindow.erl
+++ b/lib/wx/src/gen/wxSashLayoutWindow.erl
@@ -100,10 +100,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashlayoutwindow.html#wxsashlayoutwindowwxsashlayoutwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxSashLayoutWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -127,10 +127,10 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashlayoutwindow.html#wxsashlayoutwindowcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxSashLayoutWindow(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSashLayoutWindow),
@@ -164,7 +164,7 @@ getOrientation(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashlayoutwindow.html#wxsashlayoutwindowsetalignment">external documentation</a>.
%%<br /> Align = ?wxLAYOUT_NONE | ?wxLAYOUT_TOP | ?wxLAYOUT_LEFT | ?wxLAYOUT_RIGHT | ?wxLAYOUT_BOTTOM
--spec setAlignment(This, Align) -> ok when
+-spec setAlignment(This, Align) -> 'ok' when
This::wxSashLayoutWindow(), Align::wx:wx_enum().
setAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align)
when is_integer(Align) ->
@@ -173,7 +173,7 @@ setAlignment(#wx_ref{type=ThisT,ref=ThisRef},Align)
<<ThisRef:32/?UI,Align:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashlayoutwindow.html#wxsashlayoutwindowsetdefaultsize">external documentation</a>.
--spec setDefaultSize(This, Size) -> ok when
+-spec setDefaultSize(This, Size) -> 'ok' when
This::wxSashLayoutWindow(), Size::{W::integer(), H::integer()}.
setDefaultSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -183,7 +183,7 @@ setDefaultSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashlayoutwindow.html#wxsashlayoutwindowsetorientation">external documentation</a>.
%%<br /> Orient = ?wxLAYOUT_HORIZONTAL | ?wxLAYOUT_VERTICAL
--spec setOrientation(This, Orient) -> ok when
+-spec setOrientation(This, Orient) -> 'ok' when
This::wxSashLayoutWindow(), Orient::wx:wx_enum().
setOrientation(#wx_ref{type=ThisT,ref=ThisRef},Orient)
when is_integer(Orient) ->
@@ -192,7 +192,7 @@ setOrientation(#wx_ref{type=ThisT,ref=ThisRef},Orient)
<<ThisRef:32/?UI,Orient:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSashLayoutWindow()) -> ok.
+-spec destroy(This::wxSashLayoutWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSashLayoutWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSashWindow.erl b/lib/wx/src/gen/wxSashWindow.erl
index 4a39726ffd..773e0f1ab0 100644
--- a/lib/wx/src/gen/wxSashWindow.erl
+++ b/lib/wx/src/gen/wxSashWindow.erl
@@ -96,10 +96,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashwindow.html#wxsashwindowwxsashwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxSashWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -155,7 +155,7 @@ getMinimumSizeY(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashwindow.html#wxsashwindowsetmaximumsizex">external documentation</a>.
--spec setMaximumSizeX(This, Max) -> ok when
+-spec setMaximumSizeX(This, Max) -> 'ok' when
This::wxSashWindow(), Max::integer().
setMaximumSizeX(#wx_ref{type=ThisT,ref=ThisRef},Max)
when is_integer(Max) ->
@@ -164,7 +164,7 @@ setMaximumSizeX(#wx_ref{type=ThisT,ref=ThisRef},Max)
<<ThisRef:32/?UI,Max:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashwindow.html#wxsashwindowsetmaximumsizey">external documentation</a>.
--spec setMaximumSizeY(This, Max) -> ok when
+-spec setMaximumSizeY(This, Max) -> 'ok' when
This::wxSashWindow(), Max::integer().
setMaximumSizeY(#wx_ref{type=ThisT,ref=ThisRef},Max)
when is_integer(Max) ->
@@ -173,7 +173,7 @@ setMaximumSizeY(#wx_ref{type=ThisT,ref=ThisRef},Max)
<<ThisRef:32/?UI,Max:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashwindow.html#wxsashwindowsetminimumsizex">external documentation</a>.
--spec setMinimumSizeX(This, Min) -> ok when
+-spec setMinimumSizeX(This, Min) -> 'ok' when
This::wxSashWindow(), Min::integer().
setMinimumSizeX(#wx_ref{type=ThisT,ref=ThisRef},Min)
when is_integer(Min) ->
@@ -182,7 +182,7 @@ setMinimumSizeX(#wx_ref{type=ThisT,ref=ThisRef},Min)
<<ThisRef:32/?UI,Min:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashwindow.html#wxsashwindowsetminimumsizey">external documentation</a>.
--spec setMinimumSizeY(This, Min) -> ok when
+-spec setMinimumSizeY(This, Min) -> 'ok' when
This::wxSashWindow(), Min::integer().
setMinimumSizeY(#wx_ref{type=ThisT,ref=ThisRef},Min)
when is_integer(Min) ->
@@ -192,7 +192,7 @@ setMinimumSizeY(#wx_ref{type=ThisT,ref=ThisRef},Min)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsashwindow.html#wxsashwindowsetsashvisible">external documentation</a>.
%%<br /> Edge = ?wxSASH_TOP | ?wxSASH_RIGHT | ?wxSASH_BOTTOM | ?wxSASH_LEFT | ?wxSASH_NONE
--spec setSashVisible(This, Edge, Sash) -> ok when
+-spec setSashVisible(This, Edge, Sash) -> 'ok' when
This::wxSashWindow(), Edge::wx:wx_enum(), Sash::boolean().
setSashVisible(#wx_ref{type=ThisT,ref=ThisRef},Edge,Sash)
when is_integer(Edge),is_boolean(Sash) ->
@@ -201,7 +201,7 @@ setSashVisible(#wx_ref{type=ThisT,ref=ThisRef},Edge,Sash)
<<ThisRef:32/?UI,Edge:32/?UI,(wxe_util:from_bool(Sash)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSashWindow()) -> ok.
+-spec destroy(This::wxSashWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSashWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxScreenDC.erl b/lib/wx/src/gen/wxScreenDC.erl
index 24028a000f..a36c25025c 100644
--- a/lib/wx/src/gen/wxScreenDC.erl
+++ b/lib/wx/src/gen/wxScreenDC.erl
@@ -68,7 +68,7 @@ new() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxScreenDC()) -> ok.
+-spec destroy(This::wxScreenDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxScreenDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxScrollBar.erl b/lib/wx/src/gen/wxScrollBar.erl
index ccddf84835..7f70d9d97b 100644
--- a/lib/wx/src/gen/wxScrollBar.erl
+++ b/lib/wx/src/gen/wxScrollBar.erl
@@ -97,10 +97,10 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrollbar.html#wxscrollbarwxscrollbar">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxScrollBar() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,10 +124,10 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrollbar.html#wxscrollbarcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxScrollBar(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxScrollBar),
@@ -174,7 +174,7 @@ getThumbSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrollbar.html#wxscrollbarsetthumbposition">external documentation</a>.
--spec setThumbPosition(This, ViewStart) -> ok when
+-spec setThumbPosition(This, ViewStart) -> 'ok' when
This::wxScrollBar(), ViewStart::integer().
setThumbPosition(#wx_ref{type=ThisT,ref=ThisRef},ViewStart)
when is_integer(ViewStart) ->
@@ -183,7 +183,7 @@ setThumbPosition(#wx_ref{type=ThisT,ref=ThisRef},ViewStart)
<<ThisRef:32/?UI,ViewStart:32/?UI>>).
%% @equiv setScrollbar(This,Position,ThumbSize,Range,PageSize, [])
--spec setScrollbar(This, Position, ThumbSize, Range, PageSize) -> ok when
+-spec setScrollbar(This, Position, ThumbSize, Range, PageSize) -> 'ok' when
This::wxScrollBar(), Position::integer(), ThumbSize::integer(), Range::integer(), PageSize::integer().
setScrollbar(This,Position,ThumbSize,Range,PageSize)
@@ -191,9 +191,9 @@ setScrollbar(This,Position,ThumbSize,Range,PageSize)
setScrollbar(This,Position,ThumbSize,Range,PageSize, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrollbar.html#wxscrollbarsetscrollbar">external documentation</a>.
--spec setScrollbar(This, Position, ThumbSize, Range, PageSize, [Option]) -> ok when
+-spec setScrollbar(This, Position, ThumbSize, Range, PageSize, [Option]) -> 'ok' when
This::wxScrollBar(), Position::integer(), ThumbSize::integer(), Range::integer(), PageSize::integer(),
- Option :: {refresh, boolean()}.
+ Option :: {'refresh', boolean()}.
setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Position,ThumbSize,Range,PageSize, Options)
when is_integer(Position),is_integer(ThumbSize),is_integer(Range),is_integer(PageSize),is_list(Options) ->
?CLASS(ThisT,wxScrollBar),
@@ -204,7 +204,7 @@ setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Position,ThumbSize,Range,PageSize,
<<ThisRef:32/?UI,Position:32/?UI,ThumbSize:32/?UI,Range:32/?UI,PageSize:32/?UI, 0:32,BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxScrollBar()) -> ok.
+-spec destroy(This::wxScrollBar()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxScrollBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxScrolledWindow.erl b/lib/wx/src/gen/wxScrolledWindow.erl
index 7c807980b4..70bc5adbd9 100644
--- a/lib/wx/src/gen/wxScrolledWindow.erl
+++ b/lib/wx/src/gen/wxScrolledWindow.erl
@@ -99,10 +99,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowwxscrolledwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxScrolledWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {winid, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'winid', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -152,7 +152,7 @@ calcUnscrolledPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowenablescrolling">external documentation</a>.
--spec enableScrolling(This, X_scrolling, Y_scrolling) -> ok when
+-spec enableScrolling(This, X_scrolling, Y_scrolling) -> 'ok' when
This::wxScrolledWindow(), X_scrolling::boolean(), Y_scrolling::boolean().
enableScrolling(#wx_ref{type=ThisT,ref=ThisRef},X_scrolling,Y_scrolling)
when is_boolean(X_scrolling),is_boolean(Y_scrolling) ->
@@ -177,7 +177,7 @@ getViewStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowdopreparedc">external documentation</a>.
--spec doPrepareDC(This, Dc) -> ok when
+-spec doPrepareDC(This, Dc) -> 'ok' when
This::wxScrolledWindow(), Dc::wxDC:wxDC().
doPrepareDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxScrolledWindow),
@@ -186,7 +186,7 @@ doPrepareDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
<<ThisRef:32/?UI,DcRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowpreparedc">external documentation</a>.
--spec prepareDC(This, Dc) -> ok when
+-spec prepareDC(This, Dc) -> 'ok' when
This::wxScrolledWindow(), Dc::wxDC:wxDC().
prepareDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
?CLASS(ThisT,wxScrolledWindow),
@@ -195,7 +195,7 @@ prepareDC(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DcT,ref=DcRef}) ->
<<ThisRef:32/?UI,DcRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowscroll">external documentation</a>.
--spec scroll(This, X, Y) -> ok when
+-spec scroll(This, X, Y) -> 'ok' when
This::wxScrolledWindow(), X::integer(), Y::integer().
scroll(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -204,7 +204,7 @@ scroll(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @equiv setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY, [])
--spec setScrollbars(This, PixelsPerUnitX, PixelsPerUnitY, NoUnitsX, NoUnitsY) -> ok when
+-spec setScrollbars(This, PixelsPerUnitX, PixelsPerUnitY, NoUnitsX, NoUnitsY) -> 'ok' when
This::wxScrolledWindow(), PixelsPerUnitX::integer(), PixelsPerUnitY::integer(), NoUnitsX::integer(), NoUnitsY::integer().
setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY)
@@ -212,11 +212,11 @@ setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY)
setScrollbars(This,PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowsetscrollbars">external documentation</a>.
--spec setScrollbars(This, PixelsPerUnitX, PixelsPerUnitY, NoUnitsX, NoUnitsY, [Option]) -> ok when
+-spec setScrollbars(This, PixelsPerUnitX, PixelsPerUnitY, NoUnitsX, NoUnitsY, [Option]) -> 'ok' when
This::wxScrolledWindow(), PixelsPerUnitX::integer(), PixelsPerUnitY::integer(), NoUnitsX::integer(), NoUnitsY::integer(),
- Option :: {xPos, integer()}
- | {yPos, integer()}
- | {noRefresh, boolean()}.
+ Option :: {'xPos', integer()}
+ | {'yPos', integer()}
+ | {'noRefresh', boolean()}.
setScrollbars(#wx_ref{type=ThisT,ref=ThisRef},PixelsPerUnitX,PixelsPerUnitY,NoUnitsX,NoUnitsY, Options)
when is_integer(PixelsPerUnitX),is_integer(PixelsPerUnitY),is_integer(NoUnitsX),is_integer(NoUnitsY),is_list(Options) ->
?CLASS(ThisT,wxScrolledWindow),
@@ -229,7 +229,7 @@ setScrollbars(#wx_ref{type=ThisT,ref=ThisRef},PixelsPerUnitX,PixelsPerUnitY,NoUn
<<ThisRef:32/?UI,PixelsPerUnitX:32/?UI,PixelsPerUnitY:32/?UI,NoUnitsX:32/?UI,NoUnitsY:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowsetscrollrate">external documentation</a>.
--spec setScrollRate(This, Xstep, Ystep) -> ok when
+-spec setScrollRate(This, Xstep, Ystep) -> 'ok' when
This::wxScrolledWindow(), Xstep::integer(), Ystep::integer().
setScrollRate(#wx_ref{type=ThisT,ref=ThisRef},Xstep,Ystep)
when is_integer(Xstep),is_integer(Ystep) ->
@@ -238,7 +238,7 @@ setScrollRate(#wx_ref{type=ThisT,ref=ThisRef},Xstep,Ystep)
<<ThisRef:32/?UI,Xstep:32/?UI,Ystep:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxscrolledwindow.html#wxscrolledwindowsettargetwindow">external documentation</a>.
--spec setTargetWindow(This, Target) -> ok when
+-spec setTargetWindow(This, Target) -> 'ok' when
This::wxScrolledWindow(), Target::wxWindow:wxWindow().
setTargetWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TargetT,ref=TargetRef}) ->
?CLASS(ThisT,wxScrolledWindow),
@@ -247,7 +247,7 @@ setTargetWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TargetT,ref=TargetR
<<ThisRef:32/?UI,TargetRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxScrolledWindow()) -> ok.
+-spec destroy(This::wxScrolledWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxScrolledWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSetCursorEvent.erl b/lib/wx/src/gen/wxSetCursorEvent.erl
index b7473d4d17..a97cbfb5ae 100644
--- a/lib/wx/src/gen/wxSetCursorEvent.erl
+++ b/lib/wx/src/gen/wxSetCursorEvent.erl
@@ -77,7 +77,7 @@ hasCursor(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsetcursorevent.html#wxsetcursoreventsetcursor">external documentation</a>.
--spec setCursor(This, Cursor) -> ok when
+-spec setCursor(This, Cursor) -> 'ok' when
This::wxSetCursorEvent(), Cursor::wxCursor:wxCursor().
setCursor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CursorT,ref=CursorRef}) ->
?CLASS(ThisT,wxSetCursorEvent),
diff --git a/lib/wx/src/gen/wxShowEvent.erl b/lib/wx/src/gen/wxShowEvent.erl
index 962a880f61..c4f37afe7b 100644
--- a/lib/wx/src/gen/wxShowEvent.erl
+++ b/lib/wx/src/gen/wxShowEvent.erl
@@ -45,7 +45,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxShowEvent() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxshowevent.html#wxshoweventsetshow">external documentation</a>.
--spec setShow(This, Show) -> ok when
+-spec setShow(This, Show) -> 'ok' when
This::wxShowEvent(), Show::boolean().
setShow(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
diff --git a/lib/wx/src/gen/wxSingleChoiceDialog.erl b/lib/wx/src/gen/wxSingleChoiceDialog.erl
index 641cb2836f..baff296d11 100644
--- a/lib/wx/src/gen/wxSingleChoiceDialog.erl
+++ b/lib/wx/src/gen/wxSingleChoiceDialog.erl
@@ -105,8 +105,8 @@ new(Parent,Message,Caption,Choices)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsinglechoicedialog.html#wxsinglechoicedialogwxsinglechoicedialog">external documentation</a>.
-spec new(Parent, Message, Caption, Choices, [Option]) -> wxSingleChoiceDialog() when
Parent::wxWindow:wxWindow(), Message::unicode:chardata(), Caption::unicode:chardata(), Choices::[unicode:chardata()],
- Option :: {style, integer()}
- | {pos, {X::integer(), Y::integer()}}.
+ Option :: {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options)
when is_list(Message),is_list(Caption),is_list(Choices),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -138,7 +138,7 @@ getStringSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsinglechoicedialog.html#wxsinglechoicedialogsetselection">external documentation</a>.
--spec setSelection(This, Sel) -> ok when
+-spec setSelection(This, Sel) -> 'ok' when
This::wxSingleChoiceDialog(), Sel::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},Sel)
when is_integer(Sel) ->
@@ -147,7 +147,7 @@ setSelection(#wx_ref{type=ThisT,ref=ThisRef},Sel)
<<ThisRef:32/?UI,Sel:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSingleChoiceDialog()) -> ok.
+-spec destroy(This::wxSingleChoiceDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSingleChoiceDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSizer.erl b/lib/wx/src/gen/wxSizer.erl
index 723625f85e..ab357c0846 100644
--- a/lib/wx/src/gen/wxSizer.erl
+++ b/lib/wx/src/gen/wxSizer.erl
@@ -54,10 +54,10 @@ add(This,Window)
%% <br /> Also:<br />
%% add(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
-%% Option :: {proportion, integer()}<br />
-%% | {flag, integer()}<br />
-%% | {border, integer()}<br />
-%% | {userData, wx:wx_object()};<br />
+%% Option :: {'proportion', integer()}<br />
+%% | {'flag', integer()}<br />
+%% | {'border', integer()}<br />
+%% | {'userData', wx:wx_object()};<br />
%% (This, Window, Flags) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().<br />
%%
@@ -65,10 +65,10 @@ add(This,Window)
This::wxSizer(), Width::integer(), Height::integer();
(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()};
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()};
(This, Window, Flags) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
@@ -108,10 +108,10 @@ add(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizeradd">external documentation</a>.
-spec add(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Width::integer(), Height::integer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()}.
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()}.
add(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -144,7 +144,7 @@ addStretchSpacer(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizeraddstretchspacer">external documentation</a>.
-spec addStretchSpacer(This, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(),
- Option :: {prop, integer()}.
+ Option :: {'prop', integer()}.
addStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -163,7 +163,7 @@ calcMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv clear(This, [])
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxSizer().
clear(This)
@@ -171,9 +171,9 @@ clear(This)
clear(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerclear">external documentation</a>.
--spec clear(This, [Option]) -> ok when
+-spec clear(This, [Option]) -> 'ok' when
This::wxSizer(),
- Option :: {delete_windows, boolean()}.
+ Option :: {'delete_windows', boolean()}.
clear(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -218,7 +218,7 @@ fit(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerfitinside">external documentation</a>.
--spec fitInside(This, Window) -> ok when
+-spec fitInside(This, Window) -> 'ok' when
This::wxSizer(), Window::wxWindow:wxWindow().
fitInside(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
@@ -256,7 +256,7 @@ getItem(#wx_ref{type=ThisT,ref=ThisRef},Index)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizergetitem">external documentation</a>.
-spec getItem(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
- Option :: {recursive, boolean()}.
+ Option :: {'recursive', boolean()}.
getItem(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -318,7 +318,7 @@ hide(#wx_ref{type=ThisT,ref=ThisRef},Index)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerhide">external documentation</a>.
-spec hide(This, Window, [Option]) -> boolean() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
- Option :: {recursive, boolean()}.
+ Option :: {'recursive', boolean()}.
hide(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -348,10 +348,10 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=ItemT,ref=ItemRef})
%% <br /> Also:<br />
%% insert(This, Index, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
-%% Option :: {proportion, integer()}<br />
-%% | {flag, integer()}<br />
-%% | {border, integer()}<br />
-%% | {userData, wx:wx_object()};<br />
+%% Option :: {'proportion', integer()}<br />
+%% | {'flag', integer()}<br />
+%% | {'border', integer()}<br />
+%% | {'userData', wx:wx_object()};<br />
%% (This, Index, Window, Flags) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().<br />
%%
@@ -359,10 +359,10 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=ItemT,ref=ItemRef})
This::wxSizer(), Index::integer(), Width::integer(), Height::integer();
(This, Index, Window, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()};
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()};
(This, Index, Window, Flags) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Index::integer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
@@ -403,10 +403,10 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=WindowT,ref=WindowRef}
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerinsert">external documentation</a>.
-spec insert(This, Index, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Index::integer(), Width::integer(), Height::integer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()}.
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()}.
insert(#wx_ref{type=ThisT,ref=ThisRef},Index,Width,Height, Options)
when is_integer(Index),is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -439,7 +439,7 @@ insertStretchSpacer(This,Index)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerinsertstretchspacer">external documentation</a>.
-spec insertStretchSpacer(This, Index, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Index::integer(),
- Option :: {prop, integer()}.
+ Option :: {'prop', integer()}.
insertStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
when is_integer(Index),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -475,7 +475,7 @@ isShown(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerlayout">external documentation</a>.
--spec layout(This) -> ok when
+-spec layout(This) -> 'ok' when
This::wxSizer().
layout(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
@@ -495,10 +495,10 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
%% <br /> Also:<br />
%% prepend(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
-%% Option :: {proportion, integer()}<br />
-%% | {flag, integer()}<br />
-%% | {border, integer()}<br />
-%% | {userData, wx:wx_object()};<br />
+%% Option :: {'proportion', integer()}<br />
+%% | {'flag', integer()}<br />
+%% | {'border', integer()}<br />
+%% | {'userData', wx:wx_object()};<br />
%% (This, Window, Flags) -> wxSizerItem:wxSizerItem() when<br />
%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().<br />
%%
@@ -506,10 +506,10 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) ->
This::wxSizer(), Width::integer(), Height::integer();
(This, Window, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()};
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()};
(This, Window, Flags) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
@@ -549,10 +549,10 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef},#wx_
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerprepend">external documentation</a>.
-spec prepend(This, Width, Height, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(), Width::integer(), Height::integer(),
- Option :: {proportion, integer()}
- | {flag, integer()}
- | {border, integer()}
- | {userData, wx:wx_object()}.
+ Option :: {'proportion', integer()}
+ | {'flag', integer()}
+ | {'border', integer()}
+ | {'userData', wx:wx_object()}.
prepend(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options)
when is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -585,7 +585,7 @@ prependStretchSpacer(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerprependstretchspacer">external documentation</a>.
-spec prependStretchSpacer(This, [Option]) -> wxSizerItem:wxSizerItem() when
This::wxSizer(),
- Option :: {prop, integer()}.
+ Option :: {'prop', integer()}.
prependStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -596,7 +596,7 @@ prependStretchSpacer(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerrecalcsizes">external documentation</a>.
--spec recalcSizes(This) -> ok when
+-spec recalcSizes(This) -> 'ok' when
This::wxSizer().
recalcSizes(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizer),
@@ -646,7 +646,7 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},Index,#wx_ref{type=NewitemT,ref=NewitemR
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizerreplace">external documentation</a>.
-spec replace(This, Oldwin, Newwin, [Option]) -> boolean() when
This::wxSizer(), Oldwin::wxWindow:wxWindow() | wxSizer(), Newwin::wxWindow:wxWindow() | wxSizer(),
- Option :: {recursive, boolean()}.
+ Option :: {'recursive', boolean()}.
replace(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=OldwinT,ref=OldwinRef},#wx_ref{type=NewwinT,ref=NewwinRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizer),
@@ -665,7 +665,7 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=OldwinT,ref=OldwinRef},#wx_
<<ThisRef:32/?UI,OldwinRef:32/?UI,NewwinRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizersetdimension">external documentation</a>.
--spec setDimension(This, X, Y, Width, Height) -> ok when
+-spec setDimension(This, X, Y, Width, Height) -> 'ok' when
This::wxSizer(), X::integer(), Y::integer(), Width::integer(), Height::integer().
setDimension(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height)
when is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height) ->
@@ -674,7 +674,7 @@ setDimension(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizersetminsize">external documentation</a>.
--spec setMinSize(This, Size) -> ok when
+-spec setMinSize(This, Size) -> 'ok' when
This::wxSizer(), Size::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -683,7 +683,7 @@ setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizersetminsize">external documentation</a>.
--spec setMinSize(This, Width, Height) -> ok when
+-spec setMinSize(This, Width, Height) -> 'ok' when
This::wxSizer(), Width::integer(), Height::integer().
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -744,7 +744,7 @@ setItemMinSize(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRe
<<ThisRef:32/?UI,WindowRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizersetsizehints">external documentation</a>.
--spec setSizeHints(This, Window) -> ok when
+-spec setSizeHints(This, Window) -> 'ok' when
This::wxSizer(), Window::wxWindow:wxWindow().
setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
@@ -753,7 +753,7 @@ setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizer.html#wxsizersetvirtualsizehints">external documentation</a>.
--spec setVirtualSizeHints(This, Window) -> ok when
+-spec setVirtualSizeHints(This, Window) -> 'ok' when
This::wxSizer(), Window::wxWindow:wxWindow().
setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizer),
@@ -765,14 +765,14 @@ setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=Win
%% <br /> Also:<br />
%% show(This, Window) -> boolean() when<br />
%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer();<br />
-%% (This, Show) -> ok when<br />
+%% (This, Show) -> 'ok' when<br />
%% This::wxSizer(), Show::boolean().<br />
%%
-spec show(This, Index) -> boolean() when
This::wxSizer(), Index::integer();
(This, Window) -> boolean() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer();
- (This, Show) -> ok when
+ (This, Show) -> 'ok' when
This::wxSizer(), Show::boolean().
show(This,Index)
@@ -792,16 +792,16 @@ show(#wx_ref{type=ThisT,ref=ThisRef},Show)
%% <br /> Also:<br />
%% show(This, Window, [Option]) -> boolean() when<br />
%% This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),<br />
-%% Option :: {show, boolean()}<br />
-%% | {recursive, boolean()}.<br />
+%% Option :: {'show', boolean()}<br />
+%% | {'recursive', boolean()}.<br />
%%
-spec show(This, Index, [Option]) -> boolean() when
This::wxSizer(), Index::integer(),
- Option :: {show, boolean()};
+ Option :: {'show', boolean()};
(This, Window, [Option]) -> boolean() when
This::wxSizer(), Window::wxWindow:wxWindow() | wxSizer(),
- Option :: {show, boolean()}
- | {recursive, boolean()}.
+ Option :: {'show', boolean()}
+ | {'recursive', boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef},Index, Options)
when is_integer(Index),is_list(Options) ->
?CLASS(ThisT,wxSizer),
diff --git a/lib/wx/src/gen/wxSizerFlags.erl b/lib/wx/src/gen/wxSizerFlags.erl
index 08fbaca3af..45573446e5 100644
--- a/lib/wx/src/gen/wxSizerFlags.erl
+++ b/lib/wx/src/gen/wxSizerFlags.erl
@@ -44,7 +44,7 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizerflags.html#wxsizerflagswxsizerflags">external documentation</a>.
-spec new([Option]) -> wxSizerFlags() when
- Option :: {proportion, integer()}.
+ Option :: {'proportion', integer()}.
new(Options)
when is_list(Options) ->
MOpts = fun({proportion, Proportion}, Acc) -> [<<1:32/?UI,Proportion:32/?UI>>|Acc];
@@ -73,7 +73,7 @@ border(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizerflags.html#wxsizerflagsborder">external documentation</a>.
-spec border(This, [Option]) -> wxSizerFlags() when
This::wxSizerFlags(),
- Option :: {direction, integer()}.
+ Option :: {'direction', integer()}.
border(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSizerFlags),
@@ -142,7 +142,7 @@ right(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSizerFlags()) -> ok.
+-spec destroy(This::wxSizerFlags()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSizerFlags),
wxe_util:destroy(?wxSizerFlags_destroy,Obj),
diff --git a/lib/wx/src/gen/wxSizerItem.erl b/lib/wx/src/gen/wxSizerItem.erl
index 9eebe15cd0..ec21ee85b6 100644
--- a/lib/wx/src/gen/wxSizerItem.erl
+++ b/lib/wx/src/gen/wxSizerItem.erl
@@ -105,7 +105,7 @@ calcMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemdeletewindows">external documentation</a>.
--spec deleteWindows(This) -> ok when
+-spec deleteWindows(This) -> 'ok' when
This::wxSizerItem().
deleteWindows(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
@@ -113,7 +113,7 @@ deleteWindows(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemdetachsizer">external documentation</a>.
--spec detachSizer(This) -> ok when
+-spec detachSizer(This) -> 'ok' when
This::wxSizerItem().
detachSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
@@ -249,7 +249,7 @@ isWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetborder">external documentation</a>.
--spec setBorder(This, Border) -> ok when
+-spec setBorder(This, Border) -> 'ok' when
This::wxSizerItem(), Border::integer().
setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
when is_integer(Border) ->
@@ -258,7 +258,7 @@ setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
<<ThisRef:32/?UI,Border:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetdimension">external documentation</a>.
--spec setDimension(This, Pos, Size) -> ok when
+-spec setDimension(This, Pos, Size) -> 'ok' when
This::wxSizerItem(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}.
setDimension(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY},{SizeW,SizeH})
when is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH) ->
@@ -267,7 +267,7 @@ setDimension(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY},{SizeW,SizeH})
<<ThisRef:32/?UI,PosX:32/?UI,PosY:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetflag">external documentation</a>.
--spec setFlag(This, Flag) -> ok when
+-spec setFlag(This, Flag) -> 'ok' when
This::wxSizerItem(), Flag::integer().
setFlag(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_integer(Flag) ->
@@ -276,7 +276,7 @@ setFlag(#wx_ref{type=ThisT,ref=ThisRef},Flag)
<<ThisRef:32/?UI,Flag:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetinitsize">external documentation</a>.
--spec setInitSize(This, X, Y) -> ok when
+-spec setInitSize(This, X, Y) -> 'ok' when
This::wxSizerItem(), X::integer(), Y::integer().
setInitSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -285,7 +285,7 @@ setInitSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetminsize">external documentation</a>.
--spec setMinSize(This, Size) -> ok when
+-spec setMinSize(This, Size) -> 'ok' when
This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -294,7 +294,7 @@ setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetminsize">external documentation</a>.
--spec setMinSize(This, X, Y) -> ok when
+-spec setMinSize(This, X, Y) -> 'ok' when
This::wxSizerItem(), X::integer(), Y::integer().
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -303,7 +303,7 @@ setMinSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetproportion">external documentation</a>.
--spec setProportion(This, Proportion) -> ok when
+-spec setProportion(This, Proportion) -> 'ok' when
This::wxSizerItem(), Proportion::integer().
setProportion(#wx_ref{type=ThisT,ref=ThisRef},Proportion)
when is_integer(Proportion) ->
@@ -313,12 +313,12 @@ setProportion(#wx_ref{type=ThisT,ref=ThisRef},Proportion)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetratio">external documentation</a>.
%% <br /> Also:<br />
-%% setRatio(This, Size) -> ok when<br />
+%% setRatio(This, Size) -> 'ok' when<br />
%% This::wxSizerItem(), Size::{W::integer(), H::integer()}.<br />
%%
--spec setRatio(This, Ratio) -> ok when
+-spec setRatio(This, Ratio) -> 'ok' when
This::wxSizerItem(), Ratio::number();
- (This, Size) -> ok when
+ (This, Size) -> 'ok' when
This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setRatio(#wx_ref{type=ThisT,ref=ThisRef},Ratio)
when is_number(Ratio) ->
@@ -332,7 +332,7 @@ setRatio(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetratio">external documentation</a>.
--spec setRatio(This, Width, Height) -> ok when
+-spec setRatio(This, Width, Height) -> 'ok' when
This::wxSizerItem(), Width::integer(), Height::integer().
setRatio(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -341,7 +341,7 @@ setRatio(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetsizer">external documentation</a>.
--spec setSizer(This, Sizer) -> ok when
+-spec setSizer(This, Sizer) -> 'ok' when
This::wxSizerItem(), Sizer::wxSizer:wxSizer().
setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
?CLASS(ThisT,wxSizerItem),
@@ -350,7 +350,7 @@ setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
<<ThisRef:32/?UI,SizerRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetspacer">external documentation</a>.
--spec setSpacer(This, Size) -> ok when
+-spec setSpacer(This, Size) -> 'ok' when
This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setSpacer(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -359,7 +359,7 @@ setSpacer(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetspacer">external documentation</a>.
--spec setSpacer(This, Width, Height) -> ok when
+-spec setSpacer(This, Width, Height) -> 'ok' when
This::wxSizerItem(), Width::integer(), Height::integer().
setSpacer(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -368,7 +368,7 @@ setSpacer(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemsetwindow">external documentation</a>.
--spec setWindow(This, Window) -> ok when
+-spec setWindow(This, Window) -> 'ok' when
This::wxSizerItem(), Window::wxWindow:wxWindow().
setWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizerItem),
@@ -377,7 +377,7 @@ setWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) -
<<ThisRef:32/?UI,WindowRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsizeritem.html#wxsizeritemshow">external documentation</a>.
--spec show(This, Show) -> ok when
+-spec show(This, Show) -> 'ok' when
This::wxSizerItem(), Show::boolean().
show(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
@@ -386,7 +386,7 @@ show(#wx_ref{type=ThisT,ref=ThisRef},Show)
<<ThisRef:32/?UI,(wxe_util:from_bool(Show)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSizerItem()) -> ok.
+-spec destroy(This::wxSizerItem()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSizerItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSlider.erl b/lib/wx/src/gen/wxSlider.erl
index 02103aed01..a215b3c1d5 100644
--- a/lib/wx/src/gen/wxSlider.erl
+++ b/lib/wx/src/gen/wxSlider.erl
@@ -98,10 +98,10 @@ new(Parent,Id,Value,MinValue,MaxValue)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxsliderwxslider">external documentation</a>.
-spec new(Parent, Id, Value, MinValue, MaxValue, [Option]) -> wxSlider() when
Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Value,MinValue,MaxValue, Options)
when is_integer(Id),is_integer(Value),is_integer(MinValue),is_integer(MaxValue),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -125,10 +125,10 @@ create(This,Parent,Id,Value,MinValue,MaxValue)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxslidercreate">external documentation</a>.
-spec create(This, Parent, Id, Value, MinValue, MaxValue, [Option]) -> boolean() when
This::wxSlider(), Parent::wxWindow:wxWindow(), Id::integer(), Value::integer(), MinValue::integer(), MaxValue::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Value,MinValue,MaxValue, Options)
when is_integer(Id),is_integer(Value),is_integer(MinValue),is_integer(MaxValue),is_list(Options) ->
?CLASS(ThisT,wxSlider),
@@ -191,7 +191,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxslidersetlinesize">external documentation</a>.
--spec setLineSize(This, LineSize) -> ok when
+-spec setLineSize(This, LineSize) -> 'ok' when
This::wxSlider(), LineSize::integer().
setLineSize(#wx_ref{type=ThisT,ref=ThisRef},LineSize)
when is_integer(LineSize) ->
@@ -200,7 +200,7 @@ setLineSize(#wx_ref{type=ThisT,ref=ThisRef},LineSize)
<<ThisRef:32/?UI,LineSize:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxslidersetpagesize">external documentation</a>.
--spec setPageSize(This, PageSize) -> ok when
+-spec setPageSize(This, PageSize) -> 'ok' when
This::wxSlider(), PageSize::integer().
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},PageSize)
when is_integer(PageSize) ->
@@ -209,7 +209,7 @@ setPageSize(#wx_ref{type=ThisT,ref=ThisRef},PageSize)
<<ThisRef:32/?UI,PageSize:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxslidersetrange">external documentation</a>.
--spec setRange(This, MinValue, MaxValue) -> ok when
+-spec setRange(This, MinValue, MaxValue) -> 'ok' when
This::wxSlider(), MinValue::integer(), MaxValue::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinValue,MaxValue)
when is_integer(MinValue),is_integer(MaxValue) ->
@@ -218,7 +218,7 @@ setRange(#wx_ref{type=ThisT,ref=ThisRef},MinValue,MaxValue)
<<ThisRef:32/?UI,MinValue:32/?UI,MaxValue:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxslidersetthumblength">external documentation</a>.
--spec setThumbLength(This, LenPixels) -> ok when
+-spec setThumbLength(This, LenPixels) -> 'ok' when
This::wxSlider(), LenPixels::integer().
setThumbLength(#wx_ref{type=ThisT,ref=ThisRef},LenPixels)
when is_integer(LenPixels) ->
@@ -227,7 +227,7 @@ setThumbLength(#wx_ref{type=ThisT,ref=ThisRef},LenPixels)
<<ThisRef:32/?UI,LenPixels:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxslider.html#wxslidersetvalue">external documentation</a>.
--spec setValue(This, Value) -> ok when
+-spec setValue(This, Value) -> 'ok' when
This::wxSlider(), Value::integer().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_integer(Value) ->
@@ -236,7 +236,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
<<ThisRef:32/?UI,Value:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSlider()) -> ok.
+-spec destroy(This::wxSlider()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSlider),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSpinButton.erl b/lib/wx/src/gen/wxSpinButton.erl
index 82b48f87da..1c8d674d05 100644
--- a/lib/wx/src/gen/wxSpinButton.erl
+++ b/lib/wx/src/gen/wxSpinButton.erl
@@ -97,10 +97,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinbutton.html#wxspinbuttonwxspinbutton">external documentation</a>.
-spec new(Parent, [Option]) -> wxSpinButton() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,10 +124,10 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinbutton.html#wxspinbuttoncreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxSpinButton(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSpinButton),
@@ -166,7 +166,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinbutton.html#wxspinbuttonsetrange">external documentation</a>.
--spec setRange(This, MinVal, MaxVal) -> ok when
+-spec setRange(This, MinVal, MaxVal) -> 'ok' when
This::wxSpinButton(), MinVal::integer(), MaxVal::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinVal,MaxVal)
when is_integer(MinVal),is_integer(MaxVal) ->
@@ -175,7 +175,7 @@ setRange(#wx_ref{type=ThisT,ref=ThisRef},MinVal,MaxVal)
<<ThisRef:32/?UI,MinVal:32/?UI,MaxVal:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinbutton.html#wxspinbuttonsetvalue">external documentation</a>.
--spec setValue(This, Value) -> ok when
+-spec setValue(This, Value) -> 'ok' when
This::wxSpinButton(), Value::integer().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_integer(Value) ->
@@ -184,7 +184,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
<<ThisRef:32/?UI,Value:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSpinButton()) -> ok.
+-spec destroy(This::wxSpinButton()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSpinButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSpinCtrl.erl b/lib/wx/src/gen/wxSpinCtrl.erl
index 89fa971543..f8a46dd146 100644
--- a/lib/wx/src/gen/wxSpinCtrl.erl
+++ b/lib/wx/src/gen/wxSpinCtrl.erl
@@ -97,14 +97,14 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinctrl.html#wxspinctrlwxspinctrl">external documentation</a>.
-spec new(Parent, [Option]) -> wxSpinCtrl() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {value, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {min, integer()}
- | {max, integer()}
- | {initial, integer()}.
+ Option :: {'id', integer()}
+ | {'value', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'min', integer()}
+ | {'max', integer()}
+ | {'initial', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -132,14 +132,14 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinctrl.html#wxspinctrlcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxSpinCtrl(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {value, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {min, integer()}
- | {max, integer()}
- | {initial, integer()}.
+ Option :: {'id', integer()}
+ | {'value', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'min', integer()}
+ | {'max', integer()}
+ | {'initial', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSpinCtrl),
@@ -159,12 +159,12 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinctrl.html#wxspinctrlsetvalue">external documentation</a>.
%% <br /> Also:<br />
-%% setValue(This, Text) -> ok when<br />
+%% setValue(This, Text) -> 'ok' when<br />
%% This::wxSpinCtrl(), Text::unicode:chardata().<br />
%%
--spec setValue(This, Value) -> ok when
+-spec setValue(This, Value) -> 'ok' when
This::wxSpinCtrl(), Value::integer();
- (This, Text) -> ok when
+ (This, Text) -> 'ok' when
This::wxSpinCtrl(), Text::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_integer(Value) ->
@@ -187,7 +187,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinctrl.html#wxspinctrlsetrange">external documentation</a>.
--spec setRange(This, MinVal, MaxVal) -> ok when
+-spec setRange(This, MinVal, MaxVal) -> 'ok' when
This::wxSpinCtrl(), MinVal::integer(), MaxVal::integer().
setRange(#wx_ref{type=ThisT,ref=ThisRef},MinVal,MaxVal)
when is_integer(MinVal),is_integer(MaxVal) ->
@@ -196,7 +196,7 @@ setRange(#wx_ref{type=ThisT,ref=ThisRef},MinVal,MaxVal)
<<ThisRef:32/?UI,MinVal:32/?UI,MaxVal:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinctrl.html#wxspinctrlsetselection">external documentation</a>.
--spec setSelection(This, From, To) -> ok when
+-spec setSelection(This, From, To) -> 'ok' when
This::wxSpinCtrl(), From::integer(), To::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
@@ -221,7 +221,7 @@ getMax(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSpinCtrl()) -> ok.
+-spec destroy(This::wxSpinCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSpinCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSpinEvent.erl b/lib/wx/src/gen/wxSpinEvent.erl
index da3111e5f5..1c99927de7 100644
--- a/lib/wx/src/gen/wxSpinEvent.erl
+++ b/lib/wx/src/gen/wxSpinEvent.erl
@@ -59,7 +59,7 @@ getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxspinevent.html#wxspineventsetposition">external documentation</a>.
--spec setPosition(This, Pos) -> ok when
+-spec setPosition(This, Pos) -> 'ok' when
This::wxSpinEvent(), Pos::integer().
setPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
diff --git a/lib/wx/src/gen/wxSplashScreen.erl b/lib/wx/src/gen/wxSplashScreen.erl
index fad8cfcd8e..3b53e670c1 100644
--- a/lib/wx/src/gen/wxSplashScreen.erl
+++ b/lib/wx/src/gen/wxSplashScreen.erl
@@ -107,9 +107,9 @@ new(Bitmap,SplashStyle,Milliseconds,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplashscreen.html#wxsplashscreenwxsplashscreen">external documentation</a>.
-spec new(Bitmap, SplashStyle, Milliseconds, Parent, Id, [Option]) -> wxSplashScreen() when
Bitmap::wxBitmap:wxBitmap(), SplashStyle::integer(), Milliseconds::integer(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=BitmapT,ref=BitmapRef},SplashStyle,Milliseconds,#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(SplashStyle),is_integer(Milliseconds),is_integer(Id),is_list(Options) ->
?CLASS(BitmapT,wxBitmap),
@@ -139,7 +139,7 @@ getTimeout(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSplashScreen()) -> ok.
+-spec destroy(This::wxSplashScreen()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSplashScreen),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSplitterEvent.erl b/lib/wx/src/gen/wxSplitterEvent.erl
index 3daef5cdc1..87b70b5955 100644
--- a/lib/wx/src/gen/wxSplitterEvent.erl
+++ b/lib/wx/src/gen/wxSplitterEvent.erl
@@ -83,7 +83,7 @@ getWindowBeingRemoved(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterevent.html#wxsplittereventsetsashposition">external documentation</a>.
--spec setSashPosition(This, Pos) -> ok when
+-spec setSashPosition(This, Pos) -> 'ok' when
This::wxSplitterEvent(), Pos::integer().
setSashPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
diff --git a/lib/wx/src/gen/wxSplitterWindow.erl b/lib/wx/src/gen/wxSplitterWindow.erl
index 7db8dc60c4..f311d5011f 100644
--- a/lib/wx/src/gen/wxSplitterWindow.erl
+++ b/lib/wx/src/gen/wxSplitterWindow.erl
@@ -99,10 +99,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowwxsplitterwindow">external documentation</a>.
-spec new(Parent, [Option]) -> wxSplitterWindow() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,10 +126,10 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxSplitterWindow(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -193,7 +193,7 @@ getWindow2(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowinitialize">external documentation</a>.
--spec initialize(This, Window) -> ok when
+-spec initialize(This, Window) -> 'ok' when
This::wxSplitterWindow(), Window::wxWindow:wxWindow().
initialize(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -220,7 +220,7 @@ replaceWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinOldT,ref=WinOldRef
<<ThisRef:32/?UI,WinOldRef:32/?UI,WinNewRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsetsashgravity">external documentation</a>.
--spec setSashGravity(This, Gravity) -> ok when
+-spec setSashGravity(This, Gravity) -> 'ok' when
This::wxSplitterWindow(), Gravity::number().
setSashGravity(#wx_ref{type=ThisT,ref=ThisRef},Gravity)
when is_number(Gravity) ->
@@ -229,7 +229,7 @@ setSashGravity(#wx_ref{type=ThisT,ref=ThisRef},Gravity)
<<ThisRef:32/?UI,0:32,Gravity:64/?F>>).
%% @equiv setSashPosition(This,Position, [])
--spec setSashPosition(This, Position) -> ok when
+-spec setSashPosition(This, Position) -> 'ok' when
This::wxSplitterWindow(), Position::integer().
setSashPosition(This,Position)
@@ -237,9 +237,9 @@ setSashPosition(This,Position)
setSashPosition(This,Position, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsetsashposition">external documentation</a>.
--spec setSashPosition(This, Position, [Option]) -> ok when
+-spec setSashPosition(This, Position, [Option]) -> 'ok' when
This::wxSplitterWindow(), Position::integer(),
- Option :: {redraw, boolean()}.
+ Option :: {'redraw', boolean()}.
setSashPosition(#wx_ref{type=ThisT,ref=ThisRef},Position, Options)
when is_integer(Position),is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -250,7 +250,7 @@ setSashPosition(#wx_ref{type=ThisT,ref=ThisRef},Position, Options)
<<ThisRef:32/?UI,Position:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsetsashsize">external documentation</a>.
--spec setSashSize(This, Width) -> ok when
+-spec setSashSize(This, Width) -> 'ok' when
This::wxSplitterWindow(), Width::integer().
setSashSize(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -259,7 +259,7 @@ setSashSize(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsetminimumpanesize">external documentation</a>.
--spec setMinimumPaneSize(This, Min) -> ok when
+-spec setMinimumPaneSize(This, Min) -> 'ok' when
This::wxSplitterWindow(), Min::integer().
setMinimumPaneSize(#wx_ref{type=ThisT,ref=ThisRef},Min)
when is_integer(Min) ->
@@ -268,7 +268,7 @@ setMinimumPaneSize(#wx_ref{type=ThisT,ref=ThisRef},Min)
<<ThisRef:32/?UI,Min:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsetsplitmode">external documentation</a>.
--spec setSplitMode(This, Mode) -> ok when
+-spec setSplitMode(This, Mode) -> 'ok' when
This::wxSplitterWindow(), Mode::integer().
setSplitMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -287,7 +287,7 @@ splitHorizontally(This,Window1,Window2)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsplithorizontally">external documentation</a>.
-spec splitHorizontally(This, Window1, Window2, [Option]) -> boolean() when
This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow(),
- Option :: {sashPosition, integer()}.
+ Option :: {'sashPosition', integer()}.
splitHorizontally(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Window1T,ref=Window1Ref},#wx_ref{type=Window2T,ref=Window2Ref}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -310,7 +310,7 @@ splitVertically(This,Window1,Window2)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowsplitvertically">external documentation</a>.
-spec splitVertically(This, Window1, Window2, [Option]) -> boolean() when
This::wxSplitterWindow(), Window1::wxWindow:wxWindow(), Window2::wxWindow:wxWindow(),
- Option :: {sashPosition, integer()}.
+ Option :: {'sashPosition', integer()}.
splitVertically(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=Window1T,ref=Window1Ref},#wx_ref{type=Window2T,ref=Window2Ref}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -333,7 +333,7 @@ unsplit(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowunsplit">external documentation</a>.
-spec unsplit(This, [Option]) -> boolean() when
This::wxSplitterWindow(),
- Option :: {toRemove, wxWindow:wxWindow()}.
+ Option :: {'toRemove', wxWindow:wxWindow()}.
unsplit(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -344,7 +344,7 @@ unsplit(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsplitterwindow.html#wxsplitterwindowupdatesize">external documentation</a>.
--spec updateSize(This) -> ok when
+-spec updateSize(This) -> 'ok' when
This::wxSplitterWindow().
updateSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSplitterWindow),
@@ -352,7 +352,7 @@ updateSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxSplitterWindow()) -> ok.
+-spec destroy(This::wxSplitterWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSplitterWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticBitmap.erl b/lib/wx/src/gen/wxStaticBitmap.erl
index 4da50262b9..3ef1499a28 100644
--- a/lib/wx/src/gen/wxStaticBitmap.erl
+++ b/lib/wx/src/gen/wxStaticBitmap.erl
@@ -96,9 +96,9 @@ new(Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticbitmap.html#wxstaticbitmapwxstaticbitmap">external documentation</a>.
-spec new(Parent, Id, Label, [Option]) -> wxStaticBitmap() when
Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=LabelT,ref=LabelRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -122,9 +122,9 @@ create(This,Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticbitmap.html#wxstaticbitmapcreate">external documentation</a>.
-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
This::wxStaticBitmap(), Parent::wxWindow:wxWindow(), Id::integer(), Label::wxBitmap:wxBitmap(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,#wx_ref{type=LabelT,ref=LabelRef}, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxStaticBitmap),
@@ -147,7 +147,7 @@ getBitmap(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticbitmap.html#wxstaticbitmapsetbitmap">external documentation</a>.
--spec setBitmap(This, Bitmap) -> ok when
+-spec setBitmap(This, Bitmap) -> 'ok' when
This::wxStaticBitmap(), Bitmap::wxBitmap:wxBitmap().
setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) ->
?CLASS(ThisT,wxStaticBitmap),
@@ -156,7 +156,7 @@ setBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BitmapT,ref=BitmapRef}) -
<<ThisRef:32/?UI,BitmapRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStaticBitmap()) -> ok.
+-spec destroy(This::wxStaticBitmap()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticBitmap),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticBox.erl b/lib/wx/src/gen/wxStaticBox.erl
index 04584f23b2..46cca3b6f3 100644
--- a/lib/wx/src/gen/wxStaticBox.erl
+++ b/lib/wx/src/gen/wxStaticBox.erl
@@ -96,9 +96,9 @@ new(Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticbox.html#wxstaticboxwxstaticbox">external documentation</a>.
-spec new(Parent, Id, Label, [Option]) -> wxStaticBox() when
Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -122,9 +122,9 @@ create(This,Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticbox.html#wxstaticboxcreate">external documentation</a>.
-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
This::wxStaticBox(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxStaticBox),
@@ -139,7 +139,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,La
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStaticBox()) -> ok.
+-spec destroy(This::wxStaticBox()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticBox),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticBoxSizer.erl b/lib/wx/src/gen/wxStaticBoxSizer.erl
index 76dde099b6..2c69cb86b0 100644
--- a/lib/wx/src/gen/wxStaticBoxSizer.erl
+++ b/lib/wx/src/gen/wxStaticBoxSizer.erl
@@ -71,7 +71,7 @@ new(#wx_ref{type=BoxT,ref=BoxRef},Orient)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticboxsizer.html#wxstaticboxsizerwxstaticboxsizer">external documentation</a>.
-spec new(Orient, Win, [Option]) -> wxStaticBoxSizer() when
Orient::integer(), Win::wxWindow:wxWindow(),
- Option :: {label, unicode:chardata()}.
+ Option :: {'label', unicode:chardata()}.
new(Orient,#wx_ref{type=WinT,ref=WinRef}, Options)
when is_integer(Orient),is_list(Options) ->
?CLASS(WinT,wxWindow),
@@ -90,7 +90,7 @@ getStaticBox(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStaticBoxSizer()) -> ok.
+-spec destroy(This::wxStaticBoxSizer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticBoxSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticLine.erl b/lib/wx/src/gen/wxStaticLine.erl
index 6d23c5ac3d..94dd339cfc 100644
--- a/lib/wx/src/gen/wxStaticLine.erl
+++ b/lib/wx/src/gen/wxStaticLine.erl
@@ -97,10 +97,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticline.html#wxstaticlinewxstaticline">external documentation</a>.
-spec new(Parent, [Option]) -> wxStaticLine() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,10 +124,10 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstaticline.html#wxstaticlinecreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxStaticLine(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStaticLine),
@@ -156,7 +156,7 @@ getDefaultSize() ->
<<>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStaticLine()) -> ok.
+-spec destroy(This::wxStaticLine()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticLine),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStaticText.erl b/lib/wx/src/gen/wxStaticText.erl
index 635f29a1e8..37d0219bc6 100644
--- a/lib/wx/src/gen/wxStaticText.erl
+++ b/lib/wx/src/gen/wxStaticText.erl
@@ -96,9 +96,9 @@ new(Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatictext.html#wxstatictextwxstatictext">external documentation</a>.
-spec new(Parent, Id, Label, [Option]) -> wxStaticText() when
Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -122,9 +122,9 @@ create(This,Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatictext.html#wxstatictextcreate">external documentation</a>.
-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
This::wxStaticText(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxStaticText),
@@ -147,7 +147,7 @@ getLabel(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatictext.html#wxstatictextsetlabel">external documentation</a>.
--spec setLabel(This, Label) -> ok when
+-spec setLabel(This, Label) -> 'ok' when
This::wxStaticText(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
@@ -157,7 +157,7 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
<<ThisRef:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatictext.html#wxstatictextwrap">external documentation</a>.
--spec wrap(This, Width) -> ok when
+-spec wrap(This, Width) -> 'ok' when
This::wxStaticText(), Width::integer().
wrap(#wx_ref{type=ThisT,ref=ThisRef},Width)
when is_integer(Width) ->
@@ -166,7 +166,7 @@ wrap(#wx_ref{type=ThisT,ref=ThisRef},Width)
<<ThisRef:32/?UI,Width:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStaticText()) -> ok.
+-spec destroy(This::wxStaticText()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStaticText),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStatusBar.erl b/lib/wx/src/gen/wxStatusBar.erl
index 2cd0d4a43e..d0ce65273b 100644
--- a/lib/wx/src/gen/wxStatusBar.erl
+++ b/lib/wx/src/gen/wxStatusBar.erl
@@ -97,8 +97,8 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarwxstatusbar">external documentation</a>.
-spec new(Parent, [Option]) -> wxStatusBar() when
Parent::wxWindow:wxWindow(),
- Option :: {winid, integer()}
- | {style, integer()}.
+ Option :: {'winid', integer()}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -120,8 +120,8 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxStatusBar(), Parent::wxWindow:wxWindow(),
- Option :: {winid, integer()}
- | {style, integer()}.
+ Option :: {'winid', integer()}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -162,7 +162,7 @@ getStatusText(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbargetstatustext">external documentation</a>.
-spec getStatusText(This, [Option]) -> unicode:charlist() when
This::wxStatusBar(),
- Option :: {number, integer()}.
+ Option :: {'number', integer()}.
getStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -173,7 +173,7 @@ getStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv popStatusText(This, [])
--spec popStatusText(This) -> ok when
+-spec popStatusText(This) -> 'ok' when
This::wxStatusBar().
popStatusText(This)
@@ -181,9 +181,9 @@ popStatusText(This)
popStatusText(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarpopstatustext">external documentation</a>.
--spec popStatusText(This, [Option]) -> ok when
+-spec popStatusText(This, [Option]) -> 'ok' when
This::wxStatusBar(),
- Option :: {number, integer()}.
+ Option :: {'number', integer()}.
popStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -194,7 +194,7 @@ popStatusText(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv pushStatusText(This,Text, [])
--spec pushStatusText(This, Text) -> ok when
+-spec pushStatusText(This, Text) -> 'ok' when
This::wxStatusBar(), Text::unicode:chardata().
pushStatusText(This,Text)
@@ -202,9 +202,9 @@ pushStatusText(This,Text)
pushStatusText(This,Text, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarpushstatustext">external documentation</a>.
--spec pushStatusText(This, Text, [Option]) -> ok when
+-spec pushStatusText(This, Text, [Option]) -> 'ok' when
This::wxStatusBar(), Text::unicode:chardata(),
- Option :: {number, integer()}.
+ Option :: {'number', integer()}.
pushStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -216,7 +216,7 @@ pushStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
<<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>>).
%% @equiv setFieldsCount(This,Number, [])
--spec setFieldsCount(This, Number) -> ok when
+-spec setFieldsCount(This, Number) -> 'ok' when
This::wxStatusBar(), Number::integer().
setFieldsCount(This,Number)
@@ -224,9 +224,9 @@ setFieldsCount(This,Number)
setFieldsCount(This,Number, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarsetfieldscount">external documentation</a>.
--spec setFieldsCount(This, Number, [Option]) -> ok when
+-spec setFieldsCount(This, Number, [Option]) -> 'ok' when
This::wxStatusBar(), Number::integer(),
- Option :: {widths, [integer()]}.
+ Option :: {'widths', [integer()]}.
setFieldsCount(#wx_ref{type=ThisT,ref=ThisRef},Number, Options)
when is_integer(Number),is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -238,7 +238,7 @@ setFieldsCount(#wx_ref{type=ThisT,ref=ThisRef},Number, Options)
<<ThisRef:32/?UI,Number:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarsetminheight">external documentation</a>.
--spec setMinHeight(This, Height) -> ok when
+-spec setMinHeight(This, Height) -> 'ok' when
This::wxStatusBar(), Height::integer().
setMinHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
when is_integer(Height) ->
@@ -247,7 +247,7 @@ setMinHeight(#wx_ref{type=ThisT,ref=ThisRef},Height)
<<ThisRef:32/?UI,Height:32/?UI>>).
%% @equiv setStatusText(This,Text, [])
--spec setStatusText(This, Text) -> ok when
+-spec setStatusText(This, Text) -> 'ok' when
This::wxStatusBar(), Text::unicode:chardata().
setStatusText(This,Text)
@@ -255,9 +255,9 @@ setStatusText(This,Text)
setStatusText(This,Text, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarsetstatustext">external documentation</a>.
--spec setStatusText(This, Text, [Option]) -> ok when
+-spec setStatusText(This, Text, [Option]) -> 'ok' when
This::wxStatusBar(), Text::unicode:chardata(),
- Option :: {number, integer()}.
+ Option :: {'number', integer()}.
setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxStatusBar),
@@ -269,7 +269,7 @@ setStatusText(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarsetstatuswidths">external documentation</a>.
--spec setStatusWidths(This, Widths_field) -> ok when
+-spec setStatusWidths(This, Widths_field) -> 'ok' when
This::wxStatusBar(), Widths_field::[integer()].
setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
when is_list(Widths_field) ->
@@ -279,7 +279,7 @@ setStatusWidths(#wx_ref{type=ThisT,ref=ThisRef},Widths_field)
(<< <<C:32/?I>> || C <- Widths_field>>)/binary, 0:(((0+length(Widths_field)) rem 2)*32)>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstatusbar.html#wxstatusbarsetstatusstyles">external documentation</a>.
--spec setStatusStyles(This, Styles) -> ok when
+-spec setStatusStyles(This, Styles) -> 'ok' when
This::wxStatusBar(), Styles::[integer()].
setStatusStyles(#wx_ref{type=ThisT,ref=ThisRef},Styles)
when is_list(Styles) ->
@@ -289,7 +289,7 @@ setStatusStyles(#wx_ref{type=ThisT,ref=ThisRef},Styles)
(<< <<C:32/?I>> || C <- Styles>>)/binary, 0:(((0+length(Styles)) rem 2)*32)>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStatusBar()) -> ok.
+-spec destroy(This::wxStatusBar()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStatusBar),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStdDialogButtonSizer.erl b/lib/wx/src/gen/wxStdDialogButtonSizer.erl
index 97beee6f14..70e8981def 100644
--- a/lib/wx/src/gen/wxStdDialogButtonSizer.erl
+++ b/lib/wx/src/gen/wxStdDialogButtonSizer.erl
@@ -57,7 +57,7 @@ new() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizeraddbutton">external documentation</a>.
--spec addButton(This, Button) -> ok when
+-spec addButton(This, Button) -> 'ok' when
This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
addButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
@@ -66,7 +66,7 @@ addButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) -
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizerrealize">external documentation</a>.
--spec realize(This) -> ok when
+-spec realize(This) -> 'ok' when
This::wxStdDialogButtonSizer().
realize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
@@ -74,7 +74,7 @@ realize(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizersetaffirmativebutton">external documentation</a>.
--spec setAffirmativeButton(This, Button) -> ok when
+-spec setAffirmativeButton(This, Button) -> 'ok' when
This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
setAffirmativeButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
@@ -83,7 +83,7 @@ setAffirmativeButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=Bu
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizersetcancelbutton">external documentation</a>.
--spec setCancelButton(This, Button) -> ok when
+-spec setCancelButton(This, Button) -> 'ok' when
This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
setCancelButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
@@ -92,7 +92,7 @@ setCancelButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonR
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstddialogbuttonsizer.html#wxstddialogbuttonsizersetnegativebutton">external documentation</a>.
--spec setNegativeButton(This, Button) -> ok when
+-spec setNegativeButton(This, Button) -> 'ok' when
This::wxStdDialogButtonSizer(), Button::wxButton:wxButton().
setNegativeButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=ButtonRef}) ->
?CLASS(ThisT,wxStdDialogButtonSizer),
@@ -101,7 +101,7 @@ setNegativeButton(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ButtonT,ref=Butto
<<ThisRef:32/?UI,ButtonRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStdDialogButtonSizer()) -> ok.
+-spec destroy(This::wxStdDialogButtonSizer()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStdDialogButtonSizer),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxStyledTextCtrl.erl b/lib/wx/src/gen/wxStyledTextCtrl.erl
index 8e629db9ff..15ef728659 100644
--- a/lib/wx/src/gen/wxStyledTextCtrl.erl
+++ b/lib/wx/src/gen/wxStyledTextCtrl.erl
@@ -197,10 +197,10 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwxstyledtextctrl">external documentation</a>.
-spec new(Parent, [Option]) -> wxStyledTextCtrl() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -224,10 +224,10 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxStyledTextCtrl(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -242,7 +242,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrladdtext">external documentation</a>.
--spec addText(This, Text) -> ok when
+-spec addText(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::unicode:chardata().
addText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -252,7 +252,7 @@ addText(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrladdstyledtext">external documentation</a>.
--spec addStyledText(This, Data) -> ok when
+-spec addStyledText(This, Data) -> 'ok' when
This::wxStyledTextCtrl(), Data::wx:wx_object().
addStyledText(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -261,7 +261,7 @@ addStyledText(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DataT,ref=DataRef}) -
<<ThisRef:32/?UI,DataRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlinserttext">external documentation</a>.
--spec insertText(This, Pos, Text) -> ok when
+-spec insertText(This, Pos, Text) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer(), Text::unicode:chardata().
insertText(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
when is_integer(Pos),is_list(Text) ->
@@ -271,7 +271,7 @@ insertText(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
<<ThisRef:32/?UI,Pos: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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlclearall">external documentation</a>.
--spec clearAll(This) -> ok when
+-spec clearAll(This) -> 'ok' when
This::wxStyledTextCtrl().
clearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -279,7 +279,7 @@ clearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcleardocumentstyle">external documentation</a>.
--spec clearDocumentStyle(This) -> ok when
+-spec clearDocumentStyle(This) -> 'ok' when
This::wxStyledTextCtrl().
clearDocumentStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -329,7 +329,7 @@ getStyleAt(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlredo">external documentation</a>.
--spec redo(This) -> ok when
+-spec redo(This) -> 'ok' when
This::wxStyledTextCtrl().
redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -337,7 +337,7 @@ redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetundocollection">external documentation</a>.
--spec setUndoCollection(This, CollectUndo) -> ok when
+-spec setUndoCollection(This, CollectUndo) -> 'ok' when
This::wxStyledTextCtrl(), CollectUndo::boolean().
setUndoCollection(#wx_ref{type=ThisT,ref=ThisRef},CollectUndo)
when is_boolean(CollectUndo) ->
@@ -346,7 +346,7 @@ setUndoCollection(#wx_ref{type=ThisT,ref=ThisRef},CollectUndo)
<<ThisRef:32/?UI,(wxe_util:from_bool(CollectUndo)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlselectall">external documentation</a>.
--spec selectAll(This) -> ok when
+-spec selectAll(This) -> 'ok' when
This::wxStyledTextCtrl().
selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -354,7 +354,7 @@ selectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetsavepoint">external documentation</a>.
--spec setSavePoint(This) -> ok when
+-spec setSavePoint(This) -> 'ok' when
This::wxStyledTextCtrl().
setSavePoint(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -388,7 +388,7 @@ markerLineFromHandle(#wx_ref{type=ThisT,ref=ThisRef},Handle)
<<ThisRef:32/?UI,Handle:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdeletehandle">external documentation</a>.
--spec markerDeleteHandle(This, Handle) -> ok when
+-spec markerDeleteHandle(This, Handle) -> 'ok' when
This::wxStyledTextCtrl(), Handle::integer().
markerDeleteHandle(#wx_ref{type=ThisT,ref=ThisRef},Handle)
when is_integer(Handle) ->
@@ -413,7 +413,7 @@ getViewWhiteSpace(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetviewwhitespace">external documentation</a>.
--spec setViewWhiteSpace(This, ViewWS) -> ok when
+-spec setViewWhiteSpace(This, ViewWS) -> 'ok' when
This::wxStyledTextCtrl(), ViewWS::integer().
setViewWhiteSpace(#wx_ref{type=ThisT,ref=ThisRef},ViewWS)
when is_integer(ViewWS) ->
@@ -440,7 +440,7 @@ positionFromPointClose(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlgotoline">external documentation</a>.
--spec gotoLine(This, Line) -> ok when
+-spec gotoLine(This, Line) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer().
gotoLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
@@ -449,7 +449,7 @@ gotoLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlgotopos">external documentation</a>.
--spec gotoPos(This, Pos) -> ok when
+-spec gotoPos(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
gotoPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -458,7 +458,7 @@ gotoPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetanchor">external documentation</a>.
--spec setAnchor(This, PosAnchor) -> ok when
+-spec setAnchor(This, PosAnchor) -> 'ok' when
This::wxStyledTextCtrl(), PosAnchor::integer().
setAnchor(#wx_ref{type=ThisT,ref=ThisRef},PosAnchor)
when is_integer(PosAnchor) ->
@@ -484,7 +484,7 @@ getEndStyled(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlconverteols">external documentation</a>.
--spec convertEOLs(This, EolMode) -> ok when
+-spec convertEOLs(This, EolMode) -> 'ok' when
This::wxStyledTextCtrl(), EolMode::integer().
convertEOLs(#wx_ref{type=ThisT,ref=ThisRef},EolMode)
when is_integer(EolMode) ->
@@ -501,7 +501,7 @@ getEOLMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlseteolmode">external documentation</a>.
--spec setEOLMode(This, EolMode) -> ok when
+-spec setEOLMode(This, EolMode) -> 'ok' when
This::wxStyledTextCtrl(), EolMode::integer().
setEOLMode(#wx_ref{type=ThisT,ref=ThisRef},EolMode)
when is_integer(EolMode) ->
@@ -510,7 +510,7 @@ setEOLMode(#wx_ref{type=ThisT,ref=ThisRef},EolMode)
<<ThisRef:32/?UI,EolMode:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstartstyling">external documentation</a>.
--spec startStyling(This, Pos, Mask) -> ok when
+-spec startStyling(This, Pos, Mask) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer(), Mask::integer().
startStyling(#wx_ref{type=ThisT,ref=ThisRef},Pos,Mask)
when is_integer(Pos),is_integer(Mask) ->
@@ -519,7 +519,7 @@ startStyling(#wx_ref{type=ThisT,ref=ThisRef},Pos,Mask)
<<ThisRef:32/?UI,Pos:32/?UI,Mask:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstyling">external documentation</a>.
--spec setStyling(This, Length, Style) -> ok when
+-spec setStyling(This, Length, Style) -> 'ok' when
This::wxStyledTextCtrl(), Length::integer(), Style::integer().
setStyling(#wx_ref{type=ThisT,ref=ThisRef},Length,Style)
when is_integer(Length),is_integer(Style) ->
@@ -536,7 +536,7 @@ getBufferedDraw(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetbuffereddraw">external documentation</a>.
--spec setBufferedDraw(This, Buffered) -> ok when
+-spec setBufferedDraw(This, Buffered) -> 'ok' when
This::wxStyledTextCtrl(), Buffered::boolean().
setBufferedDraw(#wx_ref{type=ThisT,ref=ThisRef},Buffered)
when is_boolean(Buffered) ->
@@ -545,7 +545,7 @@ setBufferedDraw(#wx_ref{type=ThisT,ref=ThisRef},Buffered)
<<ThisRef:32/?UI,(wxe_util:from_bool(Buffered)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettabwidth">external documentation</a>.
--spec setTabWidth(This, TabWidth) -> ok when
+-spec setTabWidth(This, TabWidth) -> 'ok' when
This::wxStyledTextCtrl(), TabWidth::integer().
setTabWidth(#wx_ref{type=ThisT,ref=ThisRef},TabWidth)
when is_integer(TabWidth) ->
@@ -562,7 +562,7 @@ getTabWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcodepage">external documentation</a>.
--spec setCodePage(This, CodePage) -> ok when
+-spec setCodePage(This, CodePage) -> 'ok' when
This::wxStyledTextCtrl(), CodePage::integer().
setCodePage(#wx_ref{type=ThisT,ref=ThisRef},CodePage)
when is_integer(CodePage) ->
@@ -571,7 +571,7 @@ setCodePage(#wx_ref{type=ThisT,ref=ThisRef},CodePage)
<<ThisRef:32/?UI,CodePage:32/?UI>>).
%% @equiv markerDefine(This,MarkerNumber,MarkerSymbol, [])
--spec markerDefine(This, MarkerNumber, MarkerSymbol) -> ok when
+-spec markerDefine(This, MarkerNumber, MarkerSymbol) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer(), MarkerSymbol::integer().
markerDefine(This,MarkerNumber,MarkerSymbol)
@@ -579,10 +579,10 @@ markerDefine(This,MarkerNumber,MarkerSymbol)
markerDefine(This,MarkerNumber,MarkerSymbol, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdefine">external documentation</a>.
--spec markerDefine(This, MarkerNumber, MarkerSymbol, [Option]) -> ok when
+-spec markerDefine(This, MarkerNumber, MarkerSymbol, [Option]) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer(), MarkerSymbol::integer(),
- Option :: {foreground, wx:wx_colour()}
- | {background, wx:wx_colour()}.
+ Option :: {'foreground', wx:wx_colour()}
+ | {'background', wx:wx_colour()}.
markerDefine(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,MarkerSymbol, Options)
when is_integer(MarkerNumber),is_integer(MarkerSymbol),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -594,7 +594,7 @@ markerDefine(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,MarkerSymbol, Options)
<<ThisRef:32/?UI,MarkerNumber:32/?UI,MarkerSymbol:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkersetforeground">external documentation</a>.
--spec markerSetForeground(This, MarkerNumber, Fore) -> ok when
+-spec markerSetForeground(This, MarkerNumber, Fore) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer(), Fore::wx:wx_colour().
markerSetForeground(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Fore)
when is_integer(MarkerNumber),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -603,7 +603,7 @@ markerSetForeground(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Fore)
<<ThisRef:32/?UI,MarkerNumber:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkersetbackground">external documentation</a>.
--spec markerSetBackground(This, MarkerNumber, Back) -> ok when
+-spec markerSetBackground(This, MarkerNumber, Back) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer(), Back::wx:wx_colour().
markerSetBackground(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Back)
when is_integer(MarkerNumber),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -621,7 +621,7 @@ markerAdd(#wx_ref{type=ThisT,ref=ThisRef},Line,MarkerNumber)
<<ThisRef:32/?UI,Line:32/?UI,MarkerNumber:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdelete">external documentation</a>.
--spec markerDelete(This, Line, MarkerNumber) -> ok when
+-spec markerDelete(This, Line, MarkerNumber) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer(), MarkerNumber::integer().
markerDelete(#wx_ref{type=ThisT,ref=ThisRef},Line,MarkerNumber)
when is_integer(Line),is_integer(MarkerNumber) ->
@@ -630,7 +630,7 @@ markerDelete(#wx_ref{type=ThisT,ref=ThisRef},Line,MarkerNumber)
<<ThisRef:32/?UI,Line:32/?UI,MarkerNumber:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdeleteall">external documentation</a>.
--spec markerDeleteAll(This, MarkerNumber) -> ok when
+-spec markerDeleteAll(This, MarkerNumber) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer().
markerDeleteAll(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber)
when is_integer(MarkerNumber) ->
@@ -666,7 +666,7 @@ markerPrevious(#wx_ref{type=ThisT,ref=ThisRef},LineStart,MarkerMask)
<<ThisRef:32/?UI,LineStart:32/?UI,MarkerMask:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkerdefinebitmap">external documentation</a>.
--spec markerDefineBitmap(This, MarkerNumber, Bmp) -> ok when
+-spec markerDefineBitmap(This, MarkerNumber, Bmp) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer(), Bmp::wxBitmap:wxBitmap().
markerDefineBitmap(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,#wx_ref{type=BmpT,ref=BmpRef})
when is_integer(MarkerNumber) ->
@@ -676,7 +676,7 @@ markerDefineBitmap(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,#wx_ref{type=Bmp
<<ThisRef:32/?UI,MarkerNumber:32/?UI,BmpRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkeraddset">external documentation</a>.
--spec markerAddSet(This, Line, Set) -> ok when
+-spec markerAddSet(This, Line, Set) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer(), Set::integer().
markerAddSet(#wx_ref{type=ThisT,ref=ThisRef},Line,Set)
when is_integer(Line),is_integer(Set) ->
@@ -685,7 +685,7 @@ markerAddSet(#wx_ref{type=ThisT,ref=ThisRef},Line,Set)
<<ThisRef:32/?UI,Line:32/?UI,Set:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmarkersetalpha">external documentation</a>.
--spec markerSetAlpha(This, MarkerNumber, Alpha) -> ok when
+-spec markerSetAlpha(This, MarkerNumber, Alpha) -> 'ok' when
This::wxStyledTextCtrl(), MarkerNumber::integer(), Alpha::integer().
markerSetAlpha(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Alpha)
when is_integer(MarkerNumber),is_integer(Alpha) ->
@@ -694,7 +694,7 @@ markerSetAlpha(#wx_ref{type=ThisT,ref=ThisRef},MarkerNumber,Alpha)
<<ThisRef:32/?UI,MarkerNumber:32/?UI,Alpha:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmargintype">external documentation</a>.
--spec setMarginType(This, Margin, MarginType) -> ok when
+-spec setMarginType(This, Margin, MarginType) -> 'ok' when
This::wxStyledTextCtrl(), Margin::integer(), MarginType::integer().
setMarginType(#wx_ref{type=ThisT,ref=ThisRef},Margin,MarginType)
when is_integer(Margin),is_integer(MarginType) ->
@@ -712,7 +712,7 @@ getMarginType(#wx_ref{type=ThisT,ref=ThisRef},Margin)
<<ThisRef:32/?UI,Margin:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginwidth">external documentation</a>.
--spec setMarginWidth(This, Margin, PixelWidth) -> ok when
+-spec setMarginWidth(This, Margin, PixelWidth) -> 'ok' when
This::wxStyledTextCtrl(), Margin::integer(), PixelWidth::integer().
setMarginWidth(#wx_ref{type=ThisT,ref=ThisRef},Margin,PixelWidth)
when is_integer(Margin),is_integer(PixelWidth) ->
@@ -730,7 +730,7 @@ getMarginWidth(#wx_ref{type=ThisT,ref=ThisRef},Margin)
<<ThisRef:32/?UI,Margin:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginmask">external documentation</a>.
--spec setMarginMask(This, Margin, Mask) -> ok when
+-spec setMarginMask(This, Margin, Mask) -> 'ok' when
This::wxStyledTextCtrl(), Margin::integer(), Mask::integer().
setMarginMask(#wx_ref{type=ThisT,ref=ThisRef},Margin,Mask)
when is_integer(Margin),is_integer(Mask) ->
@@ -748,7 +748,7 @@ getMarginMask(#wx_ref{type=ThisT,ref=ThisRef},Margin)
<<ThisRef:32/?UI,Margin:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginsensitive">external documentation</a>.
--spec setMarginSensitive(This, Margin, Sensitive) -> ok when
+-spec setMarginSensitive(This, Margin, Sensitive) -> 'ok' when
This::wxStyledTextCtrl(), Margin::integer(), Sensitive::boolean().
setMarginSensitive(#wx_ref{type=ThisT,ref=ThisRef},Margin,Sensitive)
when is_integer(Margin),is_boolean(Sensitive) ->
@@ -766,7 +766,7 @@ getMarginSensitive(#wx_ref{type=ThisT,ref=ThisRef},Margin)
<<ThisRef:32/?UI,Margin:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstyleclearall">external documentation</a>.
--spec styleClearAll(This) -> ok when
+-spec styleClearAll(This) -> 'ok' when
This::wxStyledTextCtrl().
styleClearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -774,7 +774,7 @@ styleClearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetforeground">external documentation</a>.
--spec styleSetForeground(This, Style, Fore) -> ok when
+-spec styleSetForeground(This, Style, Fore) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Fore::wx:wx_colour().
styleSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Style,Fore)
when is_integer(Style),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -783,7 +783,7 @@ styleSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Style,Fore)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetbackground">external documentation</a>.
--spec styleSetBackground(This, Style, Back) -> ok when
+-spec styleSetBackground(This, Style, Back) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Back::wx:wx_colour().
styleSetBackground(#wx_ref{type=ThisT,ref=ThisRef},Style,Back)
when is_integer(Style),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -792,7 +792,7 @@ styleSetBackground(#wx_ref{type=ThisT,ref=ThisRef},Style,Back)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetbold">external documentation</a>.
--spec styleSetBold(This, Style, Bold) -> ok when
+-spec styleSetBold(This, Style, Bold) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Bold::boolean().
styleSetBold(#wx_ref{type=ThisT,ref=ThisRef},Style,Bold)
when is_integer(Style),is_boolean(Bold) ->
@@ -801,7 +801,7 @@ styleSetBold(#wx_ref{type=ThisT,ref=ThisRef},Style,Bold)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Bold)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetitalic">external documentation</a>.
--spec styleSetItalic(This, Style, Italic) -> ok when
+-spec styleSetItalic(This, Style, Italic) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Italic::boolean().
styleSetItalic(#wx_ref{type=ThisT,ref=ThisRef},Style,Italic)
when is_integer(Style),is_boolean(Italic) ->
@@ -810,7 +810,7 @@ styleSetItalic(#wx_ref{type=ThisT,ref=ThisRef},Style,Italic)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Italic)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetsize">external documentation</a>.
--spec styleSetSize(This, Style, SizePoints) -> ok when
+-spec styleSetSize(This, Style, SizePoints) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), SizePoints::integer().
styleSetSize(#wx_ref{type=ThisT,ref=ThisRef},Style,SizePoints)
when is_integer(Style),is_integer(SizePoints) ->
@@ -819,7 +819,7 @@ styleSetSize(#wx_ref{type=ThisT,ref=ThisRef},Style,SizePoints)
<<ThisRef:32/?UI,Style:32/?UI,SizePoints:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfacename">external documentation</a>.
--spec styleSetFaceName(This, Style, FontName) -> ok when
+-spec styleSetFaceName(This, Style, FontName) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), FontName::unicode:chardata().
styleSetFaceName(#wx_ref{type=ThisT,ref=ThisRef},Style,FontName)
when is_integer(Style),is_list(FontName) ->
@@ -829,7 +829,7 @@ styleSetFaceName(#wx_ref{type=ThisT,ref=ThisRef},Style,FontName)
<<ThisRef:32/?UI,Style:32/?UI,(byte_size(FontName_UC)):32/?UI,(FontName_UC)/binary, 0:(((8- ((4+byte_size(FontName_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstyleseteolfilled">external documentation</a>.
--spec styleSetEOLFilled(This, Style, Filled) -> ok when
+-spec styleSetEOLFilled(This, Style, Filled) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Filled::boolean().
styleSetEOLFilled(#wx_ref{type=ThisT,ref=ThisRef},Style,Filled)
when is_integer(Style),is_boolean(Filled) ->
@@ -838,7 +838,7 @@ styleSetEOLFilled(#wx_ref{type=ThisT,ref=ThisRef},Style,Filled)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Filled)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstyleresetdefault">external documentation</a>.
--spec styleResetDefault(This) -> ok when
+-spec styleResetDefault(This) -> 'ok' when
This::wxStyledTextCtrl().
styleResetDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -846,7 +846,7 @@ styleResetDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetunderline">external documentation</a>.
--spec styleSetUnderline(This, Style, Underline) -> ok when
+-spec styleSetUnderline(This, Style, Underline) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Underline::boolean().
styleSetUnderline(#wx_ref{type=ThisT,ref=ThisRef},Style,Underline)
when is_integer(Style),is_boolean(Underline) ->
@@ -855,7 +855,7 @@ styleSetUnderline(#wx_ref{type=ThisT,ref=ThisRef},Style,Underline)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Underline)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetcase">external documentation</a>.
--spec styleSetCase(This, Style, CaseForce) -> ok when
+-spec styleSetCase(This, Style, CaseForce) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), CaseForce::integer().
styleSetCase(#wx_ref{type=ThisT,ref=ThisRef},Style,CaseForce)
when is_integer(Style),is_integer(CaseForce) ->
@@ -864,7 +864,7 @@ styleSetCase(#wx_ref{type=ThisT,ref=ThisRef},Style,CaseForce)
<<ThisRef:32/?UI,Style:32/?UI,CaseForce:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesethotspot">external documentation</a>.
--spec styleSetHotSpot(This, Style, Hotspot) -> ok when
+-spec styleSetHotSpot(This, Style, Hotspot) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Hotspot::boolean().
styleSetHotSpot(#wx_ref{type=ThisT,ref=ThisRef},Style,Hotspot)
when is_integer(Style),is_boolean(Hotspot) ->
@@ -873,7 +873,7 @@ styleSetHotSpot(#wx_ref{type=ThisT,ref=ThisRef},Style,Hotspot)
<<ThisRef:32/?UI,Style:32/?UI,(wxe_util:from_bool(Hotspot)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselforeground">external documentation</a>.
--spec setSelForeground(This, UseSetting, Fore) -> ok when
+-spec setSelForeground(This, UseSetting, Fore) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setSelForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -882,7 +882,7 @@ setSelForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselbackground">external documentation</a>.
--spec setSelBackground(This, UseSetting, Back) -> ok when
+-spec setSelBackground(This, UseSetting, Back) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setSelBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -899,7 +899,7 @@ getSelAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselalpha">external documentation</a>.
--spec setSelAlpha(This, Alpha) -> ok when
+-spec setSelAlpha(This, Alpha) -> 'ok' when
This::wxStyledTextCtrl(), Alpha::integer().
setSelAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha)
when is_integer(Alpha) ->
@@ -908,7 +908,7 @@ setSelAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha)
<<ThisRef:32/?UI,Alpha:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretforeground">external documentation</a>.
--spec setCaretForeground(This, Fore) -> ok when
+-spec setCaretForeground(This, Fore) -> 'ok' when
This::wxStyledTextCtrl(), Fore::wx:wx_colour().
setCaretForeground(#wx_ref{type=ThisT,ref=ThisRef},Fore)
when tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -917,7 +917,7 @@ setCaretForeground(#wx_ref{type=ThisT,ref=ThisRef},Fore)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyassign">external documentation</a>.
--spec cmdKeyAssign(This, Key, Modifiers, Cmd) -> ok when
+-spec cmdKeyAssign(This, Key, Modifiers, Cmd) -> 'ok' when
This::wxStyledTextCtrl(), Key::integer(), Modifiers::integer(), Cmd::integer().
cmdKeyAssign(#wx_ref{type=ThisT,ref=ThisRef},Key,Modifiers,Cmd)
when is_integer(Key),is_integer(Modifiers),is_integer(Cmd) ->
@@ -926,7 +926,7 @@ cmdKeyAssign(#wx_ref{type=ThisT,ref=ThisRef},Key,Modifiers,Cmd)
<<ThisRef:32/?UI,Key:32/?UI,Modifiers:32/?UI,Cmd:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyclear">external documentation</a>.
--spec cmdKeyClear(This, Key, Modifiers) -> ok when
+-spec cmdKeyClear(This, Key, Modifiers) -> 'ok' when
This::wxStyledTextCtrl(), Key::integer(), Modifiers::integer().
cmdKeyClear(#wx_ref{type=ThisT,ref=ThisRef},Key,Modifiers)
when is_integer(Key),is_integer(Modifiers) ->
@@ -935,7 +935,7 @@ cmdKeyClear(#wx_ref{type=ThisT,ref=ThisRef},Key,Modifiers)
<<ThisRef:32/?UI,Key:32/?UI,Modifiers:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyclearall">external documentation</a>.
--spec cmdKeyClearAll(This) -> ok when
+-spec cmdKeyClearAll(This) -> 'ok' when
This::wxStyledTextCtrl().
cmdKeyClearAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -952,7 +952,7 @@ setStyleBytes(#wx_ref{type=ThisT,ref=ThisRef},Length)
<<ThisRef:32/?UI,Length:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetvisible">external documentation</a>.
--spec styleSetVisible(This, Style, Visible) -> ok when
+-spec styleSetVisible(This, Style, Visible) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Visible::boolean().
styleSetVisible(#wx_ref{type=ThisT,ref=ThisRef},Style,Visible)
when is_integer(Style),is_boolean(Visible) ->
@@ -969,7 +969,7 @@ getCaretPeriod(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretperiod">external documentation</a>.
--spec setCaretPeriod(This, PeriodMilliseconds) -> ok when
+-spec setCaretPeriod(This, PeriodMilliseconds) -> 'ok' when
This::wxStyledTextCtrl(), PeriodMilliseconds::integer().
setCaretPeriod(#wx_ref{type=ThisT,ref=ThisRef},PeriodMilliseconds)
when is_integer(PeriodMilliseconds) ->
@@ -978,7 +978,7 @@ setCaretPeriod(#wx_ref{type=ThisT,ref=ThisRef},PeriodMilliseconds)
<<ThisRef:32/?UI,PeriodMilliseconds:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwordchars">external documentation</a>.
--spec setWordChars(This, Characters) -> ok when
+-spec setWordChars(This, Characters) -> 'ok' when
This::wxStyledTextCtrl(), Characters::unicode:chardata().
setWordChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
when is_list(Characters) ->
@@ -988,7 +988,7 @@ setWordChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
<<ThisRef:32/?UI,(byte_size(Characters_UC)):32/?UI,(Characters_UC)/binary, 0:(((8- ((0+byte_size(Characters_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlbeginundoaction">external documentation</a>.
--spec beginUndoAction(This) -> ok when
+-spec beginUndoAction(This) -> 'ok' when
This::wxStyledTextCtrl().
beginUndoAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -996,7 +996,7 @@ beginUndoAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlendundoaction">external documentation</a>.
--spec endUndoAction(This) -> ok when
+-spec endUndoAction(This) -> 'ok' when
This::wxStyledTextCtrl().
endUndoAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1004,7 +1004,7 @@ endUndoAction(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlindicatorsetstyle">external documentation</a>.
--spec indicatorSetStyle(This, Indic, Style) -> ok when
+-spec indicatorSetStyle(This, Indic, Style) -> 'ok' when
This::wxStyledTextCtrl(), Indic::integer(), Style::integer().
indicatorSetStyle(#wx_ref{type=ThisT,ref=ThisRef},Indic,Style)
when is_integer(Indic),is_integer(Style) ->
@@ -1022,7 +1022,7 @@ indicatorGetStyle(#wx_ref{type=ThisT,ref=ThisRef},Indic)
<<ThisRef:32/?UI,Indic:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlindicatorsetforeground">external documentation</a>.
--spec indicatorSetForeground(This, Indic, Fore) -> ok when
+-spec indicatorSetForeground(This, Indic, Fore) -> 'ok' when
This::wxStyledTextCtrl(), Indic::integer(), Fore::wx:wx_colour().
indicatorSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Indic,Fore)
when is_integer(Indic),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -1040,7 +1040,7 @@ indicatorGetForeground(#wx_ref{type=ThisT,ref=ThisRef},Indic)
<<ThisRef:32/?UI,Indic:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwhitespaceforeground">external documentation</a>.
--spec setWhitespaceForeground(This, UseSetting, Fore) -> ok when
+-spec setWhitespaceForeground(This, UseSetting, Fore) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setWhitespaceForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -1049,7 +1049,7 @@ setWhitespaceForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwhitespacebackground">external documentation</a>.
--spec setWhitespaceBackground(This, UseSetting, Back) -> ok when
+-spec setWhitespaceBackground(This, UseSetting, Back) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setWhitespaceBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -1066,7 +1066,7 @@ getStyleBits(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlinestate">external documentation</a>.
--spec setLineState(This, Line, State) -> ok when
+-spec setLineState(This, Line, State) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer(), State::integer().
setLineState(#wx_ref{type=ThisT,ref=ThisRef},Line,State)
when is_integer(Line),is_integer(State) ->
@@ -1100,7 +1100,7 @@ getCaretLineVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretlinevisible">external documentation</a>.
--spec setCaretLineVisible(This, Show) -> ok when
+-spec setCaretLineVisible(This, Show) -> 'ok' when
This::wxStyledTextCtrl(), Show::boolean().
setCaretLineVisible(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
@@ -1117,7 +1117,7 @@ getCaretLineBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretlinebackground">external documentation</a>.
--spec setCaretLineBackground(This, Back) -> ok when
+-spec setCaretLineBackground(This, Back) -> 'ok' when
This::wxStyledTextCtrl(), Back::wx:wx_colour().
setCaretLineBackground(#wx_ref{type=ThisT,ref=ThisRef},Back)
when tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -1126,7 +1126,7 @@ setCaretLineBackground(#wx_ref{type=ThisT,ref=ThisRef},Back)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompshow">external documentation</a>.
--spec autoCompShow(This, LenEntered, ItemList) -> ok when
+-spec autoCompShow(This, LenEntered, ItemList) -> 'ok' when
This::wxStyledTextCtrl(), LenEntered::integer(), ItemList::unicode:chardata().
autoCompShow(#wx_ref{type=ThisT,ref=ThisRef},LenEntered,ItemList)
when is_integer(LenEntered),is_list(ItemList) ->
@@ -1136,7 +1136,7 @@ autoCompShow(#wx_ref{type=ThisT,ref=ThisRef},LenEntered,ItemList)
<<ThisRef:32/?UI,LenEntered:32/?UI,(byte_size(ItemList_UC)):32/?UI,(ItemList_UC)/binary, 0:(((8- ((4+byte_size(ItemList_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompcancel">external documentation</a>.
--spec autoCompCancel(This) -> ok when
+-spec autoCompCancel(This) -> 'ok' when
This::wxStyledTextCtrl().
autoCompCancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1160,7 +1160,7 @@ autoCompPosStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompcomplete">external documentation</a>.
--spec autoCompComplete(This) -> ok when
+-spec autoCompComplete(This) -> 'ok' when
This::wxStyledTextCtrl().
autoCompComplete(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1168,7 +1168,7 @@ autoCompComplete(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompstops">external documentation</a>.
--spec autoCompStops(This, CharacterSet) -> ok when
+-spec autoCompStops(This, CharacterSet) -> 'ok' when
This::wxStyledTextCtrl(), CharacterSet::unicode:chardata().
autoCompStops(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
when is_list(CharacterSet) ->
@@ -1178,7 +1178,7 @@ autoCompStops(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
<<ThisRef:32/?UI,(byte_size(CharacterSet_UC)):32/?UI,(CharacterSet_UC)/binary, 0:(((8- ((0+byte_size(CharacterSet_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetseparator">external documentation</a>.
--spec autoCompSetSeparator(This, SeparatorCharacter) -> ok when
+-spec autoCompSetSeparator(This, SeparatorCharacter) -> 'ok' when
This::wxStyledTextCtrl(), SeparatorCharacter::integer().
autoCompSetSeparator(#wx_ref{type=ThisT,ref=ThisRef},SeparatorCharacter)
when is_integer(SeparatorCharacter) ->
@@ -1195,7 +1195,7 @@ autoCompGetSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompselect">external documentation</a>.
--spec autoCompSelect(This, Text) -> ok when
+-spec autoCompSelect(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::unicode:chardata().
autoCompSelect(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -1205,7 +1205,7 @@ autoCompSelect(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetcancelatstart">external documentation</a>.
--spec autoCompSetCancelAtStart(This, Cancel) -> ok when
+-spec autoCompSetCancelAtStart(This, Cancel) -> 'ok' when
This::wxStyledTextCtrl(), Cancel::boolean().
autoCompSetCancelAtStart(#wx_ref{type=ThisT,ref=ThisRef},Cancel)
when is_boolean(Cancel) ->
@@ -1222,7 +1222,7 @@ autoCompGetCancelAtStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetfillups">external documentation</a>.
--spec autoCompSetFillUps(This, CharacterSet) -> ok when
+-spec autoCompSetFillUps(This, CharacterSet) -> 'ok' when
This::wxStyledTextCtrl(), CharacterSet::unicode:chardata().
autoCompSetFillUps(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
when is_list(CharacterSet) ->
@@ -1232,7 +1232,7 @@ autoCompSetFillUps(#wx_ref{type=ThisT,ref=ThisRef},CharacterSet)
<<ThisRef:32/?UI,(byte_size(CharacterSet_UC)):32/?UI,(CharacterSet_UC)/binary, 0:(((8- ((0+byte_size(CharacterSet_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetchoosesingle">external documentation</a>.
--spec autoCompSetChooseSingle(This, ChooseSingle) -> ok when
+-spec autoCompSetChooseSingle(This, ChooseSingle) -> 'ok' when
This::wxStyledTextCtrl(), ChooseSingle::boolean().
autoCompSetChooseSingle(#wx_ref{type=ThisT,ref=ThisRef},ChooseSingle)
when is_boolean(ChooseSingle) ->
@@ -1249,7 +1249,7 @@ autoCompGetChooseSingle(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetignorecase">external documentation</a>.
--spec autoCompSetIgnoreCase(This, IgnoreCase) -> ok when
+-spec autoCompSetIgnoreCase(This, IgnoreCase) -> 'ok' when
This::wxStyledTextCtrl(), IgnoreCase::boolean().
autoCompSetIgnoreCase(#wx_ref{type=ThisT,ref=ThisRef},IgnoreCase)
when is_boolean(IgnoreCase) ->
@@ -1266,7 +1266,7 @@ autoCompGetIgnoreCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrluserlistshow">external documentation</a>.
--spec userListShow(This, ListType, ItemList) -> ok when
+-spec userListShow(This, ListType, ItemList) -> 'ok' when
This::wxStyledTextCtrl(), ListType::integer(), ItemList::unicode:chardata().
userListShow(#wx_ref{type=ThisT,ref=ThisRef},ListType,ItemList)
when is_integer(ListType),is_list(ItemList) ->
@@ -1276,7 +1276,7 @@ userListShow(#wx_ref{type=ThisT,ref=ThisRef},ListType,ItemList)
<<ThisRef:32/?UI,ListType:32/?UI,(byte_size(ItemList_UC)):32/?UI,(ItemList_UC)/binary, 0:(((8- ((4+byte_size(ItemList_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetautohide">external documentation</a>.
--spec autoCompSetAutoHide(This, AutoHide) -> ok when
+-spec autoCompSetAutoHide(This, AutoHide) -> 'ok' when
This::wxStyledTextCtrl(), AutoHide::boolean().
autoCompSetAutoHide(#wx_ref{type=ThisT,ref=ThisRef},AutoHide)
when is_boolean(AutoHide) ->
@@ -1293,7 +1293,7 @@ autoCompGetAutoHide(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetdroprestofword">external documentation</a>.
--spec autoCompSetDropRestOfWord(This, DropRestOfWord) -> ok when
+-spec autoCompSetDropRestOfWord(This, DropRestOfWord) -> 'ok' when
This::wxStyledTextCtrl(), DropRestOfWord::boolean().
autoCompSetDropRestOfWord(#wx_ref{type=ThisT,ref=ThisRef},DropRestOfWord)
when is_boolean(DropRestOfWord) ->
@@ -1310,7 +1310,7 @@ autoCompGetDropRestOfWord(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlregisterimage">external documentation</a>.
--spec registerImage(This, Type, Bmp) -> ok when
+-spec registerImage(This, Type, Bmp) -> 'ok' when
This::wxStyledTextCtrl(), Type::integer(), Bmp::wxBitmap:wxBitmap().
registerImage(#wx_ref{type=ThisT,ref=ThisRef},Type,#wx_ref{type=BmpT,ref=BmpRef})
when is_integer(Type) ->
@@ -1320,7 +1320,7 @@ registerImage(#wx_ref{type=ThisT,ref=ThisRef},Type,#wx_ref{type=BmpT,ref=BmpRef}
<<ThisRef:32/?UI,Type:32/?UI,BmpRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlclearregisteredimages">external documentation</a>.
--spec clearRegisteredImages(This) -> ok when
+-spec clearRegisteredImages(This) -> 'ok' when
This::wxStyledTextCtrl().
clearRegisteredImages(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1336,7 +1336,7 @@ autoCompGetTypeSeparator(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsettypeseparator">external documentation</a>.
--spec autoCompSetTypeSeparator(This, SeparatorCharacter) -> ok when
+-spec autoCompSetTypeSeparator(This, SeparatorCharacter) -> 'ok' when
This::wxStyledTextCtrl(), SeparatorCharacter::integer().
autoCompSetTypeSeparator(#wx_ref{type=ThisT,ref=ThisRef},SeparatorCharacter)
when is_integer(SeparatorCharacter) ->
@@ -1345,7 +1345,7 @@ autoCompSetTypeSeparator(#wx_ref{type=ThisT,ref=ThisRef},SeparatorCharacter)
<<ThisRef:32/?UI,SeparatorCharacter:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetmaxwidth">external documentation</a>.
--spec autoCompSetMaxWidth(This, CharacterCount) -> ok when
+-spec autoCompSetMaxWidth(This, CharacterCount) -> 'ok' when
This::wxStyledTextCtrl(), CharacterCount::integer().
autoCompSetMaxWidth(#wx_ref{type=ThisT,ref=ThisRef},CharacterCount)
when is_integer(CharacterCount) ->
@@ -1362,7 +1362,7 @@ autoCompGetMaxWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlautocompsetmaxheight">external documentation</a>.
--spec autoCompSetMaxHeight(This, RowCount) -> ok when
+-spec autoCompSetMaxHeight(This, RowCount) -> 'ok' when
This::wxStyledTextCtrl(), RowCount::integer().
autoCompSetMaxHeight(#wx_ref{type=ThisT,ref=ThisRef},RowCount)
when is_integer(RowCount) ->
@@ -1379,7 +1379,7 @@ autoCompGetMaxHeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetindent">external documentation</a>.
--spec setIndent(This, IndentSize) -> ok when
+-spec setIndent(This, IndentSize) -> 'ok' when
This::wxStyledTextCtrl(), IndentSize::integer().
setIndent(#wx_ref{type=ThisT,ref=ThisRef},IndentSize)
when is_integer(IndentSize) ->
@@ -1396,7 +1396,7 @@ getIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetusetabs">external documentation</a>.
--spec setUseTabs(This, UseTabs) -> ok when
+-spec setUseTabs(This, UseTabs) -> 'ok' when
This::wxStyledTextCtrl(), UseTabs::boolean().
setUseTabs(#wx_ref{type=ThisT,ref=ThisRef},UseTabs)
when is_boolean(UseTabs) ->
@@ -1413,7 +1413,7 @@ getUseTabs(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlineindentation">external documentation</a>.
--spec setLineIndentation(This, Line, IndentSize) -> ok when
+-spec setLineIndentation(This, Line, IndentSize) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer(), IndentSize::integer().
setLineIndentation(#wx_ref{type=ThisT,ref=ThisRef},Line,IndentSize)
when is_integer(Line),is_integer(IndentSize) ->
@@ -1449,7 +1449,7 @@ getColumn(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetusehorizontalscrollbar">external documentation</a>.
--spec setUseHorizontalScrollBar(This, Show) -> ok when
+-spec setUseHorizontalScrollBar(This, Show) -> 'ok' when
This::wxStyledTextCtrl(), Show::boolean().
setUseHorizontalScrollBar(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
@@ -1466,7 +1466,7 @@ getUseHorizontalScrollBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetindentationguides">external documentation</a>.
--spec setIndentationGuides(This, Show) -> ok when
+-spec setIndentationGuides(This, Show) -> 'ok' when
This::wxStyledTextCtrl(), Show::boolean().
setIndentationGuides(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
@@ -1483,7 +1483,7 @@ getIndentationGuides(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsethighlightguide">external documentation</a>.
--spec setHighlightGuide(This, Column) -> ok when
+-spec setHighlightGuide(This, Column) -> 'ok' when
This::wxStyledTextCtrl(), Column::integer().
setHighlightGuide(#wx_ref{type=ThisT,ref=ThisRef},Column)
when is_integer(Column) ->
@@ -1533,7 +1533,7 @@ getReadOnly(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcurrentpos">external documentation</a>.
--spec setCurrentPos(This, Pos) -> ok when
+-spec setCurrentPos(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
setCurrentPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -1542,7 +1542,7 @@ setCurrentPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselectionstart">external documentation</a>.
--spec setSelectionStart(This, Pos) -> ok when
+-spec setSelectionStart(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
setSelectionStart(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -1559,7 +1559,7 @@ getSelectionStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselectionend">external documentation</a>.
--spec setSelectionEnd(This, Pos) -> ok when
+-spec setSelectionEnd(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
setSelectionEnd(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -1576,7 +1576,7 @@ getSelectionEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetprintmagnification">external documentation</a>.
--spec setPrintMagnification(This, Magnification) -> ok when
+-spec setPrintMagnification(This, Magnification) -> 'ok' when
This::wxStyledTextCtrl(), Magnification::integer().
setPrintMagnification(#wx_ref{type=ThisT,ref=ThisRef},Magnification)
when is_integer(Magnification) ->
@@ -1593,7 +1593,7 @@ getPrintMagnification(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetprintcolourmode">external documentation</a>.
--spec setPrintColourMode(This, Mode) -> ok when
+-spec setPrintColourMode(This, Mode) -> 'ok' when
This::wxStyledTextCtrl(), Mode::integer().
setPrintColourMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -1620,7 +1620,7 @@ findText(This,MinPos,MaxPos,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlfindtext">external documentation</a>.
-spec findText(This, MinPos, MaxPos, Text, [Option]) -> integer() when
This::wxStyledTextCtrl(), MinPos::integer(), MaxPos::integer(), Text::unicode:chardata(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
findText(#wx_ref{type=ThisT,ref=ThisRef},MinPos,MaxPos,Text, Options)
when is_integer(MinPos),is_integer(MaxPos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1668,7 +1668,7 @@ getLineCount(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginleft">external documentation</a>.
--spec setMarginLeft(This, PixelWidth) -> ok when
+-spec setMarginLeft(This, PixelWidth) -> 'ok' when
This::wxStyledTextCtrl(), PixelWidth::integer().
setMarginLeft(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
@@ -1685,7 +1685,7 @@ getMarginLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmarginright">external documentation</a>.
--spec setMarginRight(This, PixelWidth) -> ok when
+-spec setMarginRight(This, PixelWidth) -> 'ok' when
This::wxStyledTextCtrl(), PixelWidth::integer().
setMarginRight(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
@@ -1710,7 +1710,7 @@ getModify(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselection">external documentation</a>.
--spec setSelection(This, Start, End) -> ok when
+-spec setSelection(This, Start, End) -> 'ok' when
This::wxStyledTextCtrl(), Start::integer(), End::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
@@ -1736,7 +1736,7 @@ getTextRange(#wx_ref{type=ThisT,ref=ThisRef},StartPos,EndPos)
<<ThisRef:32/?UI,StartPos:32/?UI,EndPos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhideselection">external documentation</a>.
--spec hideSelection(This, Normal) -> ok when
+-spec hideSelection(This, Normal) -> 'ok' when
This::wxStyledTextCtrl(), Normal::boolean().
hideSelection(#wx_ref{type=ThisT,ref=ThisRef},Normal)
when is_boolean(Normal) ->
@@ -1763,7 +1763,7 @@ positionFromLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinescroll">external documentation</a>.
--spec lineScroll(This, Columns, Lines) -> ok when
+-spec lineScroll(This, Columns, Lines) -> 'ok' when
This::wxStyledTextCtrl(), Columns::integer(), Lines::integer().
lineScroll(#wx_ref{type=ThisT,ref=ThisRef},Columns,Lines)
when is_integer(Columns),is_integer(Lines) ->
@@ -1772,7 +1772,7 @@ lineScroll(#wx_ref{type=ThisT,ref=ThisRef},Columns,Lines)
<<ThisRef:32/?UI,Columns:32/?UI,Lines:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlensurecaretvisible">external documentation</a>.
--spec ensureCaretVisible(This) -> ok when
+-spec ensureCaretVisible(This) -> 'ok' when
This::wxStyledTextCtrl().
ensureCaretVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1780,7 +1780,7 @@ ensureCaretVisible(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlreplaceselection">external documentation</a>.
--spec replaceSelection(This, Text) -> ok when
+-spec replaceSelection(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::unicode:chardata().
replaceSelection(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -1790,7 +1790,7 @@ replaceSelection(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetreadonly">external documentation</a>.
--spec setReadOnly(This, ReadOnly) -> ok when
+-spec setReadOnly(This, ReadOnly) -> 'ok' when
This::wxStyledTextCtrl(), ReadOnly::boolean().
setReadOnly(#wx_ref{type=ThisT,ref=ThisRef},ReadOnly)
when is_boolean(ReadOnly) ->
@@ -1815,7 +1815,7 @@ canUndo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlemptyundobuffer">external documentation</a>.
--spec emptyUndoBuffer(This) -> ok when
+-spec emptyUndoBuffer(This) -> 'ok' when
This::wxStyledTextCtrl().
emptyUndoBuffer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1823,7 +1823,7 @@ emptyUndoBuffer(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlundo">external documentation</a>.
--spec undo(This) -> ok when
+-spec undo(This) -> 'ok' when
This::wxStyledTextCtrl().
undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1831,7 +1831,7 @@ undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcut">external documentation</a>.
--spec cut(This) -> ok when
+-spec cut(This) -> 'ok' when
This::wxStyledTextCtrl().
cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1839,7 +1839,7 @@ cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcopy">external documentation</a>.
--spec copy(This) -> ok when
+-spec copy(This) -> 'ok' when
This::wxStyledTextCtrl().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1847,7 +1847,7 @@ copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpaste">external documentation</a>.
--spec paste(This) -> ok when
+-spec paste(This) -> 'ok' when
This::wxStyledTextCtrl().
paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1855,7 +1855,7 @@ paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxStyledTextCtrl().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -1863,7 +1863,7 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettext">external documentation</a>.
--spec setText(This, Text) -> ok when
+-spec setText(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -1897,7 +1897,7 @@ getOvertype(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretwidth">external documentation</a>.
--spec setCaretWidth(This, PixelWidth) -> ok when
+-spec setCaretWidth(This, PixelWidth) -> 'ok' when
This::wxStyledTextCtrl(), PixelWidth::integer().
setCaretWidth(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
@@ -1914,7 +1914,7 @@ getCaretWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettargetstart">external documentation</a>.
--spec setTargetStart(This, Pos) -> ok when
+-spec setTargetStart(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
setTargetStart(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -1931,7 +1931,7 @@ getTargetStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettargetend">external documentation</a>.
--spec setTargetEnd(This, Pos) -> ok when
+-spec setTargetEnd(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
setTargetEnd(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -1968,7 +1968,7 @@ searchInTarget(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetsearchflags">external documentation</a>.
--spec setSearchFlags(This, Flags) -> ok when
+-spec setSearchFlags(This, Flags) -> 'ok' when
This::wxStyledTextCtrl(), Flags::integer().
setSearchFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -1985,7 +1985,7 @@ getSearchFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipshow">external documentation</a>.
--spec callTipShow(This, Pos, Definition) -> ok when
+-spec callTipShow(This, Pos, Definition) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer(), Definition::unicode:chardata().
callTipShow(#wx_ref{type=ThisT,ref=ThisRef},Pos,Definition)
when is_integer(Pos),is_list(Definition) ->
@@ -1995,7 +1995,7 @@ callTipShow(#wx_ref{type=ThisT,ref=ThisRef},Pos,Definition)
<<ThisRef:32/?UI,Pos:32/?UI,(byte_size(Definition_UC)):32/?UI,(Definition_UC)/binary, 0:(((8- ((4+byte_size(Definition_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipcancel">external documentation</a>.
--spec callTipCancel(This) -> ok when
+-spec callTipCancel(This) -> 'ok' when
This::wxStyledTextCtrl().
callTipCancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2019,7 +2019,7 @@ callTipPosAtStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsethighlight">external documentation</a>.
--spec callTipSetHighlight(This, Start, End) -> ok when
+-spec callTipSetHighlight(This, Start, End) -> 'ok' when
This::wxStyledTextCtrl(), Start::integer(), End::integer().
callTipSetHighlight(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
@@ -2028,7 +2028,7 @@ callTipSetHighlight(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsetbackground">external documentation</a>.
--spec callTipSetBackground(This, Back) -> ok when
+-spec callTipSetBackground(This, Back) -> 'ok' when
This::wxStyledTextCtrl(), Back::wx:wx_colour().
callTipSetBackground(#wx_ref{type=ThisT,ref=ThisRef},Back)
when tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -2037,7 +2037,7 @@ callTipSetBackground(#wx_ref{type=ThisT,ref=ThisRef},Back)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsetforeground">external documentation</a>.
--spec callTipSetForeground(This, Fore) -> ok when
+-spec callTipSetForeground(This, Fore) -> 'ok' when
This::wxStyledTextCtrl(), Fore::wx:wx_colour().
callTipSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Fore)
when tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -2046,7 +2046,7 @@ callTipSetForeground(#wx_ref{type=ThisT,ref=ThisRef},Fore)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipsetforegroundhighlight">external documentation</a>.
--spec callTipSetForegroundHighlight(This, Fore) -> ok when
+-spec callTipSetForegroundHighlight(This, Fore) -> 'ok' when
This::wxStyledTextCtrl(), Fore::wx:wx_colour().
callTipSetForegroundHighlight(#wx_ref{type=ThisT,ref=ThisRef},Fore)
when tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -2055,7 +2055,7 @@ callTipSetForegroundHighlight(#wx_ref{type=ThisT,ref=ThisRef},Fore)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcalltipusestyle">external documentation</a>.
--spec callTipUseStyle(This, TabSize) -> ok when
+-spec callTipUseStyle(This, TabSize) -> 'ok' when
This::wxStyledTextCtrl(), TabSize::integer().
callTipUseStyle(#wx_ref{type=ThisT,ref=ThisRef},TabSize)
when is_integer(TabSize) ->
@@ -2091,7 +2091,7 @@ wrapCount(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldlevel">external documentation</a>.
--spec setFoldLevel(This, Line, Level) -> ok when
+-spec setFoldLevel(This, Line, Level) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer(), Level::integer().
setFoldLevel(#wx_ref{type=ThisT,ref=ThisRef},Line,Level)
when is_integer(Line),is_integer(Level) ->
@@ -2127,7 +2127,7 @@ getFoldParent(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlshowlines">external documentation</a>.
--spec showLines(This, LineStart, LineEnd) -> ok when
+-spec showLines(This, LineStart, LineEnd) -> 'ok' when
This::wxStyledTextCtrl(), LineStart::integer(), LineEnd::integer().
showLines(#wx_ref{type=ThisT,ref=ThisRef},LineStart,LineEnd)
when is_integer(LineStart),is_integer(LineEnd) ->
@@ -2136,7 +2136,7 @@ showLines(#wx_ref{type=ThisT,ref=ThisRef},LineStart,LineEnd)
<<ThisRef:32/?UI,LineStart:32/?UI,LineEnd:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhidelines">external documentation</a>.
--spec hideLines(This, LineStart, LineEnd) -> ok when
+-spec hideLines(This, LineStart, LineEnd) -> 'ok' when
This::wxStyledTextCtrl(), LineStart::integer(), LineEnd::integer().
hideLines(#wx_ref{type=ThisT,ref=ThisRef},LineStart,LineEnd)
when is_integer(LineStart),is_integer(LineEnd) ->
@@ -2154,7 +2154,7 @@ getLineVisible(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldexpanded">external documentation</a>.
--spec setFoldExpanded(This, Line, Expanded) -> ok when
+-spec setFoldExpanded(This, Line, Expanded) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer(), Expanded::boolean().
setFoldExpanded(#wx_ref{type=ThisT,ref=ThisRef},Line,Expanded)
when is_integer(Line),is_boolean(Expanded) ->
@@ -2172,7 +2172,7 @@ getFoldExpanded(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrltogglefold">external documentation</a>.
--spec toggleFold(This, Line) -> ok when
+-spec toggleFold(This, Line) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer().
toggleFold(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
@@ -2181,7 +2181,7 @@ toggleFold(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlensurevisible">external documentation</a>.
--spec ensureVisible(This, Line) -> ok when
+-spec ensureVisible(This, Line) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer().
ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
@@ -2190,7 +2190,7 @@ ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldflags">external documentation</a>.
--spec setFoldFlags(This, Flags) -> ok when
+-spec setFoldFlags(This, Flags) -> 'ok' when
This::wxStyledTextCtrl(), Flags::integer().
setFoldFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -2199,7 +2199,7 @@ setFoldFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
<<ThisRef:32/?UI,Flags:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlensurevisibleenforcepolicy">external documentation</a>.
--spec ensureVisibleEnforcePolicy(This, Line) -> ok when
+-spec ensureVisibleEnforcePolicy(This, Line) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer().
ensureVisibleEnforcePolicy(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
@@ -2208,7 +2208,7 @@ ensureVisibleEnforcePolicy(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettabindents">external documentation</a>.
--spec setTabIndents(This, TabIndents) -> ok when
+-spec setTabIndents(This, TabIndents) -> 'ok' when
This::wxStyledTextCtrl(), TabIndents::boolean().
setTabIndents(#wx_ref{type=ThisT,ref=ThisRef},TabIndents)
when is_boolean(TabIndents) ->
@@ -2225,7 +2225,7 @@ getTabIndents(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetbackspaceunindents">external documentation</a>.
--spec setBackSpaceUnIndents(This, BsUnIndents) -> ok when
+-spec setBackSpaceUnIndents(This, BsUnIndents) -> 'ok' when
This::wxStyledTextCtrl(), BsUnIndents::boolean().
setBackSpaceUnIndents(#wx_ref{type=ThisT,ref=ThisRef},BsUnIndents)
when is_boolean(BsUnIndents) ->
@@ -2242,7 +2242,7 @@ getBackSpaceUnIndents(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmousedwelltime">external documentation</a>.
--spec setMouseDwellTime(This, PeriodMilliseconds) -> ok when
+-spec setMouseDwellTime(This, PeriodMilliseconds) -> 'ok' when
This::wxStyledTextCtrl(), PeriodMilliseconds::integer().
setMouseDwellTime(#wx_ref{type=ThisT,ref=ThisRef},PeriodMilliseconds)
when is_integer(PeriodMilliseconds) ->
@@ -2277,7 +2277,7 @@ wordEndPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos,OnlyWordCharacters)
<<ThisRef:32/?UI,Pos:32/?UI,(wxe_util:from_bool(OnlyWordCharacters)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapmode">external documentation</a>.
--spec setWrapMode(This, Mode) -> ok when
+-spec setWrapMode(This, Mode) -> 'ok' when
This::wxStyledTextCtrl(), Mode::integer().
setWrapMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -2294,7 +2294,7 @@ getWrapMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapvisualflags">external documentation</a>.
--spec setWrapVisualFlags(This, WrapVisualFlags) -> ok when
+-spec setWrapVisualFlags(This, WrapVisualFlags) -> 'ok' when
This::wxStyledTextCtrl(), WrapVisualFlags::integer().
setWrapVisualFlags(#wx_ref{type=ThisT,ref=ThisRef},WrapVisualFlags)
when is_integer(WrapVisualFlags) ->
@@ -2311,7 +2311,7 @@ getWrapVisualFlags(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapvisualflagslocation">external documentation</a>.
--spec setWrapVisualFlagsLocation(This, WrapVisualFlagsLocation) -> ok when
+-spec setWrapVisualFlagsLocation(This, WrapVisualFlagsLocation) -> 'ok' when
This::wxStyledTextCtrl(), WrapVisualFlagsLocation::integer().
setWrapVisualFlagsLocation(#wx_ref{type=ThisT,ref=ThisRef},WrapVisualFlagsLocation)
when is_integer(WrapVisualFlagsLocation) ->
@@ -2328,7 +2328,7 @@ getWrapVisualFlagsLocation(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwrapstartindent">external documentation</a>.
--spec setWrapStartIndent(This, Indent) -> ok when
+-spec setWrapStartIndent(This, Indent) -> 'ok' when
This::wxStyledTextCtrl(), Indent::integer().
setWrapStartIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
when is_integer(Indent) ->
@@ -2345,7 +2345,7 @@ getWrapStartIndent(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlayoutcache">external documentation</a>.
--spec setLayoutCache(This, Mode) -> ok when
+-spec setLayoutCache(This, Mode) -> 'ok' when
This::wxStyledTextCtrl(), Mode::integer().
setLayoutCache(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -2362,7 +2362,7 @@ getLayoutCache(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetscrollwidth">external documentation</a>.
--spec setScrollWidth(This, PixelWidth) -> ok when
+-spec setScrollWidth(This, PixelWidth) -> 'ok' when
This::wxStyledTextCtrl(), PixelWidth::integer().
setScrollWidth(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
@@ -2406,7 +2406,7 @@ textHeight(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetuseverticalscrollbar">external documentation</a>.
--spec setUseVerticalScrollBar(This, Show) -> ok when
+-spec setUseVerticalScrollBar(This, Show) -> 'ok' when
This::wxStyledTextCtrl(), Show::boolean().
setUseVerticalScrollBar(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
@@ -2423,7 +2423,7 @@ getUseVerticalScrollBar(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlappendtext">external documentation</a>.
--spec appendText(This, Text) -> ok when
+-spec appendText(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::unicode:chardata().
appendText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -2441,7 +2441,7 @@ getTwoPhaseDraw(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettwophasedraw">external documentation</a>.
--spec setTwoPhaseDraw(This, TwoPhase) -> ok when
+-spec setTwoPhaseDraw(This, TwoPhase) -> 'ok' when
This::wxStyledTextCtrl(), TwoPhase::boolean().
setTwoPhaseDraw(#wx_ref{type=ThisT,ref=ThisRef},TwoPhase)
when is_boolean(TwoPhase) ->
@@ -2450,7 +2450,7 @@ setTwoPhaseDraw(#wx_ref{type=ThisT,ref=ThisRef},TwoPhase)
<<ThisRef:32/?UI,(wxe_util:from_bool(TwoPhase)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrltargetfromselection">external documentation</a>.
--spec targetFromSelection(This) -> ok when
+-spec targetFromSelection(This) -> 'ok' when
This::wxStyledTextCtrl().
targetFromSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2458,7 +2458,7 @@ targetFromSelection(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinesjoin">external documentation</a>.
--spec linesJoin(This) -> ok when
+-spec linesJoin(This) -> 'ok' when
This::wxStyledTextCtrl().
linesJoin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2466,7 +2466,7 @@ linesJoin(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinessplit">external documentation</a>.
--spec linesSplit(This, PixelWidth) -> ok when
+-spec linesSplit(This, PixelWidth) -> 'ok' when
This::wxStyledTextCtrl(), PixelWidth::integer().
linesSplit(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
when is_integer(PixelWidth) ->
@@ -2475,7 +2475,7 @@ linesSplit(#wx_ref{type=ThisT,ref=ThisRef},PixelWidth)
<<ThisRef:32/?UI,PixelWidth:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldmargincolour">external documentation</a>.
--spec setFoldMarginColour(This, UseSetting, Back) -> ok when
+-spec setFoldMarginColour(This, UseSetting, Back) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setFoldMarginColour(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -2484,7 +2484,7 @@ setFoldMarginColour(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetfoldmarginhicolour">external documentation</a>.
--spec setFoldMarginHiColour(This, UseSetting, Fore) -> ok when
+-spec setFoldMarginHiColour(This, UseSetting, Fore) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setFoldMarginHiColour(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -2493,7 +2493,7 @@ setFoldMarginHiColour(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinedown">external documentation</a>.
--spec lineDown(This) -> ok when
+-spec lineDown(This) -> 'ok' when
This::wxStyledTextCtrl().
lineDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2501,7 +2501,7 @@ lineDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinedownextend">external documentation</a>.
--spec lineDownExtend(This) -> ok when
+-spec lineDownExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2509,7 +2509,7 @@ lineDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineup">external documentation</a>.
--spec lineUp(This) -> ok when
+-spec lineUp(This) -> 'ok' when
This::wxStyledTextCtrl().
lineUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2517,7 +2517,7 @@ lineUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineupextend">external documentation</a>.
--spec lineUpExtend(This) -> ok when
+-spec lineUpExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2525,7 +2525,7 @@ lineUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcharleft">external documentation</a>.
--spec charLeft(This) -> ok when
+-spec charLeft(This) -> 'ok' when
This::wxStyledTextCtrl().
charLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2533,7 +2533,7 @@ charLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcharleftextend">external documentation</a>.
--spec charLeftExtend(This) -> ok when
+-spec charLeftExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
charLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2541,7 +2541,7 @@ charLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcharright">external documentation</a>.
--spec charRight(This) -> ok when
+-spec charRight(This) -> 'ok' when
This::wxStyledTextCtrl().
charRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2549,7 +2549,7 @@ charRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcharrightextend">external documentation</a>.
--spec charRightExtend(This) -> ok when
+-spec charRightExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
charRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2557,7 +2557,7 @@ charRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleft">external documentation</a>.
--spec wordLeft(This) -> ok when
+-spec wordLeft(This) -> 'ok' when
This::wxStyledTextCtrl().
wordLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2565,7 +2565,7 @@ wordLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleftextend">external documentation</a>.
--spec wordLeftExtend(This) -> ok when
+-spec wordLeftExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
wordLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2573,7 +2573,7 @@ wordLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordright">external documentation</a>.
--spec wordRight(This) -> ok when
+-spec wordRight(This) -> 'ok' when
This::wxStyledTextCtrl().
wordRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2581,7 +2581,7 @@ wordRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordrightextend">external documentation</a>.
--spec wordRightExtend(This) -> ok when
+-spec wordRightExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
wordRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2589,7 +2589,7 @@ wordRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhome">external documentation</a>.
--spec home(This) -> ok when
+-spec home(This) -> 'ok' when
This::wxStyledTextCtrl().
home(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2597,7 +2597,7 @@ home(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhomeextend">external documentation</a>.
--spec homeExtend(This) -> ok when
+-spec homeExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
homeExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2605,7 +2605,7 @@ homeExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineend">external documentation</a>.
--spec lineEnd(This) -> ok when
+-spec lineEnd(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2613,7 +2613,7 @@ lineEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineendextend">external documentation</a>.
--spec lineEndExtend(This) -> ok when
+-spec lineEndExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2621,7 +2621,7 @@ lineEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentstart">external documentation</a>.
--spec documentStart(This) -> ok when
+-spec documentStart(This) -> 'ok' when
This::wxStyledTextCtrl().
documentStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2629,7 +2629,7 @@ documentStart(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentstartextend">external documentation</a>.
--spec documentStartExtend(This) -> ok when
+-spec documentStartExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
documentStartExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2637,7 +2637,7 @@ documentStartExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentend">external documentation</a>.
--spec documentEnd(This) -> ok when
+-spec documentEnd(This) -> 'ok' when
This::wxStyledTextCtrl().
documentEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2645,7 +2645,7 @@ documentEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldocumentendextend">external documentation</a>.
--spec documentEndExtend(This) -> ok when
+-spec documentEndExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
documentEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2653,7 +2653,7 @@ documentEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpageup">external documentation</a>.
--spec pageUp(This) -> ok when
+-spec pageUp(This) -> 'ok' when
This::wxStyledTextCtrl().
pageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2661,7 +2661,7 @@ pageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpageupextend">external documentation</a>.
--spec pageUpExtend(This) -> ok when
+-spec pageUpExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
pageUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2669,7 +2669,7 @@ pageUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpagedown">external documentation</a>.
--spec pageDown(This) -> ok when
+-spec pageDown(This) -> 'ok' when
This::wxStyledTextCtrl().
pageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2677,7 +2677,7 @@ pageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpagedownextend">external documentation</a>.
--spec pageDownExtend(This) -> ok when
+-spec pageDownExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
pageDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2685,7 +2685,7 @@ pageDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrledittoggleovertype">external documentation</a>.
--spec editToggleOvertype(This) -> ok when
+-spec editToggleOvertype(This) -> 'ok' when
This::wxStyledTextCtrl().
editToggleOvertype(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2693,7 +2693,7 @@ editToggleOvertype(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcancel">external documentation</a>.
--spec cancel(This) -> ok when
+-spec cancel(This) -> 'ok' when
This::wxStyledTextCtrl().
cancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2701,7 +2701,7 @@ cancel(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldeleteback">external documentation</a>.
--spec deleteBack(This) -> ok when
+-spec deleteBack(This) -> 'ok' when
This::wxStyledTextCtrl().
deleteBack(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2709,7 +2709,7 @@ deleteBack(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrltab">external documentation</a>.
--spec tab(This) -> ok when
+-spec tab(This) -> 'ok' when
This::wxStyledTextCtrl().
tab(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2717,7 +2717,7 @@ tab(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlbacktab">external documentation</a>.
--spec backTab(This) -> ok when
+-spec backTab(This) -> 'ok' when
This::wxStyledTextCtrl().
backTab(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2725,7 +2725,7 @@ backTab(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlnewline">external documentation</a>.
--spec newLine(This) -> ok when
+-spec newLine(This) -> 'ok' when
This::wxStyledTextCtrl().
newLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2733,7 +2733,7 @@ newLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlformfeed">external documentation</a>.
--spec formFeed(This) -> ok when
+-spec formFeed(This) -> 'ok' when
This::wxStyledTextCtrl().
formFeed(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2741,7 +2741,7 @@ formFeed(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlvchome">external documentation</a>.
--spec vCHome(This) -> ok when
+-spec vCHome(This) -> 'ok' when
This::wxStyledTextCtrl().
vCHome(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2749,7 +2749,7 @@ vCHome(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomeextend">external documentation</a>.
--spec vCHomeExtend(This) -> ok when
+-spec vCHomeExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
vCHomeExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2757,7 +2757,7 @@ vCHomeExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlzoomin">external documentation</a>.
--spec zoomIn(This) -> ok when
+-spec zoomIn(This) -> 'ok' when
This::wxStyledTextCtrl().
zoomIn(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2765,7 +2765,7 @@ zoomIn(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlzoomout">external documentation</a>.
--spec zoomOut(This) -> ok when
+-spec zoomOut(This) -> 'ok' when
This::wxStyledTextCtrl().
zoomOut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2773,7 +2773,7 @@ zoomOut(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldelwordleft">external documentation</a>.
--spec delWordLeft(This) -> ok when
+-spec delWordLeft(This) -> 'ok' when
This::wxStyledTextCtrl().
delWordLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2781,7 +2781,7 @@ delWordLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldelwordright">external documentation</a>.
--spec delWordRight(This) -> ok when
+-spec delWordRight(This) -> 'ok' when
This::wxStyledTextCtrl().
delWordRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2789,7 +2789,7 @@ delWordRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinecut">external documentation</a>.
--spec lineCut(This) -> ok when
+-spec lineCut(This) -> 'ok' when
This::wxStyledTextCtrl().
lineCut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2797,7 +2797,7 @@ lineCut(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinedelete">external documentation</a>.
--spec lineDelete(This) -> ok when
+-spec lineDelete(This) -> 'ok' when
This::wxStyledTextCtrl().
lineDelete(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2805,7 +2805,7 @@ lineDelete(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinetranspose">external documentation</a>.
--spec lineTranspose(This) -> ok when
+-spec lineTranspose(This) -> 'ok' when
This::wxStyledTextCtrl().
lineTranspose(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2813,7 +2813,7 @@ lineTranspose(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineduplicate">external documentation</a>.
--spec lineDuplicate(This) -> ok when
+-spec lineDuplicate(This) -> 'ok' when
This::wxStyledTextCtrl().
lineDuplicate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2821,7 +2821,7 @@ lineDuplicate(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllowercase">external documentation</a>.
--spec lowerCase(This) -> ok when
+-spec lowerCase(This) -> 'ok' when
This::wxStyledTextCtrl().
lowerCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2829,7 +2829,7 @@ lowerCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrluppercase">external documentation</a>.
--spec upperCase(This) -> ok when
+-spec upperCase(This) -> 'ok' when
This::wxStyledTextCtrl().
upperCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2837,7 +2837,7 @@ upperCase(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinescrolldown">external documentation</a>.
--spec lineScrollDown(This) -> ok when
+-spec lineScrollDown(This) -> 'ok' when
This::wxStyledTextCtrl().
lineScrollDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2845,7 +2845,7 @@ lineScrollDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinescrollup">external documentation</a>.
--spec lineScrollUp(This) -> ok when
+-spec lineScrollUp(This) -> 'ok' when
This::wxStyledTextCtrl().
lineScrollUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2853,7 +2853,7 @@ lineScrollUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldeletebacknotline">external documentation</a>.
--spec deleteBackNotLine(This) -> ok when
+-spec deleteBackNotLine(This) -> 'ok' when
This::wxStyledTextCtrl().
deleteBackNotLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2861,7 +2861,7 @@ deleteBackNotLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhomedisplay">external documentation</a>.
--spec homeDisplay(This) -> ok when
+-spec homeDisplay(This) -> 'ok' when
This::wxStyledTextCtrl().
homeDisplay(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2869,7 +2869,7 @@ homeDisplay(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhomedisplayextend">external documentation</a>.
--spec homeDisplayExtend(This) -> ok when
+-spec homeDisplayExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
homeDisplayExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2877,7 +2877,7 @@ homeDisplayExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineenddisplay">external documentation</a>.
--spec lineEndDisplay(This) -> ok when
+-spec lineEndDisplay(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEndDisplay(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2885,7 +2885,7 @@ lineEndDisplay(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineenddisplayextend">external documentation</a>.
--spec lineEndDisplayExtend(This) -> ok when
+-spec lineEndDisplayExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEndDisplayExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2893,7 +2893,7 @@ lineEndDisplayExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhomewrapextend">external documentation</a>.
--spec homeWrapExtend(This) -> ok when
+-spec homeWrapExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
homeWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2901,7 +2901,7 @@ homeWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineendwrap">external documentation</a>.
--spec lineEndWrap(This) -> ok when
+-spec lineEndWrap(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEndWrap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2909,7 +2909,7 @@ lineEndWrap(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineendwrapextend">external documentation</a>.
--spec lineEndWrapExtend(This) -> ok when
+-spec lineEndWrapExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEndWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2917,7 +2917,7 @@ lineEndWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomewrap">external documentation</a>.
--spec vCHomeWrap(This) -> ok when
+-spec vCHomeWrap(This) -> 'ok' when
This::wxStyledTextCtrl().
vCHomeWrap(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2925,7 +2925,7 @@ vCHomeWrap(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomewrapextend">external documentation</a>.
--spec vCHomeWrapExtend(This) -> ok when
+-spec vCHomeWrapExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
vCHomeWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2933,7 +2933,7 @@ vCHomeWrapExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinecopy">external documentation</a>.
--spec lineCopy(This) -> ok when
+-spec lineCopy(This) -> 'ok' when
This::wxStyledTextCtrl().
lineCopy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2941,7 +2941,7 @@ lineCopy(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlmovecaretinsideview">external documentation</a>.
--spec moveCaretInsideView(This) -> ok when
+-spec moveCaretInsideView(This) -> 'ok' when
This::wxStyledTextCtrl().
moveCaretInsideView(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -2958,7 +2958,7 @@ lineLength(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlbracehighlight">external documentation</a>.
--spec braceHighlight(This, Pos1, Pos2) -> ok when
+-spec braceHighlight(This, Pos1, Pos2) -> 'ok' when
This::wxStyledTextCtrl(), Pos1::integer(), Pos2::integer().
braceHighlight(#wx_ref{type=ThisT,ref=ThisRef},Pos1,Pos2)
when is_integer(Pos1),is_integer(Pos2) ->
@@ -2967,7 +2967,7 @@ braceHighlight(#wx_ref{type=ThisT,ref=ThisRef},Pos1,Pos2)
<<ThisRef:32/?UI,Pos1:32/?UI,Pos2:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlbracebadlight">external documentation</a>.
--spec braceBadLight(This, Pos) -> ok when
+-spec braceBadLight(This, Pos) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer().
braceBadLight(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -2993,7 +2993,7 @@ getViewEOL(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetvieweol">external documentation</a>.
--spec setViewEOL(This, Visible) -> ok when
+-spec setViewEOL(This, Visible) -> 'ok' when
This::wxStyledTextCtrl(), Visible::boolean().
setViewEOL(#wx_ref{type=ThisT,ref=ThisRef},Visible)
when is_boolean(Visible) ->
@@ -3002,7 +3002,7 @@ setViewEOL(#wx_ref{type=ThisT,ref=ThisRef},Visible)
<<ThisRef:32/?UI,(wxe_util:from_bool(Visible)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmodeventmask">external documentation</a>.
--spec setModEventMask(This, Mask) -> ok when
+-spec setModEventMask(This, Mask) -> 'ok' when
This::wxStyledTextCtrl(), Mask::integer().
setModEventMask(#wx_ref{type=ThisT,ref=ThisRef},Mask)
when is_integer(Mask) ->
@@ -3019,7 +3019,7 @@ getEdgeColumn(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetedgecolumn">external documentation</a>.
--spec setEdgeColumn(This, Column) -> ok when
+-spec setEdgeColumn(This, Column) -> 'ok' when
This::wxStyledTextCtrl(), Column::integer().
setEdgeColumn(#wx_ref{type=ThisT,ref=ThisRef},Column)
when is_integer(Column) ->
@@ -3028,7 +3028,7 @@ setEdgeColumn(#wx_ref{type=ThisT,ref=ThisRef},Column)
<<ThisRef:32/?UI,Column:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetedgemode">external documentation</a>.
--spec setEdgeMode(This, Mode) -> ok when
+-spec setEdgeMode(This, Mode) -> 'ok' when
This::wxStyledTextCtrl(), Mode::integer().
setEdgeMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -3053,7 +3053,7 @@ getEdgeColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetedgecolour">external documentation</a>.
--spec setEdgeColour(This, EdgeColour) -> ok when
+-spec setEdgeColour(This, EdgeColour) -> 'ok' when
This::wxStyledTextCtrl(), EdgeColour::wx:wx_colour().
setEdgeColour(#wx_ref{type=ThisT,ref=ThisRef},EdgeColour)
when tuple_size(EdgeColour) =:= 3; tuple_size(EdgeColour) =:= 4 ->
@@ -3062,7 +3062,7 @@ setEdgeColour(#wx_ref{type=ThisT,ref=ThisRef},EdgeColour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(EdgeColour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsearchanchor">external documentation</a>.
--spec searchAnchor(This) -> ok when
+-spec searchAnchor(This) -> 'ok' when
This::wxStyledTextCtrl().
searchAnchor(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3098,7 +3098,7 @@ linesOnScreen(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlusepopup">external documentation</a>.
--spec usePopUp(This, AllowPopUp) -> ok when
+-spec usePopUp(This, AllowPopUp) -> 'ok' when
This::wxStyledTextCtrl(), AllowPopUp::boolean().
usePopUp(#wx_ref{type=ThisT,ref=ThisRef},AllowPopUp)
when is_boolean(AllowPopUp) ->
@@ -3115,7 +3115,7 @@ selectionIsRectangle(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetzoom">external documentation</a>.
--spec setZoom(This, Zoom) -> ok when
+-spec setZoom(This, Zoom) -> 'ok' when
This::wxStyledTextCtrl(), Zoom::integer().
setZoom(#wx_ref{type=ThisT,ref=ThisRef},Zoom)
when is_integer(Zoom) ->
@@ -3140,7 +3140,7 @@ getModEventMask(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstcfocus">external documentation</a>.
--spec setSTCFocus(This, Focus) -> ok when
+-spec setSTCFocus(This, Focus) -> 'ok' when
This::wxStyledTextCtrl(), Focus::boolean().
setSTCFocus(#wx_ref{type=ThisT,ref=ThisRef},Focus)
when is_boolean(Focus) ->
@@ -3157,7 +3157,7 @@ getSTCFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstatus">external documentation</a>.
--spec setStatus(This, StatusCode) -> ok when
+-spec setStatus(This, StatusCode) -> 'ok' when
This::wxStyledTextCtrl(), StatusCode::integer().
setStatus(#wx_ref{type=ThisT,ref=ThisRef},StatusCode)
when is_integer(StatusCode) ->
@@ -3174,7 +3174,7 @@ getStatus(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmousedowncaptures">external documentation</a>.
--spec setMouseDownCaptures(This, Captures) -> ok when
+-spec setMouseDownCaptures(This, Captures) -> 'ok' when
This::wxStyledTextCtrl(), Captures::boolean().
setMouseDownCaptures(#wx_ref{type=ThisT,ref=ThisRef},Captures)
when is_boolean(Captures) ->
@@ -3191,7 +3191,7 @@ getMouseDownCaptures(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetstccursor">external documentation</a>.
--spec setSTCCursor(This, CursorType) -> ok when
+-spec setSTCCursor(This, CursorType) -> 'ok' when
This::wxStyledTextCtrl(), CursorType::integer().
setSTCCursor(#wx_ref{type=ThisT,ref=ThisRef},CursorType)
when is_integer(CursorType) ->
@@ -3208,7 +3208,7 @@ getSTCCursor(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcontrolcharsymbol">external documentation</a>.
--spec setControlCharSymbol(This, Symbol) -> ok when
+-spec setControlCharSymbol(This, Symbol) -> 'ok' when
This::wxStyledTextCtrl(), Symbol::integer().
setControlCharSymbol(#wx_ref{type=ThisT,ref=ThisRef},Symbol)
when is_integer(Symbol) ->
@@ -3225,7 +3225,7 @@ getControlCharSymbol(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartleft">external documentation</a>.
--spec wordPartLeft(This) -> ok when
+-spec wordPartLeft(This) -> 'ok' when
This::wxStyledTextCtrl().
wordPartLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3233,7 +3233,7 @@ wordPartLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartleftextend">external documentation</a>.
--spec wordPartLeftExtend(This) -> ok when
+-spec wordPartLeftExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
wordPartLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3241,7 +3241,7 @@ wordPartLeftExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartright">external documentation</a>.
--spec wordPartRight(This) -> ok when
+-spec wordPartRight(This) -> 'ok' when
This::wxStyledTextCtrl().
wordPartRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3249,7 +3249,7 @@ wordPartRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordpartrightextend">external documentation</a>.
--spec wordPartRightExtend(This) -> ok when
+-spec wordPartRightExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
wordPartRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3257,7 +3257,7 @@ wordPartRightExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetvisiblepolicy">external documentation</a>.
--spec setVisiblePolicy(This, VisiblePolicy, VisibleSlop) -> ok when
+-spec setVisiblePolicy(This, VisiblePolicy, VisibleSlop) -> 'ok' when
This::wxStyledTextCtrl(), VisiblePolicy::integer(), VisibleSlop::integer().
setVisiblePolicy(#wx_ref{type=ThisT,ref=ThisRef},VisiblePolicy,VisibleSlop)
when is_integer(VisiblePolicy),is_integer(VisibleSlop) ->
@@ -3266,7 +3266,7 @@ setVisiblePolicy(#wx_ref{type=ThisT,ref=ThisRef},VisiblePolicy,VisibleSlop)
<<ThisRef:32/?UI,VisiblePolicy:32/?UI,VisibleSlop:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldellineleft">external documentation</a>.
--spec delLineLeft(This) -> ok when
+-spec delLineLeft(This) -> 'ok' when
This::wxStyledTextCtrl().
delLineLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3274,7 +3274,7 @@ delLineLeft(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrldellineright">external documentation</a>.
--spec delLineRight(This) -> ok when
+-spec delLineRight(This) -> 'ok' when
This::wxStyledTextCtrl().
delLineRight(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3290,7 +3290,7 @@ getXOffset(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlchoosecaretx">external documentation</a>.
--spec chooseCaretX(This) -> ok when
+-spec chooseCaretX(This) -> 'ok' when
This::wxStyledTextCtrl().
chooseCaretX(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3298,7 +3298,7 @@ chooseCaretX(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetxcaretpolicy">external documentation</a>.
--spec setXCaretPolicy(This, CaretPolicy, CaretSlop) -> ok when
+-spec setXCaretPolicy(This, CaretPolicy, CaretSlop) -> 'ok' when
This::wxStyledTextCtrl(), CaretPolicy::integer(), CaretSlop::integer().
setXCaretPolicy(#wx_ref{type=ThisT,ref=ThisRef},CaretPolicy,CaretSlop)
when is_integer(CaretPolicy),is_integer(CaretSlop) ->
@@ -3307,7 +3307,7 @@ setXCaretPolicy(#wx_ref{type=ThisT,ref=ThisRef},CaretPolicy,CaretSlop)
<<ThisRef:32/?UI,CaretPolicy:32/?UI,CaretSlop:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetycaretpolicy">external documentation</a>.
--spec setYCaretPolicy(This, CaretPolicy, CaretSlop) -> ok when
+-spec setYCaretPolicy(This, CaretPolicy, CaretSlop) -> 'ok' when
This::wxStyledTextCtrl(), CaretPolicy::integer(), CaretSlop::integer().
setYCaretPolicy(#wx_ref{type=ThisT,ref=ThisRef},CaretPolicy,CaretSlop)
when is_integer(CaretPolicy),is_integer(CaretSlop) ->
@@ -3324,7 +3324,7 @@ getPrintWrapMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotactiveforeground">external documentation</a>.
--spec setHotspotActiveForeground(This, UseSetting, Fore) -> ok when
+-spec setHotspotActiveForeground(This, UseSetting, Fore) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Fore::wx:wx_colour().
setHotspotActiveForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
when is_boolean(UseSetting),tuple_size(Fore) =:= 3; tuple_size(Fore) =:= 4 ->
@@ -3333,7 +3333,7 @@ setHotspotActiveForeground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Fore)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Fore)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotactivebackground">external documentation</a>.
--spec setHotspotActiveBackground(This, UseSetting, Back) -> ok when
+-spec setHotspotActiveBackground(This, UseSetting, Back) -> 'ok' when
This::wxStyledTextCtrl(), UseSetting::boolean(), Back::wx:wx_colour().
setHotspotActiveBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
when is_boolean(UseSetting),tuple_size(Back) =:= 3; tuple_size(Back) =:= 4 ->
@@ -3342,7 +3342,7 @@ setHotspotActiveBackground(#wx_ref{type=ThisT,ref=ThisRef},UseSetting,Back)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseSetting)):32/?UI,(wxe_util:colour_bin(Back)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotactiveunderline">external documentation</a>.
--spec setHotspotActiveUnderline(This, Underline) -> ok when
+-spec setHotspotActiveUnderline(This, Underline) -> 'ok' when
This::wxStyledTextCtrl(), Underline::boolean().
setHotspotActiveUnderline(#wx_ref{type=ThisT,ref=ThisRef},Underline)
when is_boolean(Underline) ->
@@ -3351,7 +3351,7 @@ setHotspotActiveUnderline(#wx_ref{type=ThisT,ref=ThisRef},Underline)
<<ThisRef:32/?UI,(wxe_util:from_bool(Underline)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsethotspotsingleline">external documentation</a>.
--spec setHotspotSingleLine(This, SingleLine) -> ok when
+-spec setHotspotSingleLine(This, SingleLine) -> 'ok' when
This::wxStyledTextCtrl(), SingleLine::boolean().
setHotspotSingleLine(#wx_ref{type=ThisT,ref=ThisRef},SingleLine)
when is_boolean(SingleLine) ->
@@ -3360,7 +3360,7 @@ setHotspotSingleLine(#wx_ref{type=ThisT,ref=ThisRef},SingleLine)
<<ThisRef:32/?UI,(wxe_util:from_bool(SingleLine)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlparadownextend">external documentation</a>.
--spec paraDownExtend(This) -> ok when
+-spec paraDownExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
paraDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3368,7 +3368,7 @@ paraDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlparaup">external documentation</a>.
--spec paraUp(This) -> ok when
+-spec paraUp(This) -> 'ok' when
This::wxStyledTextCtrl().
paraUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3376,7 +3376,7 @@ paraUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlparaupextend">external documentation</a>.
--spec paraUpExtend(This) -> ok when
+-spec paraUpExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
paraUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3402,7 +3402,7 @@ positionAfter(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcopyrange">external documentation</a>.
--spec copyRange(This, Start, End) -> ok when
+-spec copyRange(This, Start, End) -> 'ok' when
This::wxStyledTextCtrl(), Start::integer(), End::integer().
copyRange(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
@@ -3411,7 +3411,7 @@ copyRange(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcopytext">external documentation</a>.
--spec copyText(This, Length, Text) -> ok when
+-spec copyText(This, Length, Text) -> 'ok' when
This::wxStyledTextCtrl(), Length::integer(), Text::unicode:chardata().
copyText(#wx_ref{type=ThisT,ref=ThisRef},Length,Text)
when is_integer(Length),is_list(Text) ->
@@ -3421,7 +3421,7 @@ copyText(#wx_ref{type=ThisT,ref=ThisRef},Length,Text)
<<ThisRef:32/?UI,Length: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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetselectionmode">external documentation</a>.
--spec setSelectionMode(This, Mode) -> ok when
+-spec setSelectionMode(This, Mode) -> 'ok' when
This::wxStyledTextCtrl(), Mode::integer().
setSelectionMode(#wx_ref{type=ThisT,ref=ThisRef},Mode)
when is_integer(Mode) ->
@@ -3438,7 +3438,7 @@ getSelectionMode(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllinedownrectextend">external documentation</a>.
--spec lineDownRectExtend(This) -> ok when
+-spec lineDownRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineDownRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3446,7 +3446,7 @@ lineDownRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineuprectextend">external documentation</a>.
--spec lineUpRectExtend(This) -> ok when
+-spec lineUpRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineUpRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3454,7 +3454,7 @@ lineUpRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcharleftrectextend">external documentation</a>.
--spec charLeftRectExtend(This) -> ok when
+-spec charLeftRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
charLeftRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3462,7 +3462,7 @@ charLeftRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcharrightrectextend">external documentation</a>.
--spec charRightRectExtend(This) -> ok when
+-spec charRightRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
charRightRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3470,7 +3470,7 @@ charRightRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlhomerectextend">external documentation</a>.
--spec homeRectExtend(This) -> ok when
+-spec homeRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
homeRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3478,7 +3478,7 @@ homeRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlvchomerectextend">external documentation</a>.
--spec vCHomeRectExtend(This) -> ok when
+-spec vCHomeRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
vCHomeRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3486,7 +3486,7 @@ vCHomeRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrllineendrectextend">external documentation</a>.
--spec lineEndRectExtend(This) -> ok when
+-spec lineEndRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
lineEndRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3494,7 +3494,7 @@ lineEndRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpageuprectextend">external documentation</a>.
--spec pageUpRectExtend(This) -> ok when
+-spec pageUpRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
pageUpRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3502,7 +3502,7 @@ pageUpRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlpagedownrectextend">external documentation</a>.
--spec pageDownRectExtend(This) -> ok when
+-spec pageDownRectExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
pageDownRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3510,7 +3510,7 @@ pageDownRectExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpageup">external documentation</a>.
--spec stutteredPageUp(This) -> ok when
+-spec stutteredPageUp(This) -> 'ok' when
This::wxStyledTextCtrl().
stutteredPageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3518,7 +3518,7 @@ stutteredPageUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpageupextend">external documentation</a>.
--spec stutteredPageUpExtend(This) -> ok when
+-spec stutteredPageUpExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
stutteredPageUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3526,7 +3526,7 @@ stutteredPageUpExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpagedown">external documentation</a>.
--spec stutteredPageDown(This) -> ok when
+-spec stutteredPageDown(This) -> 'ok' when
This::wxStyledTextCtrl().
stutteredPageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3534,7 +3534,7 @@ stutteredPageDown(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstutteredpagedownextend">external documentation</a>.
--spec stutteredPageDownExtend(This) -> ok when
+-spec stutteredPageDownExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
stutteredPageDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3542,7 +3542,7 @@ stutteredPageDownExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleftend">external documentation</a>.
--spec wordLeftEnd(This) -> ok when
+-spec wordLeftEnd(This) -> 'ok' when
This::wxStyledTextCtrl().
wordLeftEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3550,7 +3550,7 @@ wordLeftEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordleftendextend">external documentation</a>.
--spec wordLeftEndExtend(This) -> ok when
+-spec wordLeftEndExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
wordLeftEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3558,7 +3558,7 @@ wordLeftEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordrightend">external documentation</a>.
--spec wordRightEnd(This) -> ok when
+-spec wordRightEnd(This) -> 'ok' when
This::wxStyledTextCtrl().
wordRightEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3566,7 +3566,7 @@ wordRightEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlwordrightendextend">external documentation</a>.
--spec wordRightEndExtend(This) -> ok when
+-spec wordRightEndExtend(This) -> 'ok' when
This::wxStyledTextCtrl().
wordRightEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3574,7 +3574,7 @@ wordRightEndExtend(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetwhitespacechars">external documentation</a>.
--spec setWhitespaceChars(This, Characters) -> ok when
+-spec setWhitespaceChars(This, Characters) -> 'ok' when
This::wxStyledTextCtrl(), Characters::unicode:chardata().
setWhitespaceChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
when is_list(Characters) ->
@@ -3584,7 +3584,7 @@ setWhitespaceChars(#wx_ref{type=ThisT,ref=ThisRef},Characters)
<<ThisRef:32/?UI,(byte_size(Characters_UC)):32/?UI,(Characters_UC)/binary, 0:(((8- ((0+byte_size(Characters_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcharsdefault">external documentation</a>.
--spec setCharsDefault(This) -> ok when
+-spec setCharsDefault(This) -> 'ok' when
This::wxStyledTextCtrl().
setCharsDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3600,7 +3600,7 @@ autoCompGetCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlallocate">external documentation</a>.
--spec allocate(This, Bytes) -> ok when
+-spec allocate(This, Bytes) -> 'ok' when
This::wxStyledTextCtrl(), Bytes::integer().
allocate(#wx_ref{type=ThisT,ref=ThisRef},Bytes)
when is_integer(Bytes) ->
@@ -3626,7 +3626,7 @@ getCaretSticky(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretsticky">external documentation</a>.
--spec setCaretSticky(This, UseCaretStickyBehaviour) -> ok when
+-spec setCaretSticky(This, UseCaretStickyBehaviour) -> 'ok' when
This::wxStyledTextCtrl(), UseCaretStickyBehaviour::boolean().
setCaretSticky(#wx_ref{type=ThisT,ref=ThisRef},UseCaretStickyBehaviour)
when is_boolean(UseCaretStickyBehaviour) ->
@@ -3635,7 +3635,7 @@ setCaretSticky(#wx_ref{type=ThisT,ref=ThisRef},UseCaretStickyBehaviour)
<<ThisRef:32/?UI,(wxe_util:from_bool(UseCaretStickyBehaviour)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrltogglecaretsticky">external documentation</a>.
--spec toggleCaretSticky(This) -> ok when
+-spec toggleCaretSticky(This) -> 'ok' when
This::wxStyledTextCtrl().
toggleCaretSticky(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3643,7 +3643,7 @@ toggleCaretSticky(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetpasteconvertendings">external documentation</a>.
--spec setPasteConvertEndings(This, Convert) -> ok when
+-spec setPasteConvertEndings(This, Convert) -> 'ok' when
This::wxStyledTextCtrl(), Convert::boolean().
setPasteConvertEndings(#wx_ref{type=ThisT,ref=ThisRef},Convert)
when is_boolean(Convert) ->
@@ -3660,7 +3660,7 @@ getPasteConvertEndings(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlselectionduplicate">external documentation</a>.
--spec selectionDuplicate(This) -> ok when
+-spec selectionDuplicate(This) -> 'ok' when
This::wxStyledTextCtrl().
selectionDuplicate(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3668,7 +3668,7 @@ selectionDuplicate(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetcaretlinebackalpha">external documentation</a>.
--spec setCaretLineBackAlpha(This, Alpha) -> ok when
+-spec setCaretLineBackAlpha(This, Alpha) -> 'ok' when
This::wxStyledTextCtrl(), Alpha::integer().
setCaretLineBackAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha)
when is_integer(Alpha) ->
@@ -3685,7 +3685,7 @@ getCaretLineBackAlpha(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstartrecord">external documentation</a>.
--spec startRecord(This) -> ok when
+-spec startRecord(This) -> 'ok' when
This::wxStyledTextCtrl().
startRecord(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3693,7 +3693,7 @@ startRecord(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstoprecord">external documentation</a>.
--spec stopRecord(This) -> ok when
+-spec stopRecord(This) -> 'ok' when
This::wxStyledTextCtrl().
stopRecord(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3701,7 +3701,7 @@ stopRecord(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlexer">external documentation</a>.
--spec setLexer(This, Lexer) -> ok when
+-spec setLexer(This, Lexer) -> 'ok' when
This::wxStyledTextCtrl(), Lexer::integer().
setLexer(#wx_ref{type=ThisT,ref=ThisRef},Lexer)
when is_integer(Lexer) ->
@@ -3718,7 +3718,7 @@ getLexer(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcolourise">external documentation</a>.
--spec colourise(This, Start, End) -> ok when
+-spec colourise(This, Start, End) -> 'ok' when
This::wxStyledTextCtrl(), Start::integer(), End::integer().
colourise(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
when is_integer(Start),is_integer(End) ->
@@ -3727,7 +3727,7 @@ colourise(#wx_ref{type=ThisT,ref=ThisRef},Start,End)
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetproperty">external documentation</a>.
--spec setProperty(This, Key, Value) -> ok when
+-spec setProperty(This, Key, Value) -> 'ok' when
This::wxStyledTextCtrl(), Key::unicode:chardata(), Value::unicode:chardata().
setProperty(#wx_ref{type=ThisT,ref=ThisRef},Key,Value)
when is_list(Key),is_list(Value) ->
@@ -3738,7 +3738,7 @@ setProperty(#wx_ref{type=ThisT,ref=ThisRef},Key,Value)
<<ThisRef:32/?UI,(byte_size(Key_UC)):32/?UI,(Key_UC)/binary, 0:(((8- ((0+byte_size(Key_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetkeywords">external documentation</a>.
--spec setKeyWords(This, KeywordSet, KeyWords) -> ok when
+-spec setKeyWords(This, KeywordSet, KeyWords) -> 'ok' when
This::wxStyledTextCtrl(), KeywordSet::integer(), KeyWords::unicode:chardata().
setKeyWords(#wx_ref{type=ThisT,ref=ThisRef},KeywordSet,KeyWords)
when is_integer(KeywordSet),is_list(KeyWords) ->
@@ -3748,7 +3748,7 @@ setKeyWords(#wx_ref{type=ThisT,ref=ThisRef},KeywordSet,KeyWords)
<<ThisRef:32/?UI,KeywordSet:32/?UI,(byte_size(KeyWords_UC)):32/?UI,(KeyWords_UC)/binary, 0:(((8- ((4+byte_size(KeyWords_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlexerlanguage">external documentation</a>.
--spec setLexerLanguage(This, Language) -> ok when
+-spec setLexerLanguage(This, Language) -> 'ok' when
This::wxStyledTextCtrl(), Language::unicode:chardata().
setLexerLanguage(#wx_ref{type=ThisT,ref=ThisRef},Language)
when is_list(Language) ->
@@ -3784,7 +3784,7 @@ getCurrentLine(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetspec">external documentation</a>.
--spec styleSetSpec(This, StyleNum, Spec) -> ok when
+-spec styleSetSpec(This, StyleNum, Spec) -> 'ok' when
This::wxStyledTextCtrl(), StyleNum::integer(), Spec::unicode:chardata().
styleSetSpec(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Spec)
when is_integer(StyleNum),is_list(Spec) ->
@@ -3794,7 +3794,7 @@ styleSetSpec(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Spec)
<<ThisRef:32/?UI,StyleNum:32/?UI,(byte_size(Spec_UC)):32/?UI,(Spec_UC)/binary, 0:(((8- ((4+byte_size(Spec_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfont">external documentation</a>.
--spec styleSetFont(This, StyleNum, Font) -> ok when
+-spec styleSetFont(This, StyleNum, Font) -> 'ok' when
This::wxStyledTextCtrl(), StyleNum::integer(), Font::wxFont:wxFont().
styleSetFont(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,#wx_ref{type=FontT,ref=FontRef})
when is_integer(StyleNum) ->
@@ -3804,7 +3804,7 @@ styleSetFont(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,#wx_ref{type=FontT,ref=Fon
<<ThisRef:32/?UI,StyleNum:32/?UI,FontRef:32/?UI>>).
%% @equiv styleSetFontAttr(This,StyleNum,Size,FaceName,Bold,Italic,Underline, [])
--spec styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline) -> ok when
+-spec styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline) -> 'ok' when
This::wxStyledTextCtrl(), StyleNum::integer(), Size::integer(), FaceName::unicode:chardata(), Bold::boolean(), Italic::boolean(), Underline::boolean().
styleSetFontAttr(This,StyleNum,Size,FaceName,Bold,Italic,Underline)
@@ -3813,9 +3813,9 @@ styleSetFontAttr(This,StyleNum,Size,FaceName,Bold,Italic,Underline)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfontattr">external documentation</a>.
%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
--spec styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline, [Option]) -> ok when
+-spec styleSetFontAttr(This, StyleNum, Size, FaceName, Bold, Italic, Underline, [Option]) -> 'ok' when
This::wxStyledTextCtrl(), StyleNum::integer(), Size::integer(), FaceName::unicode:chardata(), Bold::boolean(), Italic::boolean(), Underline::boolean(),
- Option :: {encoding, wx:wx_enum()}.
+ Option :: {'encoding', wx:wx_enum()}.
styleSetFontAttr(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Size,FaceName,Bold,Italic,Underline, Options)
when is_integer(StyleNum),is_integer(Size),is_list(FaceName),is_boolean(Bold),is_boolean(Italic),is_boolean(Underline),is_list(Options) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3827,7 +3827,7 @@ styleSetFontAttr(#wx_ref{type=ThisT,ref=ThisRef},StyleNum,Size,FaceName,Bold,Ita
<<ThisRef:32/?UI,StyleNum:32/?UI,Size:32/?UI,(byte_size(FaceName_UC)):32/?UI,(FaceName_UC)/binary, 0:(((8- ((0+byte_size(FaceName_UC)) band 16#7)) band 16#7))/unit:8,(wxe_util:from_bool(Bold)):32/?UI,(wxe_util:from_bool(Italic)):32/?UI,(wxe_util:from_bool(Underline)):32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetcharacterset">external documentation</a>.
--spec styleSetCharacterSet(This, Style, CharacterSet) -> ok when
+-spec styleSetCharacterSet(This, Style, CharacterSet) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), CharacterSet::integer().
styleSetCharacterSet(#wx_ref{type=ThisT,ref=ThisRef},Style,CharacterSet)
when is_integer(Style),is_integer(CharacterSet) ->
@@ -3837,7 +3837,7 @@ styleSetCharacterSet(#wx_ref{type=ThisT,ref=ThisRef},Style,CharacterSet)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlstylesetfontencoding">external documentation</a>.
%%<br /> Encoding = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
--spec styleSetFontEncoding(This, Style, Encoding) -> ok when
+-spec styleSetFontEncoding(This, Style, Encoding) -> 'ok' when
This::wxStyledTextCtrl(), Style::integer(), Encoding::wx:wx_enum().
styleSetFontEncoding(#wx_ref{type=ThisT,ref=ThisRef},Style,Encoding)
when is_integer(Style),is_integer(Encoding) ->
@@ -3846,7 +3846,7 @@ styleSetFontEncoding(#wx_ref{type=ThisT,ref=ThisRef},Style,Encoding)
<<ThisRef:32/?UI,Style:32/?UI,Encoding:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlcmdkeyexecute">external documentation</a>.
--spec cmdKeyExecute(This, Cmd) -> ok when
+-spec cmdKeyExecute(This, Cmd) -> 'ok' when
This::wxStyledTextCtrl(), Cmd::integer().
cmdKeyExecute(#wx_ref{type=ThisT,ref=ThisRef},Cmd)
when is_integer(Cmd) ->
@@ -3855,7 +3855,7 @@ cmdKeyExecute(#wx_ref{type=ThisT,ref=ThisRef},Cmd)
<<ThisRef:32/?UI,Cmd:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetmargins">external documentation</a>.
--spec setMargins(This, Left, Right) -> ok when
+-spec setMargins(This, Left, Right) -> 'ok' when
This::wxStyledTextCtrl(), Left::integer(), Right::integer().
setMargins(#wx_ref{type=ThisT,ref=ThisRef},Left,Right)
when is_integer(Left),is_integer(Right) ->
@@ -3881,7 +3881,7 @@ pointFromPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlscrolltoline">external documentation</a>.
--spec scrollToLine(This, Line) -> ok when
+-spec scrollToLine(This, Line) -> 'ok' when
This::wxStyledTextCtrl(), Line::integer().
scrollToLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
when is_integer(Line) ->
@@ -3890,7 +3890,7 @@ scrollToLine(#wx_ref{type=ThisT,ref=ThisRef},Line)
<<ThisRef:32/?UI,Line:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlscrolltocolumn">external documentation</a>.
--spec scrollToColumn(This, Column) -> ok when
+-spec scrollToColumn(This, Column) -> 'ok' when
This::wxStyledTextCtrl(), Column::integer().
scrollToColumn(#wx_ref{type=ThisT,ref=ThisRef},Column)
when is_integer(Column) ->
@@ -3899,7 +3899,7 @@ scrollToColumn(#wx_ref{type=ThisT,ref=ThisRef},Column)
<<ThisRef:32/?UI,Column:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetvscrollbar">external documentation</a>.
--spec setVScrollBar(This, Bar) -> ok when
+-spec setVScrollBar(This, Bar) -> 'ok' when
This::wxStyledTextCtrl(), Bar::wxScrollBar:wxScrollBar().
setVScrollBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BarT,ref=BarRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3908,7 +3908,7 @@ setVScrollBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BarT,ref=BarRef}) ->
<<ThisRef:32/?UI,BarRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsethscrollbar">external documentation</a>.
--spec setHScrollBar(This, Bar) -> ok when
+-spec setHScrollBar(This, Bar) -> 'ok' when
This::wxStyledTextCtrl(), Bar::wxScrollBar:wxScrollBar().
setHScrollBar(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BarT,ref=BarRef}) ->
?CLASS(ThisT,wxStyledTextCtrl),
@@ -3925,7 +3925,7 @@ getLastKeydownProcessed(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsetlastkeydownprocessed">external documentation</a>.
--spec setLastKeydownProcessed(This, Val) -> ok when
+-spec setLastKeydownProcessed(This, Val) -> 'ok' when
This::wxStyledTextCtrl(), Val::boolean().
setLastKeydownProcessed(#wx_ref{type=ThisT,ref=ThisRef},Val)
when is_boolean(Val) ->
@@ -3983,7 +3983,7 @@ getUseAntiAliasing(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrladdtextraw">external documentation</a>.
--spec addTextRaw(This, Text) -> ok when
+-spec addTextRaw(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::binary().
addTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_binary(Text) ->
@@ -3993,7 +3993,7 @@ addTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlinserttextraw">external documentation</a>.
--spec insertTextRaw(This, Pos, Text) -> ok when
+-spec insertTextRaw(This, Pos, Text) -> 'ok' when
This::wxStyledTextCtrl(), Pos::integer(), Text::binary().
insertTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Pos,Text)
when is_integer(Pos),is_binary(Text) ->
@@ -4038,7 +4038,7 @@ getTextRangeRaw(#wx_ref{type=ThisT,ref=ThisRef},StartPos,EndPos)
<<ThisRef:32/?UI,StartPos:32/?UI,EndPos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlsettextraw">external documentation</a>.
--spec setTextRaw(This, Text) -> ok when
+-spec setTextRaw(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::binary().
setTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_binary(Text) ->
@@ -4056,7 +4056,7 @@ getTextRaw(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxstyledtextctrl.html#wxstyledtextctrlappendtextraw">external documentation</a>.
--spec appendTextRaw(This, Text) -> ok when
+-spec appendTextRaw(This, Text) -> 'ok' when
This::wxStyledTextCtrl(), Text::binary().
appendTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_binary(Text) ->
@@ -4066,7 +4066,7 @@ appendTextRaw(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxStyledTextCtrl()) -> ok.
+-spec destroy(This::wxStyledTextCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxStyledTextCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxSystemOptions.erl b/lib/wx/src/gen/wxSystemOptions.erl
index 9db137b6a1..28d77b1e26 100644
--- a/lib/wx/src/gen/wxSystemOptions.erl
+++ b/lib/wx/src/gen/wxSystemOptions.erl
@@ -73,12 +73,12 @@ isFalse(Name)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxsystemoptions.html#wxsystemoptionssetoption">external documentation</a>.
%% <br /> Also:<br />
-%% setOption(Name, Value) -> ok when<br />
+%% setOption(Name, Value) -> 'ok' when<br />
%% Name::unicode:chardata(), Value::unicode:chardata().<br />
%%
--spec setOption(Name, Value) -> ok when
+-spec setOption(Name, Value) -> 'ok' when
Name::unicode:chardata(), Value::integer();
- (Name, Value) -> ok when
+ (Name, Value) -> 'ok' when
Name::unicode:chardata(), Value::unicode:chardata().
setOption(Name,Value)
when is_list(Name),is_integer(Value) ->
diff --git a/lib/wx/src/gen/wxSystemSettings.erl b/lib/wx/src/gen/wxSystemSettings.erl
index 234b2414c0..b48f783a45 100644
--- a/lib/wx/src/gen/wxSystemSettings.erl
+++ b/lib/wx/src/gen/wxSystemSettings.erl
@@ -65,7 +65,7 @@ getMetric(Index)
%%<br /> Index = ?wxSYS_MOUSE_BUTTONS | ?wxSYS_BORDER_X | ?wxSYS_BORDER_Y | ?wxSYS_CURSOR_X | ?wxSYS_CURSOR_Y | ?wxSYS_DCLICK_X | ?wxSYS_DCLICK_Y | ?wxSYS_DRAG_X | ?wxSYS_DRAG_Y | ?wxSYS_EDGE_X | ?wxSYS_EDGE_Y | ?wxSYS_HSCROLL_ARROW_X | ?wxSYS_HSCROLL_ARROW_Y | ?wxSYS_HTHUMB_X | ?wxSYS_ICON_X | ?wxSYS_ICON_Y | ?wxSYS_ICONSPACING_X | ?wxSYS_ICONSPACING_Y | ?wxSYS_WINDOWMIN_X | ?wxSYS_WINDOWMIN_Y | ?wxSYS_SCREEN_X | ?wxSYS_SCREEN_Y | ?wxSYS_FRAMESIZE_X | ?wxSYS_FRAMESIZE_Y | ?wxSYS_SMALLICON_X | ?wxSYS_SMALLICON_Y | ?wxSYS_HSCROLL_Y | ?wxSYS_VSCROLL_X | ?wxSYS_VSCROLL_ARROW_X | ?wxSYS_VSCROLL_ARROW_Y | ?wxSYS_VTHUMB_Y | ?wxSYS_CAPTION_Y | ?wxSYS_MENU_Y | ?wxSYS_NETWORK_PRESENT | ?wxSYS_PENWINDOWS_PRESENT | ?wxSYS_SHOW_SOUNDS | ?wxSYS_SWAP_BUTTONS
-spec getMetric(Index, [Option]) -> integer() when
Index::wx:wx_enum(),
- Option :: {win, wxWindow:wxWindow()}.
+ Option :: {'win', wxWindow:wxWindow()}.
getMetric(Index, Options)
when is_integer(Index),is_list(Options) ->
MOpts = fun({win, #wx_ref{type=WinT,ref=WinRef}}, Acc) -> ?CLASS(WinT,wxWindow),[<<1:32/?UI,WinRef:32/?UI>>|Acc];
diff --git a/lib/wx/src/gen/wxTaskBarIcon.erl b/lib/wx/src/gen/wxTaskBarIcon.erl
index 0f336c6e4c..af4859fb88 100644
--- a/lib/wx/src/gen/wxTaskBarIcon.erl
+++ b/lib/wx/src/gen/wxTaskBarIcon.erl
@@ -73,7 +73,7 @@ setIcon(This,Icon)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtaskbaricon.html#wxtaskbariconseticon">external documentation</a>.
-spec setIcon(This, Icon, [Option]) -> boolean() when
This::wxTaskBarIcon(), Icon::wxIcon:wxIcon(),
- Option :: {tooltip, unicode:chardata()}.
+ Option :: {'tooltip', unicode:chardata()}.
setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTaskBarIcon),
@@ -85,7 +85,7 @@ setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}, Options
<<ThisRef:32/?UI,IconRef:32/?UI, BinOpt/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTaskBarIcon()) -> ok.
+-spec destroy(This::wxTaskBarIcon()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTaskBarIcon),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTextAttr.erl b/lib/wx/src/gen/wxTextAttr.erl
index bcc2abf73e..4f6031cc88 100644
--- a/lib/wx/src/gen/wxTextAttr.erl
+++ b/lib/wx/src/gen/wxTextAttr.erl
@@ -58,9 +58,9 @@ new(ColText)
%%<br /> Alignment = ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
-spec new(ColText, [Option]) -> wxTextAttr() when
ColText::wx:wx_colour(),
- Option :: {colBack, wx:wx_colour()}
- | {font, wxFont:wxFont()}
- | {alignment, wx:wx_enum()}.
+ Option :: {'colBack', wx:wx_colour()}
+ | {'font', wxFont:wxFont()}
+ | {'alignment', wx:wx_enum()}.
new(ColText, Options)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4,is_list(Options) ->
MOpts = fun({colBack, ColBack}, Acc) -> [<<1:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary,0:32>>|Acc];
@@ -178,7 +178,7 @@ isDefault(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsetalignment">external documentation</a>.
%%<br /> Alignment = ?wxTEXT_ALIGNMENT_DEFAULT | ?wxTEXT_ALIGNMENT_LEFT | ?wxTEXT_ALIGNMENT_CENTRE | ?wxTEXT_ALIGNMENT_CENTER | ?wxTEXT_ALIGNMENT_RIGHT | ?wxTEXT_ALIGNMENT_JUSTIFIED
--spec setAlignment(This, Alignment) -> ok when
+-spec setAlignment(This, Alignment) -> 'ok' when
This::wxTextAttr(), Alignment::wx:wx_enum().
setAlignment(#wx_ref{type=ThisT,ref=ThisRef},Alignment)
when is_integer(Alignment) ->
@@ -187,7 +187,7 @@ setAlignment(#wx_ref{type=ThisT,ref=ThisRef},Alignment)
<<ThisRef:32/?UI,Alignment:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsetbackgroundcolour">external documentation</a>.
--spec setBackgroundColour(This, ColBack) -> ok when
+-spec setBackgroundColour(This, ColBack) -> 'ok' when
This::wxTextAttr(), ColBack::wx:wx_colour().
setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
when tuple_size(ColBack) =:= 3; tuple_size(ColBack) =:= 4 ->
@@ -196,7 +196,7 @@ setBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},ColBack)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColBack)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsetflags">external documentation</a>.
--spec setFlags(This, Flags) -> ok when
+-spec setFlags(This, Flags) -> 'ok' when
This::wxTextAttr(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -205,7 +205,7 @@ setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
<<ThisRef:32/?UI,Flags:32/?UI>>).
%% @equiv setFont(This,Font, [])
--spec setFont(This, Font) -> ok when
+-spec setFont(This, Font) -> 'ok' when
This::wxTextAttr(), Font::wxFont:wxFont().
setFont(This,Font)
@@ -213,9 +213,9 @@ setFont(This,Font)
setFont(This,Font, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsetfont">external documentation</a>.
--spec setFont(This, Font, [Option]) -> ok when
+-spec setFont(This, Font, [Option]) -> 'ok' when
This::wxTextAttr(), Font::wxFont:wxFont(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTextAttr),
@@ -227,7 +227,7 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options
<<ThisRef:32/?UI,FontRef:32/?UI, BinOpt/binary>>).
%% @equiv setLeftIndent(This,Indent, [])
--spec setLeftIndent(This, Indent) -> ok when
+-spec setLeftIndent(This, Indent) -> 'ok' when
This::wxTextAttr(), Indent::integer().
setLeftIndent(This,Indent)
@@ -235,9 +235,9 @@ setLeftIndent(This,Indent)
setLeftIndent(This,Indent, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsetleftindent">external documentation</a>.
--spec setLeftIndent(This, Indent, [Option]) -> ok when
+-spec setLeftIndent(This, Indent, [Option]) -> 'ok' when
This::wxTextAttr(), Indent::integer(),
- Option :: {subIndent, integer()}.
+ Option :: {'subIndent', integer()}.
setLeftIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent, Options)
when is_integer(Indent),is_list(Options) ->
?CLASS(ThisT,wxTextAttr),
@@ -248,7 +248,7 @@ setLeftIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent, Options)
<<ThisRef:32/?UI,Indent:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsetrightindent">external documentation</a>.
--spec setRightIndent(This, Indent) -> ok when
+-spec setRightIndent(This, Indent) -> 'ok' when
This::wxTextAttr(), Indent::integer().
setRightIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
when is_integer(Indent) ->
@@ -257,7 +257,7 @@ setRightIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
<<ThisRef:32/?UI,Indent:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsettabs">external documentation</a>.
--spec setTabs(This, Tabs) -> ok when
+-spec setTabs(This, Tabs) -> 'ok' when
This::wxTextAttr(), Tabs::[integer()].
setTabs(#wx_ref{type=ThisT,ref=ThisRef},Tabs)
when is_list(Tabs) ->
@@ -267,7 +267,7 @@ setTabs(#wx_ref{type=ThisT,ref=ThisRef},Tabs)
(<< <<C:32/?I>> || C <- Tabs>>)/binary, 0:(((0+length(Tabs)) rem 2)*32)>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextattr.html#wxtextattrsettextcolour">external documentation</a>.
--spec setTextColour(This, ColText) -> ok when
+-spec setTextColour(This, ColText) -> 'ok' when
This::wxTextAttr(), ColText::wx:wx_colour().
setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
when tuple_size(ColText) =:= 3; tuple_size(ColText) =:= 4 ->
@@ -276,7 +276,7 @@ setTextColour(#wx_ref{type=ThisT,ref=ThisRef},ColText)
<<ThisRef:32/?UI,(wxe_util:colour_bin(ColText)):16/binary>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTextAttr()) -> ok.
+-spec destroy(This::wxTextAttr()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextAttr),
wxe_util:destroy(?wxTextAttr_destroy,Obj),
diff --git a/lib/wx/src/gen/wxTextCtrl.erl b/lib/wx/src/gen/wxTextCtrl.erl
index 5840812579..5f03398959 100644
--- a/lib/wx/src/gen/wxTextCtrl.erl
+++ b/lib/wx/src/gen/wxTextCtrl.erl
@@ -104,11 +104,11 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlwxtextctrl">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxTextCtrl() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {value, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'value', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -123,7 +123,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlappendtext">external documentation</a>.
--spec appendText(This, Text) -> ok when
+-spec appendText(This, Text) -> 'ok' when
This::wxTextCtrl(), Text::unicode:chardata().
appendText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -173,7 +173,7 @@ canUndo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlclear">external documentation</a>.
--spec clear(This) -> ok when
+-spec clear(This) -> 'ok' when
This::wxTextCtrl().
clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -181,7 +181,7 @@ clear(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlcopy">external documentation</a>.
--spec copy(This) -> ok when
+-spec copy(This) -> 'ok' when
This::wxTextCtrl().
copy(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -199,11 +199,11 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxTextCtrl(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {value, unicode:chardata()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'value', unicode:chardata()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxTextCtrl),
@@ -219,7 +219,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O
<<ThisRef:32/?UI,ParentRef:32/?UI,Id:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlcut">external documentation</a>.
--spec cut(This) -> ok when
+-spec cut(This) -> 'ok' when
This::wxTextCtrl().
cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -227,7 +227,7 @@ cut(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrldiscardedits">external documentation</a>.
--spec discardEdits(This) -> ok when
+-spec discardEdits(This) -> 'ok' when
This::wxTextCtrl().
discardEdits(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -235,7 +235,7 @@ discardEdits(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlchangevalue">external documentation</a>.
--spec changeValue(This, Value) -> ok when
+-spec changeValue(This, Value) -> 'ok' when
This::wxTextCtrl(), Value::unicode:chardata().
changeValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_list(Value) ->
@@ -389,7 +389,7 @@ loadFile(This,File)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlloadfile">external documentation</a>.
-spec loadFile(This, File, [Option]) -> boolean() when
This::wxTextCtrl(), File::unicode:chardata(),
- Option :: {fileType, integer()}.
+ Option :: {'fileType', integer()}.
loadFile(#wx_ref{type=ThisT,ref=ThisRef},File, Options)
when is_list(File),is_list(Options) ->
?CLASS(ThisT,wxTextCtrl),
@@ -401,7 +401,7 @@ loadFile(#wx_ref{type=ThisT,ref=ThisRef},File, Options)
<<ThisRef:32/?UI,(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((0+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlmarkdirty">external documentation</a>.
--spec markDirty(This) -> ok when
+-spec markDirty(This) -> 'ok' when
This::wxTextCtrl().
markDirty(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -409,7 +409,7 @@ markDirty(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlpaste">external documentation</a>.
--spec paste(This) -> ok when
+-spec paste(This) -> 'ok' when
This::wxTextCtrl().
paste(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -427,7 +427,7 @@ positionToXY(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlredo">external documentation</a>.
--spec redo(This) -> ok when
+-spec redo(This) -> 'ok' when
This::wxTextCtrl().
redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -435,7 +435,7 @@ redo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlremove">external documentation</a>.
--spec remove(This, From, To) -> ok when
+-spec remove(This, From, To) -> 'ok' when
This::wxTextCtrl(), From::integer(), To::integer().
remove(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
@@ -444,7 +444,7 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},From,To)
<<ThisRef:32/?UI,From:32/?UI,To:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlreplace">external documentation</a>.
--spec replace(This, From, To, Value) -> ok when
+-spec replace(This, From, To, Value) -> 'ok' when
This::wxTextCtrl(), From::integer(), To::integer(), Value::unicode:chardata().
replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value)
when is_integer(From),is_integer(To),is_list(Value) ->
@@ -464,8 +464,8 @@ saveFile(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlsavefile">external documentation</a>.
-spec saveFile(This, [Option]) -> boolean() when
This::wxTextCtrl(),
- Option :: {file, unicode:chardata()}
- | {fileType, integer()}.
+ Option :: {'file', unicode:chardata()}
+ | {'fileType', integer()}.
saveFile(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTextCtrl),
@@ -486,7 +486,7 @@ setDefaultStyle(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=StyleT,ref=StyleRef
<<ThisRef:32/?UI,StyleRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlseteditable">external documentation</a>.
--spec setEditable(This, Editable) -> ok when
+-spec setEditable(This, Editable) -> 'ok' when
This::wxTextCtrl(), Editable::boolean().
setEditable(#wx_ref{type=ThisT,ref=ThisRef},Editable)
when is_boolean(Editable) ->
@@ -495,7 +495,7 @@ setEditable(#wx_ref{type=ThisT,ref=ThisRef},Editable)
<<ThisRef:32/?UI,(wxe_util:from_bool(Editable)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlsetinsertionpoint">external documentation</a>.
--spec setInsertionPoint(This, Pos) -> ok when
+-spec setInsertionPoint(This, Pos) -> 'ok' when
This::wxTextCtrl(), Pos::integer().
setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -504,7 +504,7 @@ setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlsetinsertionpointend">external documentation</a>.
--spec setInsertionPointEnd(This) -> ok when
+-spec setInsertionPointEnd(This) -> 'ok' when
This::wxTextCtrl().
setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -512,7 +512,7 @@ setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlsetmaxlength">external documentation</a>.
--spec setMaxLength(This, Len) -> ok when
+-spec setMaxLength(This, Len) -> 'ok' when
This::wxTextCtrl(), Len::integer().
setMaxLength(#wx_ref{type=ThisT,ref=ThisRef},Len)
when is_integer(Len) ->
@@ -521,7 +521,7 @@ setMaxLength(#wx_ref{type=ThisT,ref=ThisRef},Len)
<<ThisRef:32/?UI,Len:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlsetselection">external documentation</a>.
--spec setSelection(This, From, To) -> ok when
+-spec setSelection(This, From, To) -> 'ok' when
This::wxTextCtrl(), From::integer(), To::integer().
setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To)
when is_integer(From),is_integer(To) ->
@@ -540,7 +540,7 @@ setStyle(#wx_ref{type=ThisT,ref=ThisRef},Start,End,#wx_ref{type=StyleT,ref=Style
<<ThisRef:32/?UI,Start:32/?UI,End:32/?UI,StyleRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlsetvalue">external documentation</a>.
--spec setValue(This, Value) -> ok when
+-spec setValue(This, Value) -> 'ok' when
This::wxTextCtrl(), Value::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
when is_list(Value) ->
@@ -550,7 +550,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value)
<<ThisRef:32/?UI,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((0+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlshowposition">external documentation</a>.
--spec showPosition(This, Pos) -> ok when
+-spec showPosition(This, Pos) -> 'ok' when
This::wxTextCtrl(), Pos::integer().
showPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
when is_integer(Pos) ->
@@ -559,7 +559,7 @@ showPosition(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlundo">external documentation</a>.
--spec undo(This) -> ok when
+-spec undo(This) -> 'ok' when
This::wxTextCtrl().
undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTextCtrl),
@@ -567,7 +567,7 @@ undo(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextctrl.html#wxtextctrlwritetext">external documentation</a>.
--spec writeText(This, Text) -> ok when
+-spec writeText(This, Text) -> 'ok' when
This::wxTextCtrl(), Text::unicode:chardata().
writeText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -586,7 +586,7 @@ xYToPosition(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTextCtrl()) -> ok.
+-spec destroy(This::wxTextCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTextDataObject.erl b/lib/wx/src/gen/wxTextDataObject.erl
index a1893eed1c..eb3e1f4bff 100644
--- a/lib/wx/src/gen/wxTextDataObject.erl
+++ b/lib/wx/src/gen/wxTextDataObject.erl
@@ -47,7 +47,7 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextdataobject.html#wxtextdataobjectwxtextdataobject">external documentation</a>.
-spec new([Option]) -> wxTextDataObject() when
- Option :: {text, unicode:chardata()}.
+ Option :: {'text', unicode:chardata()}.
new(Options)
when is_list(Options) ->
MOpts = fun({text, Text}, Acc) -> Text_UC = unicode:characters_to_binary([Text,0]),[<<1: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>>|Acc];
@@ -73,7 +73,7 @@ getText(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextdataobject.html#wxtextdataobjectsettext">external documentation</a>.
--spec setText(This, Text) -> ok when
+-spec setText(This, Text) -> 'ok' when
This::wxTextDataObject(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -83,7 +83,7 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTextDataObject()) -> ok.
+-spec destroy(This::wxTextDataObject()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextDataObject),
wxe_util:destroy(?wxTextDataObject_destroy,Obj),
diff --git a/lib/wx/src/gen/wxTextEntryDialog.erl b/lib/wx/src/gen/wxTextEntryDialog.erl
index a93c3857a8..eaf6dc3926 100644
--- a/lib/wx/src/gen/wxTextEntryDialog.erl
+++ b/lib/wx/src/gen/wxTextEntryDialog.erl
@@ -99,10 +99,10 @@ new(Parent,Message)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextentrydialog.html#wxtextentrydialogwxtextentrydialog">external documentation</a>.
-spec new(Parent, Message, [Option]) -> wxTextEntryDialog() when
Parent::wxWindow:wxWindow(), Message::unicode:chardata(),
- Option :: {caption, unicode:chardata()}
- | {value, unicode:chardata()}
- | {style, integer()}
- | {pos, {X::integer(), Y::integer()}}.
+ Option :: {'caption', unicode:chardata()}
+ | {'value', unicode:chardata()}
+ | {'style', integer()}
+ | {'pos', {X::integer(), Y::integer()}}.
new(#wx_ref{type=ParentT,ref=ParentRef},Message, Options)
when is_list(Message),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -125,7 +125,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtextentrydialog.html#wxtextentrydialogsetvalue">external documentation</a>.
--spec setValue(This, Val) -> ok when
+-spec setValue(This, Val) -> 'ok' when
This::wxTextEntryDialog(), Val::unicode:chardata().
setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
when is_list(Val) ->
@@ -135,7 +135,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Val)
<<ThisRef:32/?UI,(byte_size(Val_UC)):32/?UI,(Val_UC)/binary, 0:(((8- ((0+byte_size(Val_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTextEntryDialog()) -> ok.
+-spec destroy(This::wxTextEntryDialog()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTextEntryDialog),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxToggleButton.erl b/lib/wx/src/gen/wxToggleButton.erl
index dffb4b159d..9e8dab1c32 100644
--- a/lib/wx/src/gen/wxToggleButton.erl
+++ b/lib/wx/src/gen/wxToggleButton.erl
@@ -96,10 +96,10 @@ new(Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtogglebutton.html#wxtogglebuttonwxtogglebutton">external documentation</a>.
-spec new(Parent, Id, Label, [Option]) -> wxToggleButton() when
Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -124,10 +124,10 @@ create(This,Parent,Id,Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtogglebutton.html#wxtogglebuttoncreate">external documentation</a>.
-spec create(This, Parent, Id, Label, [Option]) -> boolean() when
This::wxToggleButton(), Parent::wxWindow:wxWindow(), Id::integer(), Label::unicode:chardata(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Label, Options)
when is_integer(Id),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToggleButton),
@@ -151,7 +151,7 @@ getValue(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtogglebutton.html#wxtogglebuttonsetvalue">external documentation</a>.
--spec setValue(This, State) -> ok when
+-spec setValue(This, State) -> 'ok' when
This::wxToggleButton(), State::boolean().
setValue(#wx_ref{type=ThisT,ref=ThisRef},State)
when is_boolean(State) ->
@@ -160,7 +160,7 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},State)
<<ThisRef:32/?UI,(wxe_util:from_bool(State)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxToggleButton()) -> ok.
+-spec destroy(This::wxToggleButton()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxToggleButton),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxToolBar.erl b/lib/wx/src/gen/wxToolBar.erl
index b3cce2b6e9..9be37f943c 100644
--- a/lib/wx/src/gen/wxToolBar.erl
+++ b/lib/wx/src/gen/wxToolBar.erl
@@ -128,8 +128,8 @@ addTool(This,Toolid,Bitmap)
%% This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap();<br />
%% (This, Toolid, Bitmap, [Option]) -> wx:wx_object() when<br />
%% This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),<br />
-%% Option :: {shortHelpString, unicode:chardata()}<br />
-%% | {longHelpString, unicode:chardata()}.<br />
+%% Option :: {'shortHelpString', unicode:chardata()}<br />
+%% | {'longHelpString', unicode:chardata()}.<br />
%%
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec addTool(This, Toolid, Label, Bitmap) -> wx:wx_object() when
@@ -138,8 +138,8 @@ addTool(This,Toolid,Bitmap)
This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap();
(This, Toolid, Bitmap, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {shortHelpString, unicode:chardata()}
- | {longHelpString, unicode:chardata()}.
+ Option :: {'shortHelpString', unicode:chardata()}
+ | {'longHelpString', unicode:chardata()}.
addTool(This,Toolid,Label,Bitmap)
when is_record(This, wx_ref),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref) ->
@@ -163,28 +163,28 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRe
%% <br /> Also:<br />
%% addTool(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when<br />
%% This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),<br />
-%% Option :: {shortHelp, unicode:chardata()}<br />
-%% | {kind, wx:wx_enum()};<br />
+%% Option :: {'shortHelp', unicode:chardata()}<br />
+%% | {'kind', wx:wx_enum()};<br />
%% (This, Toolid, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when<br />
%% This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),<br />
-%% Option :: {toggle, boolean()}<br />
-%% | {clientData, wx:wx_object()}<br />
-%% | {shortHelpString, unicode:chardata()}<br />
-%% | {longHelpString, unicode:chardata()}.<br />
+%% Option :: {'toggle', boolean()}<br />
+%% | {'clientData', wx:wx_object()}<br />
+%% | {'shortHelpString', unicode:chardata()}<br />
+%% | {'longHelpString', unicode:chardata()}.<br />
%%
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec addTool(This, Toolid, Label, Bitmap, BmpDisabled) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap();
(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {shortHelp, unicode:chardata()}
- | {kind, wx:wx_enum()};
+ Option :: {'shortHelp', unicode:chardata()}
+ | {'kind', wx:wx_enum()};
(This, Toolid, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),
- Option :: {toggle, boolean()}
- | {clientData, wx:wx_object()}
- | {shortHelpString, unicode:chardata()}
- | {longHelpString, unicode:chardata()}.
+ Option :: {'toggle', boolean()}
+ | {'clientData', wx:wx_object()}
+ | {'shortHelpString', unicode:chardata()}
+ | {'longHelpString', unicode:chardata()}.
addTool(This,Toolid,Label,Bitmap,BmpDisabled)
when is_record(This, wx_ref),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref),is_record(BmpDisabled, wx_ref) ->
@@ -218,20 +218,20 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRe
%% <br /> Also:<br />
%% addTool(This, Toolid, Label, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when<br />
%% This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),<br />
-%% Option :: {kind, wx:wx_enum()}<br />
-%% | {shortHelp, unicode:chardata()}<br />
-%% | {longHelp, unicode:chardata()}<br />
-%% | {data, wx:wx_object()}.<br />
+%% Option :: {'kind', wx:wx_enum()}<br />
+%% | {'shortHelp', unicode:chardata()}<br />
+%% | {'longHelp', unicode:chardata()}<br />
+%% | {'data', wx:wx_object()}.<br />
%%
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec addTool(This, Toolid, Bitmap, BmpDisabled, Toggle, XPos) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), Toggle::boolean(), XPos::integer();
(This, Toolid, Label, Bitmap, BmpDisabled, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(),
- Option :: {kind, wx:wx_enum()}
- | {shortHelp, unicode:chardata()}
- | {longHelp, unicode:chardata()}
- | {data, wx:wx_object()}.
+ Option :: {'kind', wx:wx_enum()}
+ | {'shortHelp', unicode:chardata()}
+ | {'longHelp', unicode:chardata()}
+ | {'data', wx:wx_object()}.
addTool(This,Toolid,Bitmap,BmpDisabled,Toggle,XPos)
when is_record(This, wx_ref),is_integer(Toolid),is_record(Bitmap, wx_ref),is_record(BmpDisabled, wx_ref),is_boolean(Toggle),is_integer(XPos) ->
@@ -254,10 +254,10 @@ addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,ref=Bi
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbaraddtool">external documentation</a>.
-spec addTool(This, Toolid, Bitmap, BmpDisabled, Toggle, XPos, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(), BmpDisabled::wxBitmap:wxBitmap(), Toggle::boolean(), XPos::integer(),
- Option :: {yPos, integer()}
- | {clientData, wx:wx_object()}
- | {shortHelp, unicode:chardata()}
- | {longHelp, unicode:chardata()}.
+ Option :: {'yPos', integer()}
+ | {'clientData', wx:wx_object()}
+ | {'shortHelp', unicode:chardata()}
+ | {'longHelp', unicode:chardata()}.
addTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,#wx_ref{type=BitmapT,ref=BitmapRef},#wx_ref{type=BmpDisabledT,ref=BmpDisabledRef},Toggle,XPos, Options)
when is_integer(Toolid),is_boolean(Toggle),is_integer(XPos),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -283,10 +283,10 @@ addCheckTool(This,Toolid,Label,Bitmap)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbaraddchecktool">external documentation</a>.
-spec addCheckTool(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {bmpDisabled, wxBitmap:wxBitmap()}
- | {shortHelp, unicode:chardata()}
- | {longHelp, unicode:chardata()}
- | {data, wx:wx_object()}.
+ Option :: {'bmpDisabled', wxBitmap:wxBitmap()}
+ | {'shortHelp', unicode:chardata()}
+ | {'longHelp', unicode:chardata()}
+ | {'data', wx:wx_object()}.
addCheckTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Toolid),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -312,10 +312,10 @@ addRadioTool(This,Toolid,Label,Bitmap)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbaraddradiotool">external documentation</a>.
-spec addRadioTool(This, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
This::wxToolBar(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {bmpDisabled, wxBitmap:wxBitmap()}
- | {shortHelp, unicode:chardata()}
- | {longHelp, unicode:chardata()}
- | {data, wx:wx_object()}.
+ Option :: {'bmpDisabled', wxBitmap:wxBitmap()}
+ | {'shortHelp', unicode:chardata()}
+ | {'longHelp', unicode:chardata()}
+ | {'data', wx:wx_object()}.
addRadioTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Label,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Toolid),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -366,7 +366,7 @@ deleteToolByPos(#wx_ref{type=ThisT,ref=ThisRef},Pos)
<<ThisRef:32/?UI,Pos:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarenabletool">external documentation</a>.
--spec enableTool(This, Toolid, Enable) -> ok when
+-spec enableTool(This, Toolid, Enable) -> 'ok' when
This::wxToolBar(), Toolid::integer(), Enable::boolean().
enableTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Enable)
when is_integer(Toolid),is_boolean(Enable) ->
@@ -527,22 +527,22 @@ insertTool(This,Pos,Toolid,Bitmap)
%% <br /> Also:<br />
%% insertTool(This, Pos, Toolid, Bitmap, [Option]) -> wx:wx_object() when<br />
%% This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),<br />
-%% Option :: {bmpDisabled, wxBitmap:wxBitmap()}<br />
-%% | {toggle, boolean()}<br />
-%% | {clientData, wx:wx_object()}<br />
-%% | {shortHelp, unicode:chardata()}<br />
-%% | {longHelp, unicode:chardata()}.<br />
+%% Option :: {'bmpDisabled', wxBitmap:wxBitmap()}<br />
+%% | {'toggle', boolean()}<br />
+%% | {'clientData', wx:wx_object()}<br />
+%% | {'shortHelp', unicode:chardata()}<br />
+%% | {'longHelp', unicode:chardata()}.<br />
%%
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec insertTool(This, Pos, Toolid, Label, Bitmap) -> wx:wx_object() when
This::wxToolBar(), Pos::integer(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap();
(This, Pos, Toolid, Bitmap, [Option]) -> wx:wx_object() when
This::wxToolBar(), Pos::integer(), Toolid::integer(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {bmpDisabled, wxBitmap:wxBitmap()}
- | {toggle, boolean()}
- | {clientData, wx:wx_object()}
- | {shortHelp, unicode:chardata()}
- | {longHelp, unicode:chardata()}.
+ Option :: {'bmpDisabled', wxBitmap:wxBitmap()}
+ | {'toggle', boolean()}
+ | {'clientData', wx:wx_object()}
+ | {'shortHelp', unicode:chardata()}
+ | {'longHelp', unicode:chardata()}.
insertTool(This,Pos,Toolid,Label,Bitmap)
when is_record(This, wx_ref),is_integer(Pos),is_integer(Toolid),is_list(Label),is_record(Bitmap, wx_ref) ->
@@ -565,11 +565,11 @@ insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,Toolid,#wx_ref{type=BitmapT,ref=B
%%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX
-spec insertTool(This, Pos, Toolid, Label, Bitmap, [Option]) -> wx:wx_object() when
This::wxToolBar(), Pos::integer(), Toolid::integer(), Label::unicode:chardata(), Bitmap::wxBitmap:wxBitmap(),
- Option :: {bmpDisabled, wxBitmap:wxBitmap()}
- | {kind, wx:wx_enum()}
- | {shortHelp, unicode:chardata()}
- | {longHelp, unicode:chardata()}
- | {clientData, wx:wx_object()}.
+ Option :: {'bmpDisabled', wxBitmap:wxBitmap()}
+ | {'kind', wx:wx_enum()}
+ | {'shortHelp', unicode:chardata()}
+ | {'longHelp', unicode:chardata()}
+ | {'clientData', wx:wx_object()}.
insertTool(#wx_ref{type=ThisT,ref=ThisRef},Pos,Toolid,Label,#wx_ref{type=BitmapT,ref=BitmapRef}, Options)
when is_integer(Pos),is_integer(Toolid),is_list(Label),is_list(Options) ->
?CLASS(ThisT,wxToolBar),
@@ -603,7 +603,7 @@ removeTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid)
<<ThisRef:32/?UI,Toolid:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarsetmargins">external documentation</a>.
--spec setMargins(This, X, Y) -> ok when
+-spec setMargins(This, X, Y) -> 'ok' when
This::wxToolBar(), X::integer(), Y::integer().
setMargins(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -612,7 +612,7 @@ setMargins(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarsettoolbitmapsize">external documentation</a>.
--spec setToolBitmapSize(This, Size) -> ok when
+-spec setToolBitmapSize(This, Size) -> 'ok' when
This::wxToolBar(), Size::{W::integer(), H::integer()}.
setToolBitmapSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -621,7 +621,7 @@ setToolBitmapSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarsettoollonghelp">external documentation</a>.
--spec setToolLongHelp(This, Toolid, HelpString) -> ok when
+-spec setToolLongHelp(This, Toolid, HelpString) -> 'ok' when
This::wxToolBar(), Toolid::integer(), HelpString::unicode:chardata().
setToolLongHelp(#wx_ref{type=ThisT,ref=ThisRef},Toolid,HelpString)
when is_integer(Toolid),is_list(HelpString) ->
@@ -631,7 +631,7 @@ setToolLongHelp(#wx_ref{type=ThisT,ref=ThisRef},Toolid,HelpString)
<<ThisRef:32/?UI,Toolid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarsettoolpacking">external documentation</a>.
--spec setToolPacking(This, Packing) -> ok when
+-spec setToolPacking(This, Packing) -> 'ok' when
This::wxToolBar(), Packing::integer().
setToolPacking(#wx_ref{type=ThisT,ref=ThisRef},Packing)
when is_integer(Packing) ->
@@ -640,7 +640,7 @@ setToolPacking(#wx_ref{type=ThisT,ref=ThisRef},Packing)
<<ThisRef:32/?UI,Packing:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarsettoolshorthelp">external documentation</a>.
--spec setToolShortHelp(This, Id, HelpString) -> ok when
+-spec setToolShortHelp(This, Id, HelpString) -> 'ok' when
This::wxToolBar(), Id::integer(), HelpString::unicode:chardata().
setToolShortHelp(#wx_ref{type=ThisT,ref=ThisRef},Id,HelpString)
when is_integer(Id),is_list(HelpString) ->
@@ -650,7 +650,7 @@ setToolShortHelp(#wx_ref{type=ThisT,ref=ThisRef},Id,HelpString)
<<ThisRef:32/?UI,Id:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbarsettoolseparation">external documentation</a>.
--spec setToolSeparation(This, Separation) -> ok when
+-spec setToolSeparation(This, Separation) -> 'ok' when
This::wxToolBar(), Separation::integer().
setToolSeparation(#wx_ref{type=ThisT,ref=ThisRef},Separation)
when is_integer(Separation) ->
@@ -659,7 +659,7 @@ setToolSeparation(#wx_ref{type=ThisT,ref=ThisRef},Separation)
<<ThisRef:32/?UI,Separation:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbar.html#wxtoolbartoggletool">external documentation</a>.
--spec toggleTool(This, Toolid, Toggle) -> ok when
+-spec toggleTool(This, Toolid, Toggle) -> 'ok' when
This::wxToolBar(), Toolid::integer(), Toggle::boolean().
toggleTool(#wx_ref{type=ThisT,ref=ThisRef},Toolid,Toggle)
when is_integer(Toolid),is_boolean(Toggle) ->
diff --git a/lib/wx/src/gen/wxToolTip.erl b/lib/wx/src/gen/wxToolTip.erl
index 78831de8c5..163e764d8c 100644
--- a/lib/wx/src/gen/wxToolTip.erl
+++ b/lib/wx/src/gen/wxToolTip.erl
@@ -36,7 +36,7 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxToolTip() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtooltip.html#wxtooltipenable">external documentation</a>.
--spec enable(Flag) -> ok when
+-spec enable(Flag) -> 'ok' when
Flag::boolean().
enable(Flag)
when is_boolean(Flag) ->
@@ -44,7 +44,7 @@ enable(Flag)
<<(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtooltip.html#wxtooltipsetdelay">external documentation</a>.
--spec setDelay(Msecs) -> ok when
+-spec setDelay(Msecs) -> 'ok' when
Msecs::integer().
setDelay(Msecs)
when is_integer(Msecs) ->
@@ -61,7 +61,7 @@ new(Tip)
<<(byte_size(Tip_UC)):32/?UI,(Tip_UC)/binary, 0:(((8- ((4+byte_size(Tip_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtooltip.html#wxtooltipsettip">external documentation</a>.
--spec setTip(This, Tip) -> ok when
+-spec setTip(This, Tip) -> 'ok' when
This::wxToolTip(), Tip::unicode:chardata().
setTip(#wx_ref{type=ThisT,ref=ThisRef},Tip)
when is_list(Tip) ->
@@ -87,7 +87,7 @@ getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxToolTip()) -> ok.
+-spec destroy(This::wxToolTip()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxToolTip),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxToolbook.erl b/lib/wx/src/gen/wxToolbook.erl
index cf77aefd8a..92dcbc726b 100644
--- a/lib/wx/src/gen/wxToolbook.erl
+++ b/lib/wx/src/gen/wxToolbook.erl
@@ -101,9 +101,9 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbookwxtoolbook">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxToolbook() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -126,8 +126,8 @@ addPage(This,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbookaddpage">external documentation</a>.
-spec addPage(This, Page, Text, [Option]) -> boolean() when
This::wxToolbook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -141,7 +141,7 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
<<ThisRef:32/?UI,PageRef: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>>).
%% @equiv advanceSelection(This, [])
--spec advanceSelection(This) -> ok when
+-spec advanceSelection(This) -> 'ok' when
This::wxToolbook().
advanceSelection(This)
@@ -149,9 +149,9 @@ advanceSelection(This)
advanceSelection(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbookadvanceselection">external documentation</a>.
--spec advanceSelection(This, [Option]) -> ok when
+-spec advanceSelection(This, [Option]) -> 'ok' when
This::wxToolbook(),
- Option :: {forward, boolean()}.
+ Option :: {'forward', boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -162,7 +162,7 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbookassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList) -> ok when
+-spec assignImageList(This, ImageList) -> 'ok' when
This::wxToolbook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxToolbook),
@@ -181,9 +181,9 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbookcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxToolbook(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -302,8 +302,8 @@ insertPage(This,N,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbookinsertpage">external documentation</a>.
-spec insertPage(This, N, Page, Text, [Option]) -> boolean() when
This::wxToolbook(), N::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(N),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxToolbook),
@@ -317,7 +317,7 @@ insertPage(#wx_ref{type=ThisT,ref=ThisRef},N,#wx_ref{type=PageT,ref=PageRef},Tex
<<ThisRef:32/?UI,N:32/?UI,PageRef: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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbooksetimagelist">external documentation</a>.
--spec setImageList(This, ImageList) -> ok when
+-spec setImageList(This, ImageList) -> 'ok' when
This::wxToolbook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxToolbook),
@@ -326,7 +326,7 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoolbook.html#wxtoolbooksetpagesize">external documentation</a>.
--spec setPageSize(This, Size) -> ok when
+-spec setPageSize(This, Size) -> 'ok' when
This::wxToolbook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -372,7 +372,7 @@ changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxToolbook()) -> ok.
+-spec destroy(This::wxToolbook()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxToolbook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTopLevelWindow.erl b/lib/wx/src/gen/wxTopLevelWindow.erl
index 72813b0073..6ba81691c7 100644
--- a/lib/wx/src/gen/wxTopLevelWindow.erl
+++ b/lib/wx/src/gen/wxTopLevelWindow.erl
@@ -114,7 +114,7 @@ isActive(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv iconize(This, [])
--spec iconize(This) -> ok when
+-spec iconize(This) -> 'ok' when
This::wxTopLevelWindow().
iconize(This)
@@ -122,9 +122,9 @@ iconize(This)
iconize(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowiconize">external documentation</a>.
--spec iconize(This, [Option]) -> ok when
+-spec iconize(This, [Option]) -> 'ok' when
This::wxTopLevelWindow(),
- Option :: {iconize, boolean()}.
+ Option :: {'iconize', boolean()}.
iconize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -159,7 +159,7 @@ isMaximized(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv maximize(This, [])
--spec maximize(This) -> ok when
+-spec maximize(This) -> 'ok' when
This::wxTopLevelWindow().
maximize(This)
@@ -167,9 +167,9 @@ maximize(This)
maximize(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowmaximize">external documentation</a>.
--spec maximize(This, [Option]) -> ok when
+-spec maximize(This, [Option]) -> 'ok' when
This::wxTopLevelWindow(),
- Option :: {maximize, boolean()}.
+ Option :: {'maximize', boolean()}.
maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -180,7 +180,7 @@ maximize(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv requestUserAttention(This, [])
--spec requestUserAttention(This) -> ok when
+-spec requestUserAttention(This) -> 'ok' when
This::wxTopLevelWindow().
requestUserAttention(This)
@@ -188,9 +188,9 @@ requestUserAttention(This)
requestUserAttention(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowrequestuserattention">external documentation</a>.
--spec requestUserAttention(This, [Option]) -> ok when
+-spec requestUserAttention(This, [Option]) -> 'ok' when
This::wxTopLevelWindow(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
requestUserAttention(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -201,7 +201,7 @@ requestUserAttention(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowseticon">external documentation</a>.
--spec setIcon(This, Icon) -> ok when
+-spec setIcon(This, Icon) -> 'ok' when
This::wxTopLevelWindow(), Icon::wxIcon:wxIcon().
setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -210,7 +210,7 @@ setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
<<ThisRef:32/?UI,IconRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowseticons">external documentation</a>.
--spec setIcons(This, Icons) -> ok when
+-spec setIcons(This, Icons) -> 'ok' when
This::wxTopLevelWindow(), Icons::wxIconBundle:wxIconBundle().
setIcons(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconsT,ref=IconsRef}) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -219,7 +219,7 @@ setIcons(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconsT,ref=IconsRef}) ->
<<ThisRef:32/?UI,IconsRef:32/?UI>>).
%% @equiv centerOnScreen(This, [])
--spec centerOnScreen(This) -> ok when
+-spec centerOnScreen(This) -> 'ok' when
This::wxTopLevelWindow().
centerOnScreen(This)
@@ -227,9 +227,9 @@ centerOnScreen(This)
centerOnScreen(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowcenteronscreen">external documentation</a>.
--spec centerOnScreen(This, [Option]) -> ok when
+-spec centerOnScreen(This, [Option]) -> 'ok' when
This::wxTopLevelWindow(),
- Option :: {dir, integer()}.
+ Option :: {'dir', integer()}.
centerOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -240,7 +240,7 @@ centerOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv centreOnScreen(This, [])
--spec centreOnScreen(This) -> ok when
+-spec centreOnScreen(This) -> 'ok' when
This::wxTopLevelWindow().
centreOnScreen(This)
@@ -248,9 +248,9 @@ centreOnScreen(This)
centreOnScreen(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowcentreonscreen">external documentation</a>.
--spec centreOnScreen(This, [Option]) -> ok when
+-spec centreOnScreen(This, [Option]) -> 'ok' when
This::wxTopLevelWindow(),
- Option :: {dir, integer()}.
+ Option :: {'dir', integer()}.
centreOnScreen(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
@@ -270,7 +270,7 @@ setShape(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
<<ThisRef:32/?UI,RegionRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowsettitle">external documentation</a>.
--spec setTitle(This, Title) -> ok when
+-spec setTitle(This, Title) -> 'ok' when
This::wxTopLevelWindow(), Title::unicode:chardata().
setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title)
when is_list(Title) ->
@@ -290,7 +290,7 @@ showFullScreen(This,Show)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtoplevelwindow.html#wxtoplevelwindowshowfullscreen">external documentation</a>.
-spec showFullScreen(This, Show, [Option]) -> boolean() when
This::wxTopLevelWindow(), Show::boolean(),
- Option :: {style, integer()}.
+ Option :: {'style', integer()}.
showFullScreen(#wx_ref{type=ThisT,ref=ThisRef},Show, Options)
when is_boolean(Show),is_list(Options) ->
?CLASS(ThisT,wxTopLevelWindow),
diff --git a/lib/wx/src/gen/wxTreeCtrl.erl b/lib/wx/src/gen/wxTreeCtrl.erl
index 43dee9107d..97b43309ad 100644
--- a/lib/wx/src/gen/wxTreeCtrl.erl
+++ b/lib/wx/src/gen/wxTreeCtrl.erl
@@ -117,11 +117,11 @@ new(Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlwxtreectrl">external documentation</a>.
-spec new(Parent, [Option]) -> wxTreeCtrl() when
Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
new(#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -146,9 +146,9 @@ addRoot(This,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrladdroot">external documentation</a>.
-spec addRoot(This, Text, [Option]) -> integer() when
This::wxTreeCtrl(), Text::unicode:chardata(),
- Option :: {image, integer()}
- | {selectedImage, integer()}
- | {data, term()}.
+ Option :: {'image', integer()}
+ | {'selectedImage', integer()}
+ | {'data', term()}.
addRoot(#wx_ref{type=ThisT,ref=ThisRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -172,9 +172,9 @@ appendItem(This,Parent,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlappenditem">external documentation</a>.
-spec appendItem(This, Parent, Text, [Option]) -> integer() when
This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata(),
- Option :: {image, integer()}
- | {selectedImage, integer()}
- | {data, term()}.
+ Option :: {'image', integer()}
+ | {'selectedImage', integer()}
+ | {'data', term()}.
appendItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
when is_integer(Parent),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -188,7 +188,7 @@ appendItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList) -> ok when
+-spec assignImageList(This, ImageList) -> 'ok' when
This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -197,7 +197,7 @@ assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=Imag
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlassignstateimagelist">external documentation</a>.
--spec assignStateImageList(This, ImageList) -> ok when
+-spec assignStateImageList(This, ImageList) -> 'ok' when
This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
assignStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -206,7 +206,7 @@ assignStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlcollapse">external documentation</a>.
--spec collapse(This, Item) -> ok when
+-spec collapse(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
collapse(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -215,7 +215,7 @@ collapse(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlcollapseandreset">external documentation</a>.
--spec collapseAndReset(This, Item) -> ok when
+-spec collapseAndReset(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
collapseAndReset(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -234,11 +234,11 @@ create(This,Parent)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlcreate">external documentation</a>.
-spec create(This, Parent, [Option]) -> boolean() when
This::wxTreeCtrl(), Parent::wxWindow:wxWindow(),
- Option :: {id, integer()}
- | {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}
- | {validator, wx:wx_object()}.
+ Option :: {'id', integer()}
+ | {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}
+ | {'validator', wx:wx_object()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -254,7 +254,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef}, Opti
<<ThisRef:32/?UI,ParentRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrldelete">external documentation</a>.
--spec delete(This, Item) -> ok when
+-spec delete(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
delete(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -263,7 +263,7 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrldeleteallitems">external documentation</a>.
--spec deleteAllItems(This) -> ok when
+-spec deleteAllItems(This) -> 'ok' when
This::wxTreeCtrl().
deleteAllItems(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -271,7 +271,7 @@ deleteAllItems(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrldeletechildren">external documentation</a>.
--spec deleteChildren(This, Item) -> ok when
+-spec deleteChildren(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
deleteChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -289,7 +289,7 @@ editLabel(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlensurevisible">external documentation</a>.
--spec ensureVisible(This, Item) -> ok when
+-spec ensureVisible(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -298,7 +298,7 @@ ensureVisible(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlexpand">external documentation</a>.
--spec expand(This, Item) -> ok when
+-spec expand(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
expand(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -319,7 +319,7 @@ getBoundingRect(This,Item)
-spec getBoundingRect(This, Item, [Option]) -> Result when
Result :: {Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}},
This::wxTreeCtrl(), Item::integer(),
- Option :: {textOnly, boolean()}.
+ Option :: {'textOnly', boolean()}.
getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -340,7 +340,7 @@ getChildrenCount(This,Item)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlgetchildrencount">external documentation</a>.
-spec getChildrenCount(This, Item, [Option]) -> integer() when
This::wxTreeCtrl(), Item::integer(),
- Option :: {recursively, boolean()}.
+ Option :: {'recursively', boolean()}.
getChildrenCount(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -450,7 +450,7 @@ getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item)
%%<br /> Which = ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
-spec getItemImage(This, Item, [Option]) -> integer() when
This::wxTreeCtrl(), Item::integer(),
- Option :: {which, wx:wx_enum()}.
+ Option :: {'which', wx:wx_enum()}.
getItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -586,9 +586,9 @@ insertItem(This,Parent,Pos,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlinsertitem">external documentation</a>.
-spec insertItem(This, Parent, Pos, Text, [Option]) -> integer() when
This::wxTreeCtrl(), Parent::integer(), Pos::integer(), Text::unicode:chardata(),
- Option :: {image, integer()}
- | {selImage, integer()}
- | {data, term()}.
+ Option :: {'image', integer()}
+ | {'selImage', integer()}
+ | {'data', term()}.
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),
@@ -665,9 +665,9 @@ prependItem(This,Parent,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlprependitem">external documentation</a>.
-spec prependItem(This, Parent, Text, [Option]) -> integer() when
This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata(),
- Option :: {image, integer()}
- | {selectedImage, integer()}
- | {data, term()}.
+ Option :: {'image', integer()}
+ | {'selectedImage', integer()}
+ | {'data', term()}.
prependItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
when is_integer(Parent),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -681,7 +681,7 @@ prependItem(#wx_ref{type=ThisT,ref=ThisRef},Parent,Text, Options)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlscrollto">external documentation</a>.
--spec scrollTo(This, Item) -> ok when
+-spec scrollTo(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
scrollTo(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -690,7 +690,7 @@ scrollTo(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlselectitem">external documentation</a>.
--spec selectItem(This, Item) -> ok when
+-spec selectItem(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -699,9 +699,9 @@ selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlselectitem">external documentation</a>.
--spec selectItem(This, Item, [Option]) -> ok when
+-spec selectItem(This, Item, [Option]) -> 'ok' when
This::wxTreeCtrl(), Item::integer(),
- Option :: {select, boolean()}.
+ Option :: {'select', boolean()}.
selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -712,7 +712,7 @@ selectItem(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetindent">external documentation</a>.
--spec setIndent(This, Indent) -> ok when
+-spec setIndent(This, Indent) -> 'ok' when
This::wxTreeCtrl(), Indent::integer().
setIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
when is_integer(Indent) ->
@@ -721,7 +721,7 @@ setIndent(#wx_ref{type=ThisT,ref=ThisRef},Indent)
<<ThisRef:32/?UI,Indent:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetimagelist">external documentation</a>.
--spec setImageList(This, ImageList) -> ok when
+-spec setImageList(This, ImageList) -> 'ok' when
This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -730,7 +730,7 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitembackgroundcolour">external documentation</a>.
--spec setItemBackgroundColour(This, Item, Col) -> ok when
+-spec setItemBackgroundColour(This, Item, Col) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Col::wx:wx_colour().
setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -739,7 +739,7 @@ setItemBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
<<ThisRef:32/?UI,0:32,Item:64/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @equiv setItemBold(This,Item, [])
--spec setItemBold(This, Item) -> ok when
+-spec setItemBold(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
setItemBold(This,Item)
@@ -747,9 +747,9 @@ setItemBold(This,Item)
setItemBold(This,Item, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitembold">external documentation</a>.
--spec setItemBold(This, Item, [Option]) -> ok when
+-spec setItemBold(This, Item, [Option]) -> 'ok' when
This::wxTreeCtrl(), Item::integer(),
- Option :: {bold, boolean()}.
+ Option :: {'bold', boolean()}.
setItemBold(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -760,7 +760,7 @@ setItemBold(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemdata">external documentation</a>.
--spec setItemData(This, Item, Data) -> ok when
+-spec setItemData(This, Item, Data) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Data::term().
setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
when is_integer(Item) ->
@@ -770,7 +770,7 @@ setItemData(#wx_ref{type=ThisT,ref=ThisRef},Item,Data)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @equiv setItemDropHighlight(This,Item, [])
--spec setItemDropHighlight(This, Item) -> ok when
+-spec setItemDropHighlight(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
setItemDropHighlight(This,Item)
@@ -778,9 +778,9 @@ setItemDropHighlight(This,Item)
setItemDropHighlight(This,Item, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemdrophighlight">external documentation</a>.
--spec setItemDropHighlight(This, Item, [Option]) -> ok when
+-spec setItemDropHighlight(This, Item, [Option]) -> 'ok' when
This::wxTreeCtrl(), Item::integer(),
- Option :: {highlight, boolean()}.
+ Option :: {'highlight', boolean()}.
setItemDropHighlight(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -791,7 +791,7 @@ setItemDropHighlight(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemfont">external documentation</a>.
--spec setItemFont(This, Item, Font) -> ok when
+-spec setItemFont(This, Item, Font) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Font::wxFont:wxFont().
setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FontT,ref=FontRef})
when is_integer(Item) ->
@@ -801,7 +801,7 @@ setItemFont(#wx_ref{type=ThisT,ref=ThisRef},Item,#wx_ref{type=FontT,ref=FontRef}
<<ThisRef:32/?UI,0:32,Item:64/?UI,FontRef:32/?UI>>).
%% @equiv setItemHasChildren(This,Item, [])
--spec setItemHasChildren(This, Item) -> ok when
+-spec setItemHasChildren(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
setItemHasChildren(This,Item)
@@ -809,9 +809,9 @@ setItemHasChildren(This,Item)
setItemHasChildren(This,Item, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemhaschildren">external documentation</a>.
--spec setItemHasChildren(This, Item, [Option]) -> ok when
+-spec setItemHasChildren(This, Item, [Option]) -> 'ok' when
This::wxTreeCtrl(), Item::integer(),
- Option :: {has, boolean()}.
+ Option :: {'has', boolean()}.
setItemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
when is_integer(Item),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -822,7 +822,7 @@ setItemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item, Options)
<<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemimage">external documentation</a>.
--spec setItemImage(This, Item, Image) -> ok when
+-spec setItemImage(This, Item, Image) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Image::integer().
setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image)
when is_integer(Item),is_integer(Image) ->
@@ -832,9 +832,9 @@ setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemimage">external documentation</a>.
%%<br /> Which = ?wxTreeItemIcon_Normal | ?wxTreeItemIcon_Selected | ?wxTreeItemIcon_Expanded | ?wxTreeItemIcon_SelectedExpanded | ?wxTreeItemIcon_Max
--spec setItemImage(This, Item, Image, [Option]) -> ok when
+-spec setItemImage(This, Item, Image, [Option]) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Image::integer(),
- Option :: {which, wx:wx_enum()}.
+ Option :: {'which', wx:wx_enum()}.
setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
when is_integer(Item),is_integer(Image),is_list(Options) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -845,7 +845,7 @@ setItemImage(#wx_ref{type=ThisT,ref=ThisRef},Item,Image, Options)
<<ThisRef:32/?UI,0:32,Item:64/?UI,Image:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemtext">external documentation</a>.
--spec setItemText(This, Item, Text) -> ok when
+-spec setItemText(This, Item, Text) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Text::unicode:chardata().
setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
when is_integer(Item),is_list(Text) ->
@@ -855,7 +855,7 @@ setItemText(#wx_ref{type=ThisT,ref=ThisRef},Item,Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetitemtextcolour">external documentation</a>.
--spec setItemTextColour(This, Item, Col) -> ok when
+-spec setItemTextColour(This, Item, Col) -> 'ok' when
This::wxTreeCtrl(), Item::integer(), Col::wx:wx_colour().
setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
when is_integer(Item),tuple_size(Col) =:= 3; tuple_size(Col) =:= 4 ->
@@ -864,7 +864,7 @@ setItemTextColour(#wx_ref{type=ThisT,ref=ThisRef},Item,Col)
<<ThisRef:32/?UI,0:32,Item:64/?UI,(wxe_util:colour_bin(Col)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetstateimagelist">external documentation</a>.
--spec setStateImageList(This, ImageList) -> ok when
+-spec setStateImageList(This, ImageList) -> 'ok' when
This::wxTreeCtrl(), ImageList::wxImageList:wxImageList().
setStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -873,7 +873,7 @@ setStateImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=Im
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsetwindowstyle">external documentation</a>.
--spec setWindowStyle(This, Styles) -> ok when
+-spec setWindowStyle(This, Styles) -> 'ok' when
This::wxTreeCtrl(), Styles::integer().
setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Styles)
when is_integer(Styles) ->
@@ -882,7 +882,7 @@ setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Styles)
<<ThisRef:32/?UI,Styles:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlsortchildren">external documentation</a>.
--spec sortChildren(This, Item) -> ok when
+-spec sortChildren(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
sortChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -891,7 +891,7 @@ sortChildren(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrltoggle">external documentation</a>.
--spec toggle(This, Item) -> ok when
+-spec toggle(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
toggle(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -900,7 +900,7 @@ toggle(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrltoggleitemselection">external documentation</a>.
--spec toggleItemSelection(This, Item) -> ok when
+-spec toggleItemSelection(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
toggleItemSelection(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -909,7 +909,7 @@ toggleItemSelection(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlunselect">external documentation</a>.
--spec unselect(This) -> ok when
+-spec unselect(This) -> 'ok' when
This::wxTreeCtrl().
unselect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -917,7 +917,7 @@ unselect(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlunselectall">external documentation</a>.
--spec unselectAll(This) -> ok when
+-spec unselectAll(This) -> 'ok' when
This::wxTreeCtrl().
unselectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxTreeCtrl),
@@ -925,7 +925,7 @@ unselectAll(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreectrl.html#wxtreectrlunselectitem">external documentation</a>.
--spec unselectItem(This, Item) -> ok when
+-spec unselectItem(This, Item) -> 'ok' when
This::wxTreeCtrl(), Item::integer().
unselectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
when is_integer(Item) ->
@@ -934,7 +934,7 @@ unselectItem(#wx_ref{type=ThisT,ref=ThisRef},Item)
<<ThisRef:32/?UI,0:32,Item:64/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTreeCtrl()) -> ok.
+-spec destroy(This::wxTreeCtrl()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTreeCtrl),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxTreeEvent.erl b/lib/wx/src/gen/wxTreeEvent.erl
index 5200a7a8e9..41e86fe41f 100644
--- a/lib/wx/src/gen/wxTreeEvent.erl
+++ b/lib/wx/src/gen/wxTreeEvent.erl
@@ -108,7 +108,7 @@ isEditCancelled(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreeevent.html#wxtreeeventsettooltip">external documentation</a>.
--spec setToolTip(This, ToolTip) -> ok when
+-spec setToolTip(This, ToolTip) -> 'ok' when
This::wxTreeEvent(), ToolTip::unicode:chardata().
setToolTip(#wx_ref{type=ThisT,ref=ThisRef},ToolTip)
when is_list(ToolTip) ->
diff --git a/lib/wx/src/gen/wxTreebook.erl b/lib/wx/src/gen/wxTreebook.erl
index 1900f47289..5d3c177f7e 100644
--- a/lib/wx/src/gen/wxTreebook.erl
+++ b/lib/wx/src/gen/wxTreebook.erl
@@ -102,9 +102,9 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookwxtreebook">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxTreebook() when
Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -127,8 +127,8 @@ addPage(This,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookaddpage">external documentation</a>.
-spec addPage(This, Page, Text, [Option]) -> boolean() when
This::wxTreebook(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -142,7 +142,7 @@ addPage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PageT,ref=PageRef},Text, Op
<<ThisRef:32/?UI,PageRef: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>>).
%% @equiv advanceSelection(This, [])
--spec advanceSelection(This) -> ok when
+-spec advanceSelection(This) -> 'ok' when
This::wxTreebook().
advanceSelection(This)
@@ -150,9 +150,9 @@ advanceSelection(This)
advanceSelection(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookadvanceselection">external documentation</a>.
--spec advanceSelection(This, [Option]) -> ok when
+-spec advanceSelection(This, [Option]) -> 'ok' when
This::wxTreebook(),
- Option :: {forward, boolean()}.
+ Option :: {'forward', boolean()}.
advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -163,7 +163,7 @@ advanceSelection(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookassignimagelist">external documentation</a>.
--spec assignImageList(This, ImageList) -> ok when
+-spec assignImageList(This, ImageList) -> 'ok' when
This::wxTreebook(), ImageList::wxImageList:wxImageList().
assignImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreebook),
@@ -182,9 +182,9 @@ create(This,Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookcreate">external documentation</a>.
-spec create(This, Parent, Id, [Option]) -> boolean() when
This::wxTreebook(), Parent::wxWindow:wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -293,7 +293,7 @@ expandNode(This,Pos)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookexpandnode">external documentation</a>.
-spec expandNode(This, Pos, [Option]) -> boolean() when
This::wxTreebook(), Pos::integer(),
- Option :: {expand, boolean()}.
+ Option :: {'expand', boolean()}.
expandNode(#wx_ref{type=ThisT,ref=ThisRef},Pos, Options)
when is_integer(Pos),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -333,8 +333,8 @@ insertPage(This,Pos,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookinsertpage">external documentation</a>.
-spec insertPage(This, Pos, Page, Text, [Option]) -> boolean() when
This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
insertPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(Pos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -358,8 +358,8 @@ insertSubPage(This,Pos,Page,Text)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebookinsertsubpage">external documentation</a>.
-spec insertSubPage(This, Pos, Page, Text, [Option]) -> boolean() when
This::wxTreebook(), Pos::integer(), Page::wxWindow:wxWindow(), Text::unicode:chardata(),
- Option :: {bSelect, boolean()}
- | {imageId, integer()}.
+ Option :: {'bSelect', boolean()}
+ | {'imageId', integer()}.
insertSubPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef},Text, Options)
when is_integer(Pos),is_list(Text),is_list(Options) ->
?CLASS(ThisT,wxTreebook),
@@ -373,7 +373,7 @@ insertSubPage(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=PageT,ref=PageRef
<<ThisRef:32/?UI,Pos:32/?UI,PageRef: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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebooksetimagelist">external documentation</a>.
--spec setImageList(This, ImageList) -> ok when
+-spec setImageList(This, ImageList) -> 'ok' when
This::wxTreebook(), ImageList::wxImageList:wxImageList().
setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageListRef}) ->
?CLASS(ThisT,wxTreebook),
@@ -382,7 +382,7 @@ setImageList(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ImageListT,ref=ImageLi
<<ThisRef:32/?UI,ImageListRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxtreebook.html#wxtreebooksetpagesize">external documentation</a>.
--spec setPageSize(This, Size) -> ok when
+-spec setPageSize(This, Size) -> 'ok' when
This::wxTreebook(), Size::{W::integer(), H::integer()}.
setPageSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -428,7 +428,7 @@ changeSelection(#wx_ref{type=ThisT,ref=ThisRef},N)
<<ThisRef:32/?UI,N:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxTreebook()) -> ok.
+-spec destroy(This::wxTreebook()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxTreebook),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxUpdateUIEvent.erl b/lib/wx/src/gen/wxUpdateUIEvent.erl
index db126eec40..fec42ed8eb 100644
--- a/lib/wx/src/gen/wxUpdateUIEvent.erl
+++ b/lib/wx/src/gen/wxUpdateUIEvent.erl
@@ -59,7 +59,7 @@ canUpdate(#wx_ref{type=WinT,ref=WinRef}) ->
<<WinRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventcheck">external documentation</a>.
--spec check(This, Check) -> ok when
+-spec check(This, Check) -> 'ok' when
This::wxUpdateUIEvent(), Check::boolean().
check(#wx_ref{type=ThisT,ref=ThisRef},Check)
when is_boolean(Check) ->
@@ -68,7 +68,7 @@ check(#wx_ref{type=ThisT,ref=ThisRef},Check)
<<ThisRef:32/?UI,(wxe_util:from_bool(Check)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventenable">external documentation</a>.
--spec enable(This, Enable) -> ok when
+-spec enable(This, Enable) -> 'ok' when
This::wxUpdateUIEvent(), Enable::boolean().
enable(#wx_ref{type=ThisT,ref=ThisRef},Enable)
when is_boolean(Enable) ->
@@ -77,7 +77,7 @@ enable(#wx_ref{type=ThisT,ref=ThisRef},Enable)
<<ThisRef:32/?UI,(wxe_util:from_bool(Enable)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventshow">external documentation</a>.
--spec show(This, Show) -> ok when
+-spec show(This, Show) -> 'ok' when
This::wxUpdateUIEvent(), Show::boolean().
show(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
@@ -163,14 +163,14 @@ getUpdateInterval() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventresetupdatetime">external documentation</a>.
--spec resetUpdateTime() -> ok.
+-spec resetUpdateTime() -> 'ok'.
resetUpdateTime() ->
wxe_util:cast(?wxUpdateUIEvent_ResetUpdateTime,
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventsetmode">external documentation</a>.
%%<br /> Mode = ?wxUPDATE_UI_PROCESS_ALL | ?wxUPDATE_UI_PROCESS_SPECIFIED
--spec setMode(Mode) -> ok when
+-spec setMode(Mode) -> 'ok' when
Mode::wx:wx_enum().
setMode(Mode)
when is_integer(Mode) ->
@@ -178,7 +178,7 @@ setMode(Mode)
<<Mode:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventsettext">external documentation</a>.
--spec setText(This, Text) -> ok when
+-spec setText(This, Text) -> 'ok' when
This::wxUpdateUIEvent(), Text::unicode:chardata().
setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -188,7 +188,7 @@ setText(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxupdateuievent.html#wxupdateuieventsetupdateinterval">external documentation</a>.
--spec setUpdateInterval(UpdateInterval) -> ok when
+-spec setUpdateInterval(UpdateInterval) -> 'ok' when
UpdateInterval::integer().
setUpdateInterval(UpdateInterval)
when is_integer(UpdateInterval) ->
diff --git a/lib/wx/src/gen/wxWindow.erl b/lib/wx/src/gen/wxWindow.erl
index a8a61d547b..4ac7cc5d75 100644
--- a/lib/wx/src/gen/wxWindow.erl
+++ b/lib/wx/src/gen/wxWindow.erl
@@ -93,9 +93,9 @@ new(Parent,Id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowwxwindow">external documentation</a>.
-spec new(Parent, Id, [Option]) -> wxWindow() when
Parent::wxWindow(), Id::integer(),
- Option :: {pos, {X::integer(), Y::integer()}}
- | {size, {W::integer(), H::integer()}}
- | {style, integer()}.
+ Option :: {'pos', {X::integer(), Y::integer()}}
+ | {'size', {W::integer(), H::integer()}}
+ | {'style', integer()}.
new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
when is_integer(Id),is_list(Options) ->
?CLASS(ParentT,wxWindow),
@@ -108,7 +108,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options)
<<ParentRef:32/?UI,Id:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowcachebestsize">external documentation</a>.
--spec cacheBestSize(This, Size) -> ok when
+-spec cacheBestSize(This, Size) -> 'ok' when
This::wxWindow(), Size::{W::integer(), H::integer()}.
cacheBestSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -117,7 +117,7 @@ cacheBestSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowcapturemouse">external documentation</a>.
--spec captureMouse(This) -> ok when
+-spec captureMouse(This) -> 'ok' when
This::wxWindow().
captureMouse(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -125,7 +125,7 @@ captureMouse(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv center(This, [])
--spec center(This) -> ok when
+-spec center(This) -> 'ok' when
This::wxWindow().
center(This)
@@ -133,9 +133,9 @@ center(This)
center(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowcenter">external documentation</a>.
--spec center(This, [Option]) -> ok when
+-spec center(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {dir, integer()}.
+ Option :: {'dir', integer()}.
center(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -146,7 +146,7 @@ center(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv centerOnParent(This, [])
--spec centerOnParent(This) -> ok when
+-spec centerOnParent(This) -> 'ok' when
This::wxWindow().
centerOnParent(This)
@@ -154,9 +154,9 @@ centerOnParent(This)
centerOnParent(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowcenteronparent">external documentation</a>.
--spec centerOnParent(This, [Option]) -> ok when
+-spec centerOnParent(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {dir, integer()}.
+ Option :: {'dir', integer()}.
centerOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -167,7 +167,7 @@ centerOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv centre(This, [])
--spec centre(This) -> ok when
+-spec centre(This) -> 'ok' when
This::wxWindow().
centre(This)
@@ -175,9 +175,9 @@ centre(This)
centre(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowcentre">external documentation</a>.
--spec centre(This, [Option]) -> ok when
+-spec centre(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {dir, integer()}.
+ Option :: {'dir', integer()}.
centre(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -188,7 +188,7 @@ centre(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv centreOnParent(This, [])
--spec centreOnParent(This) -> ok when
+-spec centreOnParent(This) -> 'ok' when
This::wxWindow().
centreOnParent(This)
@@ -196,9 +196,9 @@ centreOnParent(This)
centreOnParent(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowcentreonparent">external documentation</a>.
--spec centreOnParent(This, [Option]) -> ok when
+-spec centreOnParent(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {dir, integer()}.
+ Option :: {'dir', integer()}.
centreOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -209,7 +209,7 @@ centreOnParent(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowclearbackground">external documentation</a>.
--spec clearBackground(This) -> ok when
+-spec clearBackground(This) -> 'ok' when
This::wxWindow().
clearBackground(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -245,7 +245,7 @@ close(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowclose">external documentation</a>.
-spec close(This, [Option]) -> boolean() when
This::wxWindow(),
- Option :: {force, boolean()}.
+ Option :: {'force', boolean()}.
close(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -308,7 +308,7 @@ enable(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowenable">external documentation</a>.
-spec enable(This, [Option]) -> boolean() when
This::wxWindow(),
- Option :: {enable, boolean()}.
+ Option :: {'enable', boolean()}.
enable(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -356,7 +356,7 @@ findWindowById(Winid)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowfindwindowbyid">external documentation</a>.
-spec findWindowById(Winid, [Option]) -> wxWindow() when
Winid::integer(),
- Option :: {parent, wxWindow()}.
+ Option :: {'parent', wxWindow()}.
findWindowById(Winid, Options)
when is_integer(Winid),is_list(Options) ->
MOpts = fun({parent, #wx_ref{type=ParentT,ref=ParentRef}}, Acc) -> ?CLASS(ParentT,wxWindow),[<<1:32/?UI,ParentRef:32/?UI>>|Acc];
@@ -376,7 +376,7 @@ findWindowByName(Name)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowfindwindowbyname">external documentation</a>.
-spec findWindowByName(Name, [Option]) -> wxWindow() when
Name::unicode:chardata(),
- Option :: {parent, wxWindow()}.
+ Option :: {'parent', wxWindow()}.
findWindowByName(Name, Options)
when is_list(Name),is_list(Options) ->
Name_UC = unicode:characters_to_binary([Name,0]),
@@ -397,7 +397,7 @@ findWindowByLabel(Label)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowfindwindowbylabel">external documentation</a>.
-spec findWindowByLabel(Label, [Option]) -> wxWindow() when
Label::unicode:chardata(),
- Option :: {parent, wxWindow()}.
+ Option :: {'parent', wxWindow()}.
findWindowByLabel(Label, Options)
when is_list(Label),is_list(Options) ->
Label_UC = unicode:characters_to_binary([Label,0]),
@@ -408,7 +408,7 @@ findWindowByLabel(Label, Options)
<<(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowfit">external documentation</a>.
--spec fit(This) -> ok when
+-spec fit(This) -> 'ok' when
This::wxWindow().
fit(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -416,7 +416,7 @@ fit(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowfitinside">external documentation</a>.
--spec fitInside(This) -> ok when
+-spec fitInside(This) -> 'ok' when
This::wxWindow().
fitInside(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -424,7 +424,7 @@ fitInside(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowfreeze">external documentation</a>.
--spec freeze(This) -> ok when
+-spec freeze(This) -> 'ok' when
This::wxWindow().
freeze(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -726,7 +726,7 @@ getTextExtent(This,String)
-spec getTextExtent(This, String, [Option]) -> Result when
Result :: {X::integer(), Y::integer(), Descent::integer(), ExternalLeading::integer()},
This::wxWindow(), String::unicode:chardata(),
- Option :: {theFont, wxFont:wxFont()}.
+ Option :: {'theFont', wxFont:wxFont()}.
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},String, Options)
when is_list(String),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -812,7 +812,7 @@ hide(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowinheritattributes">external documentation</a>.
--spec inheritAttributes(This) -> ok when
+-spec inheritAttributes(This) -> 'ok' when
This::wxWindow().
inheritAttributes(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -820,7 +820,7 @@ inheritAttributes(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowinitdialog">external documentation</a>.
--spec initDialog(This) -> ok when
+-spec initDialog(This) -> 'ok' when
This::wxWindow().
initDialog(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -828,7 +828,7 @@ initDialog(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowinvalidatebestsize">external documentation</a>.
--spec invalidateBestSize(This) -> ok when
+-spec invalidateBestSize(This) -> 'ok' when
This::wxWindow().
invalidateBestSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -930,7 +930,7 @@ lineUp(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowlower">external documentation</a>.
--spec lower(This) -> ok when
+-spec lower(This) -> 'ok' when
This::wxWindow().
lower(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -938,7 +938,7 @@ lower(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv makeModal(This, [])
--spec makeModal(This) -> ok when
+-spec makeModal(This) -> 'ok' when
This::wxWindow().
makeModal(This)
@@ -946,9 +946,9 @@ makeModal(This)
makeModal(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowmakemodal">external documentation</a>.
--spec makeModal(This, [Option]) -> ok when
+-spec makeModal(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {modal, boolean()}.
+ Option :: {'modal', boolean()}.
makeModal(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -959,7 +959,7 @@ makeModal(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv move(This,Pt, [])
--spec move(This, Pt) -> ok when
+-spec move(This, Pt) -> 'ok' when
This::wxWindow(), Pt::{X::integer(), Y::integer()}.
move(This,Pt={PtX,PtY})
@@ -968,15 +968,15 @@ move(This,Pt={PtX,PtY})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowmove">external documentation</a>.
%% <br /> Also:<br />
-%% move(This, Pt, [Option]) -> ok when<br />
+%% move(This, Pt, [Option]) -> 'ok' when<br />
%% This::wxWindow(), Pt::{X::integer(), Y::integer()},<br />
-%% Option :: {flags, integer()}.<br />
+%% Option :: {'flags', integer()}.<br />
%%
--spec move(This, X, Y) -> ok when
+-spec move(This, X, Y) -> 'ok' when
This::wxWindow(), X::integer(), Y::integer();
- (This, Pt, [Option]) -> ok when
+ (This, Pt, [Option]) -> 'ok' when
This::wxWindow(), Pt::{X::integer(), Y::integer()},
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
move(This,X,Y)
when is_record(This, wx_ref),is_integer(X),is_integer(Y) ->
@@ -991,9 +991,9 @@ move(#wx_ref{type=ThisT,ref=ThisRef},{PtX,PtY}, Options)
<<ThisRef:32/?UI,PtX:32/?UI,PtY:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowmove">external documentation</a>.
--spec move(This, X, Y, [Option]) -> ok when
+-spec move(This, X, Y, [Option]) -> 'ok' when
This::wxWindow(), X::integer(), Y::integer(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
move(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
when is_integer(X),is_integer(Y),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1004,7 +1004,7 @@ move(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowmoveafterintaborder">external documentation</a>.
--spec moveAfterInTabOrder(This, Win) -> ok when
+-spec moveAfterInTabOrder(This, Win) -> 'ok' when
This::wxWindow(), Win::wxWindow().
moveAfterInTabOrder(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1013,7 +1013,7 @@ moveAfterInTabOrder(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef
<<ThisRef:32/?UI,WinRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowmovebeforeintaborder">external documentation</a>.
--spec moveBeforeInTabOrder(This, Win) -> ok when
+-spec moveBeforeInTabOrder(This, Win) -> 'ok' when
This::wxWindow(), Win::wxWindow().
moveBeforeInTabOrder(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WinT,ref=WinRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1032,7 +1032,7 @@ navigate(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindownavigate">external documentation</a>.
-spec navigate(This, [Option]) -> boolean() when
This::wxWindow(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
navigate(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1069,7 +1069,7 @@ popEventHandler(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowpopeventhandler">external documentation</a>.
-spec popEventHandler(This, [Option]) -> wxEvtHandler:wxEvtHandler() when
This::wxWindow(),
- Option :: {deleteHandler, boolean()}.
+ Option :: {'deleteHandler', boolean()}.
popEventHandler(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1090,7 +1090,7 @@ popupMenu(This,Menu)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowpopupmenu">external documentation</a>.
-spec popupMenu(This, Menu, [Option]) -> boolean() when
This::wxWindow(), Menu::wxMenu:wxMenu(),
- Option :: {pos, {X::integer(), Y::integer()}}.
+ Option :: {'pos', {X::integer(), Y::integer()}}.
popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1112,7 +1112,7 @@ popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef},X,Y)
<<ThisRef:32/?UI,MenuRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowraise">external documentation</a>.
--spec raise(This) -> ok when
+-spec raise(This) -> 'ok' when
This::wxWindow().
raise(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1120,7 +1120,7 @@ raise(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv refresh(This, [])
--spec refresh(This) -> ok when
+-spec refresh(This) -> 'ok' when
This::wxWindow().
refresh(This)
@@ -1128,10 +1128,10 @@ refresh(This)
refresh(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowrefresh">external documentation</a>.
--spec refresh(This, [Option]) -> ok when
+-spec refresh(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {eraseBackground, boolean()}
- | {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}.
+ Option :: {'eraseBackground', boolean()}
+ | {'rect', {X::integer(), Y::integer(), W::integer(), H::integer()}}.
refresh(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1143,7 +1143,7 @@ refresh(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv refreshRect(This,Rect, [])
--spec refreshRect(This, Rect) -> ok when
+-spec refreshRect(This, Rect) -> 'ok' when
This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
refreshRect(This,Rect={RectX,RectY,RectW,RectH})
@@ -1151,9 +1151,9 @@ refreshRect(This,Rect={RectX,RectY,RectW,RectH})
refreshRect(This,Rect, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowrefreshrect">external documentation</a>.
--spec refreshRect(This, Rect, [Option]) -> ok when
+-spec refreshRect(This, Rect, [Option]) -> 'ok' when
This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
- Option :: {eraseBackground, boolean()}.
+ Option :: {'eraseBackground', boolean()}.
refreshRect(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}, Options)
when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1164,7 +1164,7 @@ refreshRect(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}, Options)
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowreleasemouse">external documentation</a>.
--spec releaseMouse(This) -> ok when
+-spec releaseMouse(This) -> 'ok' when
This::wxWindow().
releaseMouse(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1172,7 +1172,7 @@ releaseMouse(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowremovechild">external documentation</a>.
--spec removeChild(This, Child) -> ok when
+-spec removeChild(This, Child) -> 'ok' when
This::wxWindow(), Child::wxWindow().
removeChild(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ChildT,ref=ChildRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1225,7 +1225,7 @@ scrollPages(#wx_ref{type=ThisT,ref=ThisRef},Pages)
<<ThisRef:32/?UI,Pages:32/?UI>>).
%% @equiv scrollWindow(This,Dx,Dy, [])
--spec scrollWindow(This, Dx, Dy) -> ok when
+-spec scrollWindow(This, Dx, Dy) -> 'ok' when
This::wxWindow(), Dx::integer(), Dy::integer().
scrollWindow(This,Dx,Dy)
@@ -1233,9 +1233,9 @@ scrollWindow(This,Dx,Dy)
scrollWindow(This,Dx,Dy, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowscrollwindow">external documentation</a>.
--spec scrollWindow(This, Dx, Dy, [Option]) -> ok when
+-spec scrollWindow(This, Dx, Dy, [Option]) -> 'ok' when
This::wxWindow(), Dx::integer(), Dy::integer(),
- Option :: {rect, {X::integer(), Y::integer(), W::integer(), H::integer()}}.
+ Option :: {'rect', {X::integer(), Y::integer(), W::integer(), H::integer()}}.
scrollWindow(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy, Options)
when is_integer(Dx),is_integer(Dy),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1246,7 +1246,7 @@ scrollWindow(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy, Options)
<<ThisRef:32/?UI,Dx:32/?UI,Dy:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetacceleratortable">external documentation</a>.
--spec setAcceleratorTable(This, Accel) -> ok when
+-spec setAcceleratorTable(This, Accel) -> 'ok' when
This::wxWindow(), Accel::wxAcceleratorTable:wxAcceleratorTable().
setAcceleratorTable(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=AccelT,ref=AccelRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1255,7 +1255,7 @@ setAcceleratorTable(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=AccelT,ref=Acce
<<ThisRef:32/?UI,AccelRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetautolayout">external documentation</a>.
--spec setAutoLayout(This, AutoLayout) -> ok when
+-spec setAutoLayout(This, AutoLayout) -> 'ok' when
This::wxWindow(), AutoLayout::boolean().
setAutoLayout(#wx_ref{type=ThisT,ref=ThisRef},AutoLayout)
when is_boolean(AutoLayout) ->
@@ -1283,7 +1283,7 @@ setBackgroundStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
<<ThisRef:32/?UI,Style:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetcaret">external documentation</a>.
--spec setCaret(This, Caret) -> ok when
+-spec setCaret(This, Caret) -> 'ok' when
This::wxWindow(), Caret::wxCaret:wxCaret().
setCaret(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CaretT,ref=CaretRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1293,12 +1293,12 @@ setCaret(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CaretT,ref=CaretRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetclientsize">external documentation</a>.
%% <br /> Also:<br />
-%% setClientSize(This, Rect) -> ok when<br />
+%% setClientSize(This, Rect) -> 'ok' when<br />
%% This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.<br />
%%
--spec setClientSize(This, Size) -> ok when
+-spec setClientSize(This, Size) -> 'ok' when
This::wxWindow(), Size::{W::integer(), H::integer()};
- (This, Rect) -> ok when
+ (This, Rect) -> 'ok' when
This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
setClientSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -1312,7 +1312,7 @@ setClientSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH})
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetclientsize">external documentation</a>.
--spec setClientSize(This, Width, Height) -> ok when
+-spec setClientSize(This, Width, Height) -> 'ok' when
This::wxWindow(), Width::integer(), Height::integer().
setClientSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
@@ -1321,7 +1321,7 @@ setClientSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
<<ThisRef:32/?UI,Width:32/?UI,Height:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetcontainingsizer">external documentation</a>.
--spec setContainingSizer(This, Sizer) -> ok when
+-spec setContainingSizer(This, Sizer) -> 'ok' when
This::wxWindow(), Sizer::wxSizer:wxSizer().
setContainingSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1339,7 +1339,7 @@ setCursor(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=CursorT,ref=CursorRef}) -
<<ThisRef:32/?UI,CursorRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetmaxsize">external documentation</a>.
--spec setMaxSize(This, MaxSize) -> ok when
+-spec setMaxSize(This, MaxSize) -> 'ok' when
This::wxWindow(), MaxSize::{W::integer(), H::integer()}.
setMaxSize(#wx_ref{type=ThisT,ref=ThisRef},{MaxSizeW,MaxSizeH})
when is_integer(MaxSizeW),is_integer(MaxSizeH) ->
@@ -1348,7 +1348,7 @@ setMaxSize(#wx_ref{type=ThisT,ref=ThisRef},{MaxSizeW,MaxSizeH})
<<ThisRef:32/?UI,MaxSizeW:32/?UI,MaxSizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetminsize">external documentation</a>.
--spec setMinSize(This, MinSize) -> ok when
+-spec setMinSize(This, MinSize) -> 'ok' when
This::wxWindow(), MinSize::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH})
when is_integer(MinSizeW),is_integer(MinSizeH) ->
@@ -1357,7 +1357,7 @@ setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH})
<<ThisRef:32/?UI,MinSizeW:32/?UI,MinSizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetownbackgroundcolour">external documentation</a>.
--spec setOwnBackgroundColour(This, Colour) -> ok when
+-spec setOwnBackgroundColour(This, Colour) -> 'ok' when
This::wxWindow(), Colour::wx:wx_colour().
setOwnBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -1366,7 +1366,7 @@ setOwnBackgroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetownfont">external documentation</a>.
--spec setOwnFont(This, Font) -> ok when
+-spec setOwnFont(This, Font) -> 'ok' when
This::wxWindow(), Font::wxFont:wxFont().
setOwnFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1375,7 +1375,7 @@ setOwnFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
<<ThisRef:32/?UI,FontRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetownforegroundcolour">external documentation</a>.
--spec setOwnForegroundColour(This, Colour) -> ok when
+-spec setOwnForegroundColour(This, Colour) -> 'ok' when
This::wxWindow(), Colour::wx:wx_colour().
setOwnForegroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
@@ -1384,7 +1384,7 @@ setOwnForegroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetdroptarget">external documentation</a>.
--spec setDropTarget(This, DropTarget) -> ok when
+-spec setDropTarget(This, DropTarget) -> 'ok' when
This::wxWindow(), DropTarget::wx:wx_object().
setDropTarget(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DropTargetT,ref=DropTargetRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1393,7 +1393,7 @@ setDropTarget(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=DropTargetT,ref=DropT
<<ThisRef:32/?UI,DropTargetRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetextrastyle">external documentation</a>.
--spec setExtraStyle(This, ExStyle) -> ok when
+-spec setExtraStyle(This, ExStyle) -> 'ok' when
This::wxWindow(), ExStyle::integer().
setExtraStyle(#wx_ref{type=ThisT,ref=ThisRef},ExStyle)
when is_integer(ExStyle) ->
@@ -1402,7 +1402,7 @@ setExtraStyle(#wx_ref{type=ThisT,ref=ThisRef},ExStyle)
<<ThisRef:32/?UI,ExStyle:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetfocus">external documentation</a>.
--spec setFocus(This) -> ok when
+-spec setFocus(This) -> 'ok' when
This::wxWindow().
setFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1410,7 +1410,7 @@ setFocus(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetfocusfromkbd">external documentation</a>.
--spec setFocusFromKbd(This) -> ok when
+-spec setFocusFromKbd(This) -> 'ok' when
This::wxWindow().
setFocusFromKbd(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1436,7 +1436,7 @@ setForegroundColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
<<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsethelptext">external documentation</a>.
--spec setHelpText(This, Text) -> ok when
+-spec setHelpText(This, Text) -> 'ok' when
This::wxWindow(), Text::unicode:chardata().
setHelpText(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -1446,7 +1446,7 @@ setHelpText(#wx_ref{type=ThisT,ref=ThisRef},Text)
<<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>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetid">external documentation</a>.
--spec setId(This, Winid) -> ok when
+-spec setId(This, Winid) -> 'ok' when
This::wxWindow(), Winid::integer().
setId(#wx_ref{type=ThisT,ref=ThisRef},Winid)
when is_integer(Winid) ->
@@ -1455,7 +1455,7 @@ setId(#wx_ref{type=ThisT,ref=ThisRef},Winid)
<<ThisRef:32/?UI,Winid:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetlabel">external documentation</a>.
--spec setLabel(This, Label) -> ok when
+-spec setLabel(This, Label) -> 'ok' when
This::wxWindow(), Label::unicode:chardata().
setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
when is_list(Label) ->
@@ -1465,7 +1465,7 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label)
<<ThisRef:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((0+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetname">external documentation</a>.
--spec setName(This, Name) -> ok when
+-spec setName(This, Name) -> 'ok' when
This::wxWindow(), Name::unicode:chardata().
setName(#wx_ref{type=ThisT,ref=ThisRef},Name)
when is_list(Name) ->
@@ -1475,7 +1475,7 @@ setName(#wx_ref{type=ThisT,ref=ThisRef},Name)
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetpalette">external documentation</a>.
--spec setPalette(This, Pal) -> ok when
+-spec setPalette(This, Pal) -> 'ok' when
This::wxWindow(), Pal::wxPalette:wxPalette().
setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PalT,ref=PalRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1484,7 +1484,7 @@ setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PalT,ref=PalRef}) ->
<<ThisRef:32/?UI,PalRef:32/?UI>>).
%% @equiv setScrollbar(This,Orient,Pos,ThumbVisible,Range, [])
--spec setScrollbar(This, Orient, Pos, ThumbVisible, Range) -> ok when
+-spec setScrollbar(This, Orient, Pos, ThumbVisible, Range) -> 'ok' when
This::wxWindow(), Orient::integer(), Pos::integer(), ThumbVisible::integer(), Range::integer().
setScrollbar(This,Orient,Pos,ThumbVisible,Range)
@@ -1492,9 +1492,9 @@ setScrollbar(This,Orient,Pos,ThumbVisible,Range)
setScrollbar(This,Orient,Pos,ThumbVisible,Range, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetscrollbar">external documentation</a>.
--spec setScrollbar(This, Orient, Pos, ThumbVisible, Range, [Option]) -> ok when
+-spec setScrollbar(This, Orient, Pos, ThumbVisible, Range, [Option]) -> 'ok' when
This::wxWindow(), Orient::integer(), Pos::integer(), ThumbVisible::integer(), Range::integer(),
- Option :: {refresh, boolean()}.
+ Option :: {'refresh', boolean()}.
setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos,ThumbVisible,Range, Options)
when is_integer(Orient),is_integer(Pos),is_integer(ThumbVisible),is_integer(Range),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1505,7 +1505,7 @@ setScrollbar(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos,ThumbVisible,Range, Opti
<<ThisRef:32/?UI,Orient:32/?UI,Pos:32/?UI,ThumbVisible:32/?UI,Range:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setScrollPos(This,Orient,Pos, [])
--spec setScrollPos(This, Orient, Pos) -> ok when
+-spec setScrollPos(This, Orient, Pos) -> 'ok' when
This::wxWindow(), Orient::integer(), Pos::integer().
setScrollPos(This,Orient,Pos)
@@ -1513,9 +1513,9 @@ setScrollPos(This,Orient,Pos)
setScrollPos(This,Orient,Pos, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetscrollpos">external documentation</a>.
--spec setScrollPos(This, Orient, Pos, [Option]) -> ok when
+-spec setScrollPos(This, Orient, Pos, [Option]) -> 'ok' when
This::wxWindow(), Orient::integer(), Pos::integer(),
- Option :: {refresh, boolean()}.
+ Option :: {'refresh', boolean()}.
setScrollPos(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos, Options)
when is_integer(Orient),is_integer(Pos),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1527,12 +1527,12 @@ setScrollPos(#wx_ref{type=ThisT,ref=ThisRef},Orient,Pos, Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsize">external documentation</a>.
%% <br /> Also:<br />
-%% setSize(This, Size) -> ok when<br />
+%% setSize(This, Size) -> 'ok' when<br />
%% This::wxWindow(), Size::{W::integer(), H::integer()}.<br />
%%
--spec setSize(This, Rect) -> ok when
+-spec setSize(This, Rect) -> 'ok' when
This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()};
- (This, Size) -> ok when
+ (This, Size) -> 'ok' when
This::wxWindow(), Size::{W::integer(), H::integer()}.
setSize(This,Rect={RectX,RectY,RectW,RectH})
@@ -1546,15 +1546,15 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsize">external documentation</a>.
%% <br /> Also:<br />
-%% setSize(This, Rect, [Option]) -> ok when<br />
+%% setSize(This, Rect, [Option]) -> 'ok' when<br />
%% This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},<br />
-%% Option :: {sizeFlags, integer()}.<br />
+%% Option :: {'sizeFlags', integer()}.<br />
%%
--spec setSize(This, Width, Height) -> ok when
+-spec setSize(This, Width, Height) -> 'ok' when
This::wxWindow(), Width::integer(), Height::integer();
- (This, Rect, [Option]) -> ok when
+ (This, Rect, [Option]) -> 'ok' when
This::wxWindow(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()},
- Option :: {sizeFlags, integer()}.
+ Option :: {'sizeFlags', integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxWindow),
@@ -1570,7 +1570,7 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}, Options)
<<ThisRef:32/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setSize(This,X,Y,Width,Height, [])
--spec setSize(This, X, Y, Width, Height) -> ok when
+-spec setSize(This, X, Y, Width, Height) -> 'ok' when
This::wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer().
setSize(This,X,Y,Width,Height)
@@ -1578,9 +1578,9 @@ setSize(This,X,Y,Width,Height)
setSize(This,X,Y,Width,Height, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsize">external documentation</a>.
--spec setSize(This, X, Y, Width, Height, [Option]) -> ok when
+-spec setSize(This, X, Y, Width, Height, [Option]) -> 'ok' when
This::wxWindow(), X::integer(), Y::integer(), Width::integer(), Height::integer(),
- Option :: {sizeFlags, integer()}.
+ Option :: {'sizeFlags', integer()}.
setSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height, Options)
when is_integer(X),is_integer(Y),is_integer(Width),is_integer(Height),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1591,7 +1591,7 @@ setSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Width,Height, Options)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI,Width:32/?UI,Height:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setSizeHints(This,MinSize, [])
--spec setSizeHints(This, MinSize) -> ok when
+-spec setSizeHints(This, MinSize) -> 'ok' when
This::wxWindow(), MinSize::{W::integer(), H::integer()}.
setSizeHints(This,MinSize={MinSizeW,MinSizeH})
@@ -1600,17 +1600,17 @@ setSizeHints(This,MinSize={MinSizeW,MinSizeH})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsizehints">external documentation</a>.
%% <br /> Also:<br />
-%% setSizeHints(This, MinSize, [Option]) -> ok when<br />
+%% setSizeHints(This, MinSize, [Option]) -> 'ok' when<br />
%% This::wxWindow(), MinSize::{W::integer(), H::integer()},<br />
-%% Option :: {maxSize, {W::integer(), H::integer()}}<br />
-%% | {incSize, {W::integer(), H::integer()}}.<br />
+%% Option :: {'maxSize', {W::integer(), H::integer()}}<br />
+%% | {'incSize', {W::integer(), H::integer()}}.<br />
%%
--spec setSizeHints(This, MinW, MinH) -> ok when
+-spec setSizeHints(This, MinW, MinH) -> 'ok' when
This::wxWindow(), MinW::integer(), MinH::integer();
- (This, MinSize, [Option]) -> ok when
+ (This, MinSize, [Option]) -> 'ok' when
This::wxWindow(), MinSize::{W::integer(), H::integer()},
- Option :: {maxSize, {W::integer(), H::integer()}}
- | {incSize, {W::integer(), H::integer()}}.
+ Option :: {'maxSize', {W::integer(), H::integer()}}
+ | {'incSize', {W::integer(), H::integer()}}.
setSizeHints(This,MinW,MinH)
when is_record(This, wx_ref),is_integer(MinW),is_integer(MinH) ->
@@ -1626,12 +1626,12 @@ setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH}, Options)
<<ThisRef:32/?UI,MinSizeW:32/?UI,MinSizeH:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsizehints">external documentation</a>.
--spec setSizeHints(This, MinW, MinH, [Option]) -> ok when
+-spec setSizeHints(This, MinW, MinH, [Option]) -> 'ok' when
This::wxWindow(), MinW::integer(), MinH::integer(),
- Option :: {maxW, integer()}
- | {maxH, integer()}
- | {incW, integer()}
- | {incH, integer()}.
+ Option :: {'maxW', integer()}
+ | {'maxH', integer()}
+ | {'incW', integer()}
+ | {'incH', integer()}.
setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
when is_integer(MinW),is_integer(MinH),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1645,7 +1645,7 @@ setSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
<<ThisRef:32/?UI,MinW:32/?UI,MinH:32/?UI, 0:32,BinOpt/binary>>).
%% @equiv setSizer(This,Sizer, [])
--spec setSizer(This, Sizer) -> ok when
+-spec setSizer(This, Sizer) -> 'ok' when
This::wxWindow(), Sizer::wxSizer:wxSizer().
setSizer(This,Sizer)
@@ -1653,9 +1653,9 @@ setSizer(This,Sizer)
setSizer(This,Sizer, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsizer">external documentation</a>.
--spec setSizer(This, Sizer, [Option]) -> ok when
+-spec setSizer(This, Sizer, [Option]) -> 'ok' when
This::wxWindow(), Sizer::wxSizer:wxSizer(),
- Option :: {deleteOld, boolean()}.
+ Option :: {'deleteOld', boolean()}.
setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1667,7 +1667,7 @@ setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}, Opti
<<ThisRef:32/?UI,SizerRef:32/?UI, BinOpt/binary>>).
%% @equiv setSizerAndFit(This,Sizer, [])
--spec setSizerAndFit(This, Sizer) -> ok when
+-spec setSizerAndFit(This, Sizer) -> 'ok' when
This::wxWindow(), Sizer::wxSizer:wxSizer().
setSizerAndFit(This,Sizer)
@@ -1675,9 +1675,9 @@ setSizerAndFit(This,Sizer)
setSizerAndFit(This,Sizer, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetsizerandfit">external documentation</a>.
--spec setSizerAndFit(This, Sizer, [Option]) -> ok when
+-spec setSizerAndFit(This, Sizer, [Option]) -> 'ok' when
This::wxWindow(), Sizer::wxSizer:wxSizer(),
- Option :: {deleteOld, boolean()}.
+ Option :: {'deleteOld', boolean()}.
setSizerAndFit(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1689,7 +1689,7 @@ setSizerAndFit(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}
<<ThisRef:32/?UI,SizerRef:32/?UI, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetthemeenabled">external documentation</a>.
--spec setThemeEnabled(This, EnableTheme) -> ok when
+-spec setThemeEnabled(This, EnableTheme) -> 'ok' when
This::wxWindow(), EnableTheme::boolean().
setThemeEnabled(#wx_ref{type=ThisT,ref=ThisRef},EnableTheme)
when is_boolean(EnableTheme) ->
@@ -1699,12 +1699,12 @@ setThemeEnabled(#wx_ref{type=ThisT,ref=ThisRef},EnableTheme)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsettooltip">external documentation</a>.
%% <br /> Also:<br />
-%% setToolTip(This, Tip) -> ok when<br />
+%% setToolTip(This, Tip) -> 'ok' when<br />
%% This::wxWindow(), Tip::wxToolTip:wxToolTip().<br />
%%
--spec setToolTip(This, Tip) -> ok when
+-spec setToolTip(This, Tip) -> 'ok' when
This::wxWindow(), Tip::unicode:chardata();
- (This, Tip) -> ok when
+ (This, Tip) -> 'ok' when
This::wxWindow(), Tip::wxToolTip:wxToolTip().
setToolTip(#wx_ref{type=ThisT,ref=ThisRef},Tip)
when is_list(Tip) ->
@@ -1719,7 +1719,7 @@ setToolTip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=TipT,ref=TipRef}) ->
<<ThisRef:32/?UI,TipRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetvirtualsize">external documentation</a>.
--spec setVirtualSize(This, Size) -> ok when
+-spec setVirtualSize(This, Size) -> 'ok' when
This::wxWindow(), Size::{W::integer(), H::integer()}.
setVirtualSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
@@ -1728,7 +1728,7 @@ setVirtualSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetvirtualsize">external documentation</a>.
--spec setVirtualSize(This, X, Y) -> ok when
+-spec setVirtualSize(This, X, Y) -> 'ok' when
This::wxWindow(), X::integer(), Y::integer().
setVirtualSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -1737,7 +1737,7 @@ setVirtualSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
<<ThisRef:32/?UI,X:32/?UI,Y:32/?UI>>).
%% @equiv setVirtualSizeHints(This,MinSize, [])
--spec setVirtualSizeHints(This, MinSize) -> ok when
+-spec setVirtualSizeHints(This, MinSize) -> 'ok' when
This::wxWindow(), MinSize::{W::integer(), H::integer()}.
setVirtualSizeHints(This,MinSize={MinSizeW,MinSizeH})
@@ -1746,15 +1746,15 @@ setVirtualSizeHints(This,MinSize={MinSizeW,MinSizeH})
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetvirtualsizehints">external documentation</a>.
%% <br /> Also:<br />
-%% setVirtualSizeHints(This, MinSize, [Option]) -> ok when<br />
+%% setVirtualSizeHints(This, MinSize, [Option]) -> 'ok' when<br />
%% This::wxWindow(), MinSize::{W::integer(), H::integer()},<br />
-%% Option :: {maxSize, {W::integer(), H::integer()}}.<br />
+%% Option :: {'maxSize', {W::integer(), H::integer()}}.<br />
%%
--spec setVirtualSizeHints(This, MinW, MinH) -> ok when
+-spec setVirtualSizeHints(This, MinW, MinH) -> 'ok' when
This::wxWindow(), MinW::integer(), MinH::integer();
- (This, MinSize, [Option]) -> ok when
+ (This, MinSize, [Option]) -> 'ok' when
This::wxWindow(), MinSize::{W::integer(), H::integer()},
- Option :: {maxSize, {W::integer(), H::integer()}}.
+ Option :: {'maxSize', {W::integer(), H::integer()}}.
setVirtualSizeHints(This,MinW,MinH)
when is_record(This, wx_ref),is_integer(MinW),is_integer(MinH) ->
@@ -1769,10 +1769,10 @@ setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},{MinSizeW,MinSizeH}, Options
<<ThisRef:32/?UI,MinSizeW:32/?UI,MinSizeH:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetvirtualsizehints">external documentation</a>.
--spec setVirtualSizeHints(This, MinW, MinH, [Option]) -> ok when
+-spec setVirtualSizeHints(This, MinW, MinH, [Option]) -> 'ok' when
This::wxWindow(), MinW::integer(), MinH::integer(),
- Option :: {maxW, integer()}
- | {maxH, integer()}.
+ Option :: {'maxW', integer()}
+ | {'maxH', integer()}.
setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
when is_integer(MinW),is_integer(MinH),is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1784,7 +1784,7 @@ setVirtualSizeHints(#wx_ref{type=ThisT,ref=ThisRef},MinW,MinH, Options)
<<ThisRef:32/?UI,MinW:32/?UI,MinH:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetwindowstyle">external documentation</a>.
--spec setWindowStyle(This, Style) -> ok when
+-spec setWindowStyle(This, Style) -> 'ok' when
This::wxWindow(), Style::integer().
setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
@@ -1793,7 +1793,7 @@ setWindowStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
<<ThisRef:32/?UI,Style:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetwindowstyleflag">external documentation</a>.
--spec setWindowStyleFlag(This, Style) -> ok when
+-spec setWindowStyleFlag(This, Style) -> 'ok' when
This::wxWindow(), Style::integer().
setWindowStyleFlag(#wx_ref{type=ThisT,ref=ThisRef},Style)
when is_integer(Style) ->
@@ -1803,7 +1803,7 @@ setWindowStyleFlag(#wx_ref{type=ThisT,ref=ThisRef},Style)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetwindowvariant">external documentation</a>.
%%<br /> Variant = ?wxWINDOW_VARIANT_NORMAL | ?wxWINDOW_VARIANT_SMALL | ?wxWINDOW_VARIANT_MINI | ?wxWINDOW_VARIANT_LARGE | ?wxWINDOW_VARIANT_MAX
--spec setWindowVariant(This, Variant) -> ok when
+-spec setWindowVariant(This, Variant) -> 'ok' when
This::wxWindow(), Variant::wx:wx_enum().
setWindowVariant(#wx_ref{type=ThisT,ref=ThisRef},Variant)
when is_integer(Variant) ->
@@ -1830,7 +1830,7 @@ show(This)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowshow">external documentation</a>.
-spec show(This, [Option]) -> boolean() when
This::wxWindow(),
- Option :: {show, boolean()}.
+ Option :: {'show', boolean()}.
show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1841,7 +1841,7 @@ show(#wx_ref{type=ThisT,ref=ThisRef}, Options)
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowthaw">external documentation</a>.
--spec thaw(This) -> ok when
+-spec thaw(This) -> 'ok' when
This::wxWindow().
thaw(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1865,7 +1865,7 @@ transferDataToWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowupdate">external documentation</a>.
--spec update(This) -> ok when
+-spec update(This) -> 'ok' when
This::wxWindow().
update(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxWindow),
@@ -1873,7 +1873,7 @@ update(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @equiv updateWindowUI(This, [])
--spec updateWindowUI(This) -> ok when
+-spec updateWindowUI(This) -> 'ok' when
This::wxWindow().
updateWindowUI(This)
@@ -1881,9 +1881,9 @@ updateWindowUI(This)
updateWindowUI(This, []).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowupdatewindowui">external documentation</a>.
--spec updateWindowUI(This, [Option]) -> ok when
+-spec updateWindowUI(This, [Option]) -> 'ok' when
This::wxWindow(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
updateWindowUI(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxWindow),
@@ -1902,7 +1902,7 @@ validate(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowwarppointer">external documentation</a>.
--spec warpPointer(This, X, Y) -> ok when
+-spec warpPointer(This, X, Y) -> 'ok' when
This::wxWindow(), X::integer(), Y::integer().
warpPointer(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
@@ -1936,7 +1936,7 @@ isDoubleBuffered(#wx_ref{type=ThisT,ref=ThisRef}) ->
<<ThisRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowsetdoublebuffered">external documentation</a>.
--spec setDoubleBuffered(This, On) -> ok when
+-spec setDoubleBuffered(This, On) -> 'ok' when
This::wxWindow(), On::boolean().
setDoubleBuffered(#wx_ref{type=ThisT,ref=ThisRef},On)
when is_boolean(On) ->
@@ -1945,7 +1945,7 @@ setDoubleBuffered(#wx_ref{type=ThisT,ref=ThisRef},On)
<<ThisRef:32/?UI,(wxe_util:from_bool(On)):32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxWindow()) -> ok.
+-spec destroy(This::wxWindow()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxWindow),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxWindowDC.erl b/lib/wx/src/gen/wxWindowDC.erl
index 176580a9bf..9b1045b84d 100644
--- a/lib/wx/src/gen/wxWindowDC.erl
+++ b/lib/wx/src/gen/wxWindowDC.erl
@@ -78,7 +78,7 @@ new(#wx_ref{type=WinT,ref=WinRef}) ->
<<WinRef:32/?UI>>).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxWindowDC()) -> ok.
+-spec destroy(This::wxWindowDC()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxWindowDC),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wxXmlResource.erl b/lib/wx/src/gen/wxXmlResource.erl
index b4d08fbbd5..ae02c74751 100644
--- a/lib/wx/src/gen/wxXmlResource.erl
+++ b/lib/wx/src/gen/wxXmlResource.erl
@@ -48,8 +48,8 @@ new() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourcewxxmlresource">external documentation</a>.
-spec new([Option]) -> wxXmlResource() when
- Option :: {flags, integer()}
- | {domain, unicode:chardata()}.
+ Option :: {'flags', integer()}
+ | {'domain', unicode:chardata()}.
new(Options)
when is_list(Options) ->
MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
@@ -62,8 +62,8 @@ new(Options)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourcewxxmlresource">external documentation</a>.
-spec new(Filemask, [Option]) -> wxXmlResource() when
Filemask::unicode:chardata(),
- Option :: {flags, integer()}
- | {domain, unicode:chardata()}.
+ Option :: {'flags', integer()}
+ | {'domain', unicode:chardata()}.
new(Filemask, Options)
when is_list(Filemask),is_list(Options) ->
Filemask_UC = unicode:characters_to_binary([Filemask,0]),
@@ -85,7 +85,7 @@ attachUnknownControl(This,Name,Control)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourceattachunknowncontrol">external documentation</a>.
-spec attachUnknownControl(This, Name, Control, [Option]) -> boolean() when
This::wxXmlResource(), Name::unicode:chardata(), Control::wxWindow:wxWindow(),
- Option :: {parent, wxWindow:wxWindow()}.
+ Option :: {'parent', wxWindow:wxWindow()}.
attachUnknownControl(#wx_ref{type=ThisT,ref=ThisRef},Name,#wx_ref{type=ControlT,ref=ControlRef}, Options)
when is_list(Name),is_list(Options) ->
?CLASS(ThisT,wxXmlResource),
@@ -98,7 +98,7 @@ attachUnknownControl(#wx_ref{type=ThisT,ref=ThisRef},Name,#wx_ref{type=ControlT,
<<ThisRef:32/?UI,(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((0+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,ControlRef:32/?UI, 0:32,BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourceclearhandlers">external documentation</a>.
--spec clearHandlers(This) -> ok when
+-spec clearHandlers(This) -> 'ok' when
This::wxXmlResource().
clearHandlers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxXmlResource),
@@ -147,7 +147,7 @@ getXRCID(Str_id)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourcegetxrcid">external documentation</a>.
-spec getXRCID(Str_id, [Option]) -> integer() when
Str_id::[unicode:chardata()],
- Option :: {value_if_not_found, integer()}.
+ Option :: {'value_if_not_found', integer()}.
getXRCID(Str_id, Options)
when is_list(Str_id),is_list(Options) ->
Str_id_UC = unicode:characters_to_binary([Str_id,0]),
@@ -158,7 +158,7 @@ getXRCID(Str_id, Options)
<<(byte_size(Str_id_UC)):32/?UI,(Str_id_UC)/binary, 0:(((8- ((4+byte_size(Str_id_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourceinitallhandlers">external documentation</a>.
--spec initAllHandlers(This) -> ok when
+-spec initAllHandlers(This) -> 'ok' when
This::wxXmlResource().
initAllHandlers(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxXmlResource),
@@ -315,7 +315,7 @@ set(#wx_ref{type=ResT,ref=ResRef}) ->
<<ResRef:32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxxmlresource.html#wxxmlresourcesetflags">external documentation</a>.
--spec setFlags(This, Flags) -> ok when
+-spec setFlags(This, Flags) -> 'ok' when
This::wxXmlResource(), Flags::integer().
setFlags(#wx_ref{type=ThisT,ref=ThisRef},Flags)
when is_integer(Flags) ->
@@ -353,7 +353,7 @@ xrcctrl(Window = #wx_ref{}, Name, Type) when is_list(Name), is_atom(Type) ->
wx:typeCast(Res, Type).
%% @doc Destroys this object, do not use object again
--spec destroy(This::wxXmlResource()) -> ok.
+-spec destroy(This::wxXmlResource()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxXmlResource),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
diff --git a/lib/wx/src/gen/wx_misc.erl b/lib/wx/src/gen/wx_misc.erl
index 5db6ceb036..ce5d917136 100644
--- a/lib/wx/src/gen/wx_misc.erl
+++ b/lib/wx/src/gen/wx_misc.erl
@@ -63,7 +63,7 @@ setDetectableAutoRepeat(Flag)
<<(wxe_util:from_bool(Flag)):32/?UI>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxbell">external documentation</a>.
--spec bell() -> ok.
+-spec bell() -> 'ok'.
bell() ->
wxe_util:cast(?utils_wxBell,
<<>>).
@@ -96,14 +96,14 @@ findWindowAtPoint({PtX,PtY})
<<PtX:32/?UI,PtY:32/?UI>>).
%% @equiv beginBusyCursor([])
--spec beginBusyCursor() -> ok.
+-spec beginBusyCursor() -> 'ok'.
beginBusyCursor() ->
beginBusyCursor([]).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxbeginbusycursor">external documentation</a>.
--spec beginBusyCursor([Option]) -> ok when
- Option :: {cursor, wxCursor:wxCursor()}.
+-spec beginBusyCursor([Option]) -> 'ok' when
+ Option :: {'cursor', wxCursor:wxCursor()}.
beginBusyCursor(Options)
when is_list(Options) ->
MOpts = fun({cursor, #wx_ref{type=CursorT,ref=CursorRef}}, Acc) -> ?CLASS(CursorT,wxCursor),[<<1:32/?UI,CursorRef:32/?UI>>|Acc];
@@ -113,7 +113,7 @@ beginBusyCursor(Options)
<<BinOpt/binary>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxendbusycursor">external documentation</a>.
--spec endBusyCursor() -> ok.
+-spec endBusyCursor() -> 'ok'.
endBusyCursor() ->
wxe_util:cast(?utils_wxEndBusyCursor,
<<>>).
@@ -141,7 +141,7 @@ shell() ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxshell">external documentation</a>.
-spec shell([Option]) -> boolean() when
- Option :: {command, unicode:chardata()}.
+ Option :: {'command', unicode:chardata()}.
shell(Options)
when is_list(Options) ->
MOpts = fun({command, Command}, Acc) -> Command_UC = unicode:characters_to_binary([Command,0]),[<<1:32/?UI,(byte_size(Command_UC)):32/?UI,(Command_UC)/binary, 0:(((8- ((0+byte_size(Command_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
@@ -161,7 +161,7 @@ launchDefaultBrowser(Url)
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxlaunchdefaultbrowser">external documentation</a>.
-spec launchDefaultBrowser(Url, [Option]) -> boolean() when
Url::unicode:chardata(),
- Option :: {flags, integer()}.
+ Option :: {'flags', integer()}.
launchDefaultBrowser(Url, Options)
when is_list(Url),is_list(Options) ->
Url_UC = unicode:characters_to_binary([Url,0]),
@@ -196,7 +196,7 @@ newId() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxregisterid">external documentation</a>.
--spec registerId(Id) -> ok when
+-spec registerId(Id) -> 'ok' when
Id::integer().
registerId(Id)
when is_integer(Id) ->
@@ -234,7 +234,7 @@ displaySize() ->
<<>>).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_gdicmn.html#gdicmnwxsetcursor">external documentation</a>.
--spec setCursor(Cursor) -> ok when
+-spec setCursor(Cursor) -> 'ok' when
Cursor::wxCursor:wxCursor().
setCursor(#wx_ref{type=CursorT,ref=CursorRef}) ->
?CLASS(CursorT,wxCursor),
diff --git a/lib/wx/src/wx.erl b/lib/wx/src/wx.erl
index 6498b58cda..34bf06cf46 100644
--- a/lib/wx/src/wx.erl
+++ b/lib/wx/src/wx.erl
@@ -106,8 +106,8 @@ new() ->
%% Or {silent_start, Bool}, which causes error messages at startup to
%% be suppressed. The latter can be used as a silent test of whether
%% wx is properly installed or not.
--spec new([Option]) -> wx_object() when Option :: {debug, list() | atom()} |
- {silent_start, boolean()}.
+-spec new([Option]) -> wx_object()
+ when Option :: {'debug', list() | atom()} | {'silent_start', boolean()}.
new(Options) when is_list(Options) ->
Debug = proplists:get_value(debug, Options, 0),
SilentStart = proplists:get_value(silent_start, Options, false),
@@ -118,7 +118,7 @@ new(Options) when is_list(Options) ->
null().
%% @doc Stops a wx server.
--spec destroy() -> ok.
+-spec destroy() -> 'ok'.
destroy() ->
wxe_server:stop(),
erase(?WXE_IDENTIFIER),
@@ -136,7 +136,7 @@ get_env() ->
%% @doc Sets the process wx environment, allows this process to use
%% another process wx environment.
--spec set_env(wx_env()) -> ok.
+-spec set_env(wx_env()) -> 'ok'.
set_env(#wx_env{sv=Pid, port=Port} = Env) ->
put(?WXE_IDENTIFIER, Env),
put(opengl_port, Port),
@@ -191,7 +191,7 @@ batch(Fun) ->
end.
%% @doc Behaves like {@link //stdlib/lists:foreach/2} but batches wx commands. See {@link batch/1}.
--spec foreach(function(), list()) -> ok.
+-spec foreach(function(), list()) -> 'ok'.
foreach(Fun, List) ->
ok = wxe_util:cast(?BATCH_BEGIN, <<>>),
try lists:foreach(Fun, List)
@@ -267,7 +267,7 @@ get_memory_bin(#wx_mem{bin=Bin, size=Size}) ->
%% @doc Saves the memory from deletion until release_memory/1 is called.
%% If release_memory/1 is not called the memory will not be garbage collected.
--spec retain_memory(wx_memory()) -> ok.
+-spec retain_memory(wx_memory()) -> 'ok'.
retain_memory(#wx_mem{bin=Bin}) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_INCR, <<>>);
@@ -279,7 +279,7 @@ retain_memory(Bin) when is_binary(Bin) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_INCR, <<>>).
--spec release_memory(wx_memory()) -> ok.
+-spec release_memory(wx_memory()) -> 'ok'.
release_memory(#wx_mem{bin=Bin}) ->
wxe_util:send_bin(Bin),
ok = wxe_util:cast(?WXE_BIN_DECR, <<>>);
@@ -290,8 +290,8 @@ release_memory(Bin) when is_binary(Bin) ->
%% @doc Sets debug level. If debug level is 'verbose' or 'trace'
%% each call is printed on console. If Level is 'driver' each allocated
%% object and deletion is printed on the console.
--spec debug(Level | [Level]) -> ok
- when Level :: none | verbose | trace | driver | integer().
+-spec debug(Level | [Level]) -> 'ok'
+ when Level :: 'none' | 'verbose' | 'trace' | 'driver' | integer().
debug(Debug) ->
Level = calc_level(Debug),
@@ -332,7 +332,7 @@ set_debug(Level) when is_integer(Level) ->
end.
%% @doc Starts a wxErlang demo if examples directory exists and is compiled
--spec demo() -> ok | {error, atom()}.
+-spec demo() -> 'ok' | {'error', atom()}.
demo() ->
Priv = code:priv_dir(wx),
Demo = filename:join([filename:dirname(Priv),examples,demo]),
diff --git a/lib/wx/src/wx_object.erl b/lib/wx/src/wx_object.erl
index c22a083eb9..40ee308358 100644
--- a/lib/wx/src/wx_object.erl
+++ b/lib/wx/src/wx_object.erl
@@ -113,35 +113,35 @@
%% -export([behaviour_info/1]).
-callback init(Args :: term()) ->
- {#wx_ref{}, State :: term()} | {#wx_ref{}, State :: term(), timeout() | hibernate} |
- {stop, Reason :: term()} | ignore.
+ {#wx_ref{}, State :: term()} | {#wx_ref{}, State :: term(), timeout() | 'hibernate'} |
+ {'stop', Reason :: term()} | 'ignore'.
-callback handle_event(Request :: #wx{}, State :: term()) ->
- {noreply, NewState :: term()} |
- {noreply, NewState :: term(), timeout() | hibernate} |
- {stop, Reason :: term(), NewState :: term()}.
+ {'noreply', NewState :: term()} |
+ {'noreply', NewState :: term(), timeout() | 'hibernate'} |
+ {'stop', Reason :: term(), NewState :: term()}.
-callback handle_call(Request :: term(), From :: {pid(), Tag :: term()},
State :: term()) ->
- {reply, Reply :: term(), NewState :: term()} |
- {reply, Reply :: term(), NewState :: term(), timeout() | hibernate} |
- {noreply, NewState :: term()} |
- {noreply, NewState :: term(), timeout() | hibernate} |
- {stop, Reason :: term(), Reply :: term(), NewState :: term()} |
- {stop, Reason :: term(), NewState :: term()}.
+ {'reply', Reply :: term(), NewState :: term()} |
+ {'reply', Reply :: term(), NewState :: term(), timeout() | 'hibernate'} |
+ {'noreply', NewState :: term()} |
+ {'noreply', NewState :: term(), timeout() | 'hibernate'} |
+ {'stop', Reason :: term(), Reply :: term(), NewState :: term()} |
+ {'stop', Reason :: term(), NewState :: term()}.
-callback handle_cast(Request :: term(), State :: term()) ->
- {noreply, NewState :: term()} |
- {noreply, NewState :: term(), timeout() | hibernate} |
- {stop, Reason :: term(), NewState :: term()}.
+ {'noreply', NewState :: term()} |
+ {'noreply', NewState :: term(), timeout() | 'hibernate'} |
+ {'stop', Reason :: term(), NewState :: term()}.
-callback handle_info(Info :: timeout() | term(), State :: term()) ->
- {noreply, NewState :: term()} |
- {noreply, NewState :: term(), timeout() | hibernate} |
- {stop, Reason :: term(), NewState :: term()}.
--callback terminate(Reason :: (normal | shutdown | {shutdown, term()} |
+ {'noreply', NewState :: term()} |
+ {'noreply', NewState :: term(), timeout() | 'hibernate'} |
+ {'stop', Reason :: term(), NewState :: term()}.
+-callback terminate(Reason :: ('normal' | 'shutdown' | {'shutdown', term()} |
term()),
State :: term()) ->
term().
--callback code_change(OldVsn :: (term() | {down, term()}), State :: term(),
+-callback code_change(OldVsn :: (term() | {'down', term()}), State :: term(),
Extra :: term()) ->
- {ok, NewState :: term()} | {error, Reason :: term()}.
+ {'ok', NewState :: term()} | {'error', Reason :: term()}.
%% System exports
diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl
index 06be0367f8..e17a3327ac 100644
--- a/lib/wx/src/wxe_master.erl
+++ b/lib/wx/src/wxe_master.erl
@@ -185,10 +185,10 @@ handle_cast(_Msg, State) ->
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
handle_info({wxe_driver, error, Msg}, State) ->
- error_logger:format("WX ERROR: ~s~n", [Msg]),
+ error_logger:error_report([{wx, error}, {message, lists:flatten(Msg)}]),
{noreply, State};
handle_info({wxe_driver, internal_error, Msg}, State) ->
- error_logger:format("WX INTERNAL ERROR: ~s~n", [Msg]),
+ error_logger:error_report([{wx, internal_error}, {message, lists:flatten(Msg)}]),
{noreply, State};
handle_info({wxe_driver, debug, Msg}, State) ->
io:format("WX DBG: ~s~n", [Msg]),
diff --git a/lib/wx/src/wxe_util.erl b/lib/wx/src/wxe_util.erl
index 3eaf6aebed..bbcd9a65ea 100644
--- a/lib/wx/src/wxe_util.erl
+++ b/lib/wx/src/wxe_util.erl
@@ -82,9 +82,11 @@ rec(Op) ->
{'_wxe_error_', Op, Error} ->
[{_,MF}] = ets:lookup(wx_debug_info,Op),
erlang:error({Error, MF});
- {'_wxe_error_', Old, Error} ->
- [{_,MF}] = ets:lookup(wx_debug_info,Old),
- erlang:exit({Error, MF})
+ {'_wxe_error_', Old, Error} ->
+ [{_,{M,F,A}}] = ets:lookup(wx_debug_info,Old),
+ Msg = io_lib:format("~p in ~w:~w/~w", [Error, M, F, A]),
+ wxe_master ! {wxe_driver, error, Msg},
+ rec(Op)
end.
construct(Op, Args) ->
diff --git a/lib/wx/test/wx_basic_SUITE.erl b/lib/wx/test/wx_basic_SUITE.erl
index f89f25274a..6a2528780e 100644
--- a/lib/wx/test/wx_basic_SUITE.erl
+++ b/lib/wx/test/wx_basic_SUITE.erl
@@ -192,7 +192,9 @@ wx_api(Config) ->
?m(ok,wxButton:setLabel(Temp, "Testing")),
?m(ok,wxButton:destroy(Temp)),
?m({'EXIT',_},wxButton:getLabel(Temp)),
-
+ ?m(ok,wxButton:setLabel(Temp, "Testing")), %% Should generate an error report
+ ?m({'EXIT',_},wxButton:getLabel(Temp)),
+
case wx_test_lib:user_available(Config) of
true ->
%% Hmm popup doesn't return until mouse is pressed.
diff --git a/make/emd2exml.in b/make/emd2exml.in
index d84b967e40..903d707716 100644
--- a/make/emd2exml.in
+++ b/make/emd2exml.in
@@ -39,7 +39,7 @@
%%% Created : 25 Feb 2010 by Rickard Green
%%%-------------------------------------------------------------------
--define(MAX_HEADING, 3).
+-define(MAX_HEADING, 6).
-define(DELAYED_COPYRIGHT_IX, 0).
-define(DELAYED_TOC_IX, 1).
@@ -80,7 +80,6 @@
copyright = false,
copyright_data = [],
have_h1 = false,
- smarker_ix = false,
toc = [],
ifile,
ofile}).
@@ -368,9 +367,9 @@ put_text(S, "%OTP-REL%"++Cs, CTag, EmTag, Acc) ->
put_text(S, [$\\,C|Cs], no, EmTag, Acc) ->
put_text(S, Cs, no, EmTag, [C|Acc]);
put_text(S, [C,C|Cs], no, b, Acc) when C == $*; C == $_ ->
- put_text(S, Cs, no, no, ["</b>"|Acc]);
+ put_text(S, Cs, no, no, ["</strong>"|Acc]);
put_text(S, [C,C|Cs], no, no, Acc) when C == $*; C == $_ ->
- put_text(S, Cs, no, b, ["<b>"|Acc]);
+ put_text(S, Cs, no, b, ["<strong>"|Acc]);
put_text(S, [C|Cs], no, em, Acc) when C == $*; C == $_ ->
put_text(S, Cs, no, no, ["</em>"|Acc]);
put_text(S, [C|Cs], no, no, Acc) when C == $*; C == $_ ->
@@ -614,8 +613,7 @@ strip_lvls(_N, Str) ->
put_title(S, 1, Title) ->
header(chk_h1(1, S#state{h = 1, mlist = [top]}), Title);
put_title(#state{mlist = MList0,
- toc = TOC,
- smarker_ix = SMarkerIX} = S0, H, Title) ->
+ toc = TOC} = S0, H, Title) ->
TitleStr = text(Title),
MList1 = [mk_lvl_marker(Title) | MList0],
Marker = mk_marker(MList1),
@@ -626,12 +624,10 @@ put_title(#state{mlist = MList0,
"<seealso marker=\"#",Marker,"\">",
TitleStr,"</seealso>",nl()],
h = H,
- mlist = MList1,
- smarker_ix = false}),
- true = is_integer(SMarkerIX),
- S2 = write_delayed(S1, SMarkerIX, ["<marker id=\"", Marker, "\"/>",nl()]),
+ mlist = MList1}),
+ S2 = put_chars(S1, ["<marker id=\"", Marker, "\"/>",nl()]),
{STag, ETag} = case H > ?MAX_HEADING of
- true -> {"<p><b>", "</b></p>"};
+ true -> {"<p><strong>", "</strong></p>"};
false -> {"<title>", "</title>"}
end,
put_chars(S2, [STag, TitleStr, ETag, nl()]).
@@ -701,15 +697,10 @@ sections_change(H, OldH, #state{mlist = [_|ML], toc = TOC} = S0) ->
begin_section(1, S) ->
put_line(S, "<chapter>");
-begin_section(H, #state{delayed_array_ix = IX} = S0) when H > ?MAX_HEADING ->
- false = S0#state.smarker_ix,
- true = is_integer(IX),
- put_delayed(S0#state{smarker_ix = IX, delayed_array_ix = IX+1}, IX);
-begin_section(H, #state{delayed_array_ix = IX} = S0) when H > 1 ->
- false = S0#state.smarker_ix,
- true = is_integer(IX),
- S1 = put_delayed(S0#state{smarker_ix = IX, delayed_array_ix = IX+1}, IX),
- put_line(S1, "<section>");
+begin_section(H, S) when H > ?MAX_HEADING ->
+ S;
+begin_section(H, S0) when H > 1 ->
+ put_line(S0, "<section>");
begin_section(_H, S) ->
S.
@@ -779,7 +770,7 @@ create_toc(#state{toc = TOC} = S) ->
{value,{"true",[]}} ->
write_delayed(S,
?DELAYED_TOC_IX,
- ["<p><b>Table of Contents</b></p>", nl(), TOC]);
+ ["<p><strong>Table of Contents</strong></p>", nl(), TOC]);
_ ->
write_delayed(S, ?DELAYED_TOC_IX, "")
end.
@@ -986,10 +977,10 @@ chg_bq_lvl(Lvl, #state{bq_lvl = Lvl} = S) ->
S;
chg_bq_lvl(NewLvl, #state{bq_lvl = Lvl} = S) when NewLvl > Lvl ->
chg_bq_lvl(NewLvl,
- put_line(end_p(end_code(S#state{bq_lvl = Lvl+1})), "<blockquote>"));
+ put_line(end_p(end_code(S#state{bq_lvl = Lvl+1})), "<quote>"));
chg_bq_lvl(NewLvl, #state{bq_lvl = Lvl} = S) ->
chg_bq_lvl(NewLvl,
- put_line(end_p(end_code(S#state{bq_lvl = Lvl-1})), "</blockquote>")).
+ put_line(end_p(end_code(S#state{bq_lvl = Lvl-1})), "</quote>")).
%%
%% Resolve link
diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk
index e104b68991..13b54645ad 100644
--- a/make/otp_release_targets.mk
+++ b/make/otp_release_targets.mk
@@ -120,7 +120,7 @@ xmllint: $(XML_FILES)
echo Checking $$i; \
xmllint --noout --valid --nodefdtd --loaddtd --path $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities $$i; \
else\
- awk -F\" '/xi:include/ {print "echo Checking " $$2 ;print "xmllint --noout --valid --nodefdtd --loaddtd --path $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities " $$2}' $$i |sh; \
+ awk -F\" '/xi:include/ {print "echo Checking " $$2 ;print "xmllint --noout --valid --nodefdtd --loaddtd --path $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities:$(XMLLINT_SRCDIRS) " $$2}' $$i |sh; \
fi \
done
diff --git a/otp_build b/otp_build
index 1b79b0b0fe..28a229b101 100755
--- a/otp_build
+++ b/otp_build
@@ -1393,9 +1393,6 @@ case "$1" in
TYPE=opt
fi;
FLAVOR=$1
- if [ $FLAVOR = opt ]; then
- FLAVOR=plain
- fi
do_boot;;
update_primary)
case $version_controller in
diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml
index a77b3964fc..0a24e97950 100644
--- a/system/doc/design_principles/sup_princ.xml
+++ b/system/doc/design_principles/sup_princ.xml
@@ -80,8 +80,8 @@ init(_Args) ->
</section>
<section>
- <title>Supervisor Flags</title>
<marker id="flags"/>
+ <title>Supervisor Flags</title>
<p>This is the type definition for the supervisor flags:</p>
<code type="none"><![CDATA[
sup_flags() = #{strategy => strategy(), % optional
@@ -106,9 +106,8 @@ sup_flags() = #{strategy => strategy(), % optional
</section>
<section>
- <marker id="strategy"></marker>
+ <marker id="strategy"/>
<title>Restart Strategy</title>
-
<p> The restart strategy is specified by
the <c>strategy</c> key in the supervisor flags map returned by
the callback function <c>init</c>:</p>
diff --git a/system/doc/efficiency_guide/advanced.xml b/system/doc/efficiency_guide/advanced.xml
index 3609b8d88e..016302fe50 100644
--- a/system/doc/efficiency_guide/advanced.xml
+++ b/system/doc/efficiency_guide/advanced.xml
@@ -35,8 +35,7 @@
how much memory different data types and operations require. It is
implementation-dependent how much memory the Erlang data types and
other items consume, but the following table shows some figures for
- the <c>erts-5.2</c> system in R9B. There have been no significant
- changes in R13.</p>
+ the <c>erts-8.0</c> system in OTP 19.0.</p>
<p>The unit of measurement is memory words. There exists both a
32-bit and a 64-bit implementation. A word is therefore 4 bytes or
@@ -87,6 +86,19 @@
<cell>2 words + the size of each element.</cell>
</row>
<row>
+ <cell>Small Map</cell>
+ <cell>4 words + 2 words per entry (key and value) + the size of each key and value pair.</cell>
+ </row>
+ <row>
+ <cell>Large Map</cell>
+ <cell>
+ At least, 2 words + 2 x <c>N</c> words + 2 x log16(<c>N</c>) words +
+ the size of each key and value pair, where <c>N</c> is the number of pairs in the Map.
+ A large Map is represented as a tree internally where each node in the tree is a
+ "sparse tuple" of arity 16.
+ </cell>
+ </row>
+ <row>
<cell>Pid</cell>
<cell>1 word for a process identifier from the current local node
+ 5 words for a process identifier from another node.<br></br>
@@ -122,7 +134,7 @@
</row>
<row>
<cell>Erlang process</cell>
- <cell>327 words when spawned, including a heap of 233 words.</cell>
+ <cell>338 words when spawned, including a heap of 233 words.</cell>
</row>
<tcaption>Memory Size of Different Data Types</tcaption>
</table>
diff --git a/system/doc/system_principles/create_target.xmlsrc b/system/doc/system_principles/create_target.xmlsrc
index 8a463076f5..f9b27ffc35 100644
--- a/system/doc/system_principles/create_target.xmlsrc
+++ b/system/doc/system_principles/create_target.xmlsrc
@@ -374,10 +374,10 @@ os> <input>/usr/local/erl-target/bin/to_erl /tmp/erlang.pipe.1</input></pre>
</p>
<pre>
2> <input>release_handler:install_release(Vsn).</input>
-<output>{continue_after_restart,"FIRST",[]}
+{continue_after_restart,"FIRST",[]}
heart: Tue Apr 1 12:15:10 2014: Erlang has closed.
heart: Tue Apr 1 12:15:11 2014: Executed "/usr/local/erl-target/bin/start /usr/local/erl-target/releases/new_start_erl.data" -> 0. Terminating.
-[End]</output></pre>
+[End]</pre>
<p>
The above return value and output after the call to
<c>release_handler:install_release/1</c> means that the
@@ -398,12 +398,12 @@ os> <input>/usr/local/erl-target/bin/to_erl /tmp/erlang.pipe.2</input></pre>
</p>
<pre>
1> <input>release_handler:which_releases().</input>
-<output>[{"MYSYSTEM","SECOND",
+[{"MYSYSTEM","SECOND",
["kernel-3.0","stdlib-2.0","sasl-2.4","pea-2.0"],
current},
{"MYSYSTEM","FIRST",
["kernel-2.16.4","stdlib-1.19.4","sasl-2.3.4","pea-1.0"],
- permanent}]</output></pre>
+ permanent}]</pre>
<p>
Our new release, "SECOND", is now the current release, but we
can also see that our "FIRST" release is still permanent. This
@@ -420,12 +420,12 @@ os> <input>/usr/local/erl-target/bin/to_erl /tmp/erlang.pipe.2</input></pre>
</p>
<pre>
3> <input>release_handler:which_releases().</input>
-<output>[{"MYSYSTEM","SECOND",
+[{"MYSYSTEM","SECOND",
["kernel-3.0","stdlib-2.0","sasl-2.4","pea-2.0"],
permanent},
{"MYSYSTEM","FIRST",
["kernel-2.16.4","stdlib-1.19.4","sasl-2.3.4","pea-1.0"],
- old}]</output></pre>
+ old}]</pre>
<p>
We see that the new release version is <c>permanent</c>, so
it would be safe to restart the node.</p>
diff --git a/system/doc/system_principles/versions.xml b/system/doc/system_principles/versions.xml
index 3772d773fc..b9f7fa4bf6 100644
--- a/system/doc/system_principles/versions.xml
+++ b/system/doc/system_principles/versions.xml
@@ -57,11 +57,11 @@
<p>In an OTP source code tree, the OTP version can be read from
the text file <c>&lt;OTP source root&gt;/OTP_VERSION</c>. The
absolute path to the file can be constructed by calling
- <c>filename:join([<seealso marker="kernel:code#root_dir/0">code:root_dir()</seealso>, "OTP_VERSION"])</c>.</p>
+ <c>filename:join([</c><seealso marker="kernel:code#root_dir/0"><c>code:root_dir()</c></seealso><c>, "OTP_VERSION"])</c>.</p>
<p>In an installed OTP development system, the OTP version can be read
from the text file <c>&lt;OTP installation root&gt;/releases/&lt;OTP release number&gt;/OTP_VERSION</c>.
The absolute path to the file can by constructed by calling
- <c>filename:join([<seealso marker="kernel:code#root_dir/0">code:root_dir()</seealso>, "releases", <seealso marker="erts:erlang#system_info_otp_release"> erlang:system_info(otp_release)</seealso>, "OTP_VERSION"]).</c></p>
+ <c>filename:join([</c><seealso marker="kernel:code#root_dir/0"><c>code:root_dir()</c></seealso><c>, "releases", </c><seealso marker="erts:erlang#system_info_otp_release"><c>erlang:system_info(otp_release)</c></seealso><c>, "OTP_VERSION"]).</c></p>
<p>If the version read from the <c>OTP_VERSION</c> file in a
development system has a <c>**</c> suffix, the system has been
patched using the
diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile
index caae19a8d1..6aa9d8d340 100644
--- a/system/doc/top/Makefile
+++ b/system/doc/top/Makefile
@@ -74,6 +74,7 @@ XML_FILES = \
BOOK_FILES = book.xml
+XMLLINT_SRCDIRS= ../installation_guide:../system_principles:../embedded:../getting_started:../reference_manual:../programming_examples:../efficiency_guide:../tutorial:../design_principles:../oam
HTMLDIR= ../html
PDFREFDIR= pdf